Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App of App syncwaves #182

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions clustergroup/templates/plumbing/applications.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- $c := 1 | int64 }}
{{- if not (eq .Values.enabled "core") }}
{{- $namespace := print $.Values.global.pattern "-" $.Values.clusterGroup.name }}
{{- if (eq .Values.enabled "plumbing") }}
Expand Down Expand Up @@ -123,6 +124,8 @@ metadata:
namespace: {{ $namespace }}
finalizers:
- resources-finalizer.argocd.argoproj.io/foreground
annotations:
argocd.argoproj.io/sync-wave: {{ quote $c |}}
spec:
destination:
name: {{ $.Values.clusterGroup.targetCluster }}
Expand Down Expand Up @@ -213,6 +216,7 @@ spec:
# selfHeal: true
{{- end }}
---
{{ $c = add1 $c }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions tests/clustergroup-normal.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ metadata:
namespace: mypattern-example
finalizers:
- resources-finalizer.argocd.argoproj.io/foreground
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
destination:
name: in-cluster
Expand Down Expand Up @@ -553,6 +555,8 @@ metadata:
namespace: mypattern-example
finalizers:
- resources-finalizer.argocd.argoproj.io/foreground
annotations:
argocd.argoproj.io/sync-wave: "2"
spec:
destination:
name: in-cluster
Expand Down
12 changes: 8 additions & 4 deletions tests/clustergroup.expected.diff
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
@@ -45,16 +257,583 @@
@@ -45,16 +257,587 @@
- kind: ServiceAccount
# This is the {ArgoCD.name}-argocd-application-controller
name: example-gitops-argocd-application-controller
Expand Down Expand Up @@ -493,6 +493,8 @@
+ namespace: mypattern-example
+ finalizers:
+ - resources-finalizer.argocd.argoproj.io/foreground
+ annotations:
+ argocd.argoproj.io/sync-wave: "1"
+spec:
+ destination:
+ name: in-cluster
Expand Down Expand Up @@ -544,6 +546,8 @@
+ namespace: mypattern-example
+ finalizers:
+ - resources-finalizer.argocd.argoproj.io/foreground
+ annotations:
+ argocd.argoproj.io/sync-wave: "2"
+spec:
+ destination:
+ name: in-cluster
Expand Down Expand Up @@ -828,7 +832,7 @@
---
# Source: pattern-clustergroup/templates/plumbing/argocd.yaml
apiVersion: argoproj.io/v1alpha1
@@ -65,7 +844,7 @@
@@ -65,7 +848,7 @@
# Changing the name affects the ClusterRoleBinding, the generated secret,
# route URL, and argocd.argoproj.io/managed-by annotations
name: example-gitops
Expand All @@ -837,7 +841,7 @@
annotations:
argocd.argoproj.io/compare-options: IgnoreExtraneous
spec:
@@ -94,10 +873,10 @@
@@ -94,10 +877,10 @@
--set global.repoURL=$ARGOCD_APP_SOURCE_REPO_URL
--set global.targetRevision=$ARGOCD_APP_SOURCE_TARGET_REVISION
--set global.namespace=$ARGOCD_APP_NAMESPACE
Expand All @@ -852,7 +856,7 @@
--set clusterGroup.name=example
--post-renderer ./kustomize"]
applicationSet:
@@ -174,11 +953,59 @@
@@ -174,11 +957,59 @@
kind: ConsoleLink
metadata:
name: example-gitops-link
Expand Down