chore: initialize git repository and add ArgoCD application manifests

This commit is contained in:
2026-11-02 17:13:58 -05:00
parent 7b791cebbc
commit dff2279a8f
5 changed files with 229 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import paramiko
def main():
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)
cmd = "kubectl get pod -n infrastructure -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].spec.containers[*].name}'"
stdin, stdout, stderr = ssh.exec_command(cmd)
container_name = stdout.read().decode().strip()
print("Container name:", container_name)
# Check cluster list via argocd CLI inside the server pod
# In argocd pod, the binary 'argocd' is usually available or we can check via curl localhost:8080/api/v1/clusters
stdin, stdout, stderr = ssh.exec_command(f"kubectl exec -n infrastructure deployment/argocd-server -c {container_name} -- curl -s http://localhost:8080/api/v1/clusters")
print("API clusters response:", stdout.read().decode())
ssh.close()
if __name__ == '__main__':
main()