Skip to content

Commit a288ac3

Browse files
mbaldessaridarkdoc
andcommitted
Add option to disable 2nd argocd
This PR introduces the .Values.global.singleArgoCD boolean which when set to true will use a single argoinstance for everything on the cluster. Co-Authored-By: Akos Eros <aeros@redhat.com> Co-Authored-By: Michele Baldessari <michele@acksyn.org>
1 parent 3e886d4 commit a288ac3

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

templates/policies/acm-hub-ca-policy.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
{{- if eq (include "acm.ishubcluster" .) "true" }}
33
{{- range .Values.clusterGroup.managedClusterGroups }}
44
{{- $group := . }}
5+
{{- if $.Values.global.singleArgoCD }}
6+
{{- else }}
57
---
68
apiVersion: policy.open-cluster-management.io/v1
79
kind: Policy
@@ -65,6 +67,7 @@ spec:
6567
"clusterSelector" .clusterSelector
6668
"group" $group
6769
) | nindent 2 }}
70+
{{- end }}{{/* if $.Values.global.singleArgoCD */}}
6871
{{- if (eq ((($.Values.global).secretStore).backend) "vault") }}
6972
---
7073
apiVersion: policy.open-cluster-management.io/v1

templates/policies/application-policies.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# TODO: Also create a GitOpsCluster.apps.open-cluster-management.io
22
{{- range .Values.clusterGroup.managedClusterGroups }}
33
{{- $group := . }}
4+
{{- $argoDestNamespace := (printf "%s-%s" $.Values.global.pattern .name) -}}
5+
{{- if $.Values.global.singleArgoCD }}
6+
{{- $argoDestNamespace = $.Values.global.vpArgoNamespace -}}
7+
{{- end }}
48
{{- if ($.Values.global.deletePattern | eq "DeleteSpoke" ) }}
59
{{- else }}
610
apiVersion: policy.open-cluster-management.io/v1
@@ -53,6 +57,8 @@ spec:
5357
metadata:
5458
name: {{ $.Values.global.pattern }}-{{ .name }}
5559
namespace: {{ $.Values.global.vpArgoNamespace }}
60+
annotations:
61+
notice.argocd.argoproj.io/severity: critical
5662
finalizers:
5763
- resources-finalizer.argocd.argoproj.io/foreground
5864
spec:
@@ -148,7 +154,10 @@ spec:
148154
{{- end }}{{/* if $.Values.global.multiSourceSupport */}}
149155
destination:
150156
server: https://kubernetes.default.svc
151-
namespace: {{ $.Values.global.pattern }}-{{ .name }}
157+
namespace: {{ $argoDestNamespace }}
158+
info:
159+
- name: "VP"
160+
value: "https://validatedpatterns.io APP OF APPS"
152161
syncPolicy:
153162
automated:
154163
{{- if ($.Values.global.deletePattern | ne "none" ) }}

0 commit comments

Comments
 (0)