feat: add cluster auditing, management, and upgrade scripts
This commit is contained in:
19
scripts/check_chart_versions.py
Normal file
19
scripts/check_chart_versions.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import paramiko
|
||||
|
||||
def check_catalog_versions(ip, cluster_name):
|
||||
print(f"\n=======================================================")
|
||||
print(f"=== {cluster_name} AVAILABLE CHART VERSIONS ===")
|
||||
print(f"=======================================================")
|
||||
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=10)
|
||||
|
||||
# We can inspect the Rancher catalog charts
|
||||
cmd = "kubectl get charts.catalog.cattle.io -A -o custom-columns=REPO:.metadata.namespace,CHART:.metadata.name | head -n 30"
|
||||
_, out, _ = ssh.exec_command(cmd)
|
||||
print(out.read().decode())
|
||||
ssh.close()
|
||||
|
||||
check_catalog_versions('140.44.4.11', 'AERODROME')
|
||||
check_catalog_versions('140.44.4.41', 'SPACEPORT')
|
||||
|
||||
Reference in New Issue
Block a user