Last active
September 7, 2023 07:07
-
-
Save jhoelzel/c39d7e29836f0d0308e7093c8000df72 to your computer and use it in GitHub Desktop.
argo ApplicationSet to deploy an application to two argo cd instances at the same time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"appName": "production-deployment", | |
"destNamespace": "prod" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"appName": "production-deployment", | |
"destNamespace": "prod" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: argoproj.io/v1alpha1 | |
kind: ApplicationSet | |
metadata: | |
annotations: | |
argocd.argoproj.io/sync-wave: "3" | |
labels: | |
app.kubernetes.io/managed-by: argocd | |
name: gitopsexample-a | |
namespace: argocd | |
spec: | |
generators: | |
- git: | |
files: | |
- path: myapps/**/production/config-a.json | |
repoURL: [email protected]:hoelzel-it/gitpos.git | |
revision: HEAD | |
syncPolicy: {} | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/managed-by: argocd | |
app.kubernetes.io/name: "{{ appName }}" | |
name: "{{ appName }}" | |
namespace: argocd | |
spec: | |
destination: | |
namespace: "{{ destNamespace }}" | |
server: https://kubernetes.default.svc | |
project: production | |
source: | |
path: "{{ path }}" | |
repoURL: [email protected]:hoelzel-it/gitopsexample.git | |
targetRevision: HEAD | |
syncPolicy: | |
automated: | |
allowEmpty: true | |
prune: true | |
selfHeal: true | |
status: {} | |
apiVersion: argoproj.io/v1alpha1 | |
---- | |
kind: ApplicationSet | |
metadata: | |
annotations: | |
argocd.argoproj.io/sync-wave: "3" | |
labels: | |
app.kubernetes.io/managed-by: argocd | |
name: gitopsexample-b | |
namespace: argocd | |
spec: | |
generators: | |
- git: | |
files: | |
- path: myapps/**/production/config-b.json | |
repoURL: [email protected]:hoelzel-it/gitpos.git | |
revision: HEAD | |
syncPolicy: {} | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/managed-by: argocd | |
app.kubernetes.io/name: "{{ appName }}" | |
name: "{{ appName }}" | |
namespace: argocd | |
spec: | |
destination: | |
namespace: "{{ destNamespace }}" | |
server: <theothercluster> | |
project: production | |
source: | |
path: "{{ path }}" | |
repoURL: [email protected]:hoelzel-it/gitopsexample.git | |
targetRevision: HEAD | |
syncPolicy: | |
automated: | |
allowEmpty: true | |
prune: true | |
selfHeal: true | |
status: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment