chore: remove unused file
This commit is contained in:
19
scripts/inspect_db_pods.py
Normal file
19
scripts/inspect_db_pods.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import paramiko
|
||||
import sys
|
||||
|
||||
sys.stdout.reconfigure(encoding='utf-8')
|
||||
|
||||
for name, ip in [('aerodrome', '140.44.4.11'), ('spaceport', '140.44.4.41')]:
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect(ip, username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=8)
|
||||
cmd = "kubectl get pods -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,STATUS:.status.phase"
|
||||
stdin, stdout, stderr = ssh.exec_command(cmd)
|
||||
lines = stdout.read().decode().splitlines()
|
||||
print(f"=== {name.upper()} PODS ===")
|
||||
for line in lines:
|
||||
lower = line.lower()
|
||||
if any(k in lower for k in ['postgres', 'mysql', 'authentik', 'gitea', 'zabbix', 'awx', 'semaphore']):
|
||||
print(" " + line)
|
||||
ssh.close()
|
||||
|
||||
Reference in New Issue
Block a user