feat: add cluster auditing, management, and upgrade scripts

This commit is contained in:
2026-11-04 17:58:07 -05:00
parent 8117326b14
commit 1b378b29f3
128 changed files with 4744 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import paramiko
import base64
import gzip
import json
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('140.44.4.41', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
_, out, _ = ssh.exec_command('kubectl get secret -n infrastructure sh.helm.release.v1.coder.v5 -o jsonpath="{.data.release}"')
raw = out.read().decode().strip()
if raw:
data = base64.b64decode(raw)
data = base64.b64decode(data) # helm encodes twice
decomp = gzip.decompress(data)
rel = json.loads(decomp)
print("Chart:", rel.get('chart', {}).get('metadata', {}).get('version'))
print("Values:", json.dumps(rel.get('config', {}), indent=2))
ssh.close()