generator Argo CD Cluster Secret を条件に作成 ※ 他にも Git generator など様々あります kind: ApplicationSet metadata: name: app spec: generators: - clusters: {} template: metadata: name: 'app-{{ name }}' spec: project: default source: repoURL:
[email protected]:xxxxx/addons.git targetRevision: main path: manifests/example-app/overlays/release destination: server: '{{ server }}' kind: Secret metadata: name: kimura namespace: argocd stringData: name: kimura-cluster server: 10.0.0.1:6443 config: (Argo CD の kubeconfig 相当) kind: Secret metadata: name: hackers-champloo namespace: argocd stringData: name: champloo-cluster server: 10.0.0.2:6443 config: (Argo CD の kubeconfig 相当) kind: Application metadata: metadata: name: app-kimura-cluster spec: .... destination: server: 10.0.0.1:6443 kind: Application metadata: metadata: name: app-champloo-cluster spec: .... destination: server: 10.0.0.2:6443 https://argo-cd.readthedocs.io/en/stable/operator-manual/applicationset/Generators/ ※ Cluster が作成されたら、Secret リソースを作成する自作カスタムコントローラーを開発