Skip to content

Commit c6cd7b3

Browse files
committed
Ability to specify role & rolebinding name of resources in argocd namespace
1 parent fd05cac commit c6cd7b3

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

charts/kargo/templates/argocd/role-binding.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: RoleBinding
44
metadata:
5-
name: kargo-controller
5+
name: {{ .Values.controller.argocd.resourceName | default "kargo-controller" }}
66
namespace: {{ .Values.controller.argocd.namespace | default "argocd" }}
77
labels:
88
{{- include "kargo.labels" . | nindent 4 }}
@@ -11,7 +11,7 @@ metadata:
1111
roleRef:
1212
apiGroup: rbac.authorization.k8s.io
1313
kind: Role
14-
name: kargo-controller
14+
name: {{ .Values.controller.argocd.resourceName | default "kargo-controller" }}
1515
subjects:
1616
- kind: ServiceAccount
1717
namespace: {{ .Release.Namespace }}

charts/kargo/templates/argocd/role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: Role
44
metadata:
5-
name: kargo-controller
5+
name: {{ .Values.controller.argocd.resourceName | default "kargo-controller" }}
66
namespace: {{ .Values.controller.argocd.namespace | default "argocd" }}
77
labels:
88
{{- include "kargo.labels" . | nindent 4 }}

charts/kargo/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,8 @@ controller:
592592
namespace: argocd
593593
## @param controller.argocd.watchArgocdNamespaceOnly Specifies whether the reconciler that watches Argo CD Applications for the sake of forcing related Stages to reconcile should only watch Argo CD Application resources residing in Argo CD's own namespace. Note: Older versions of Argo CD only supported Argo CD Application resources in Argo CD's own namespace, but newer versions support Argo CD Application resources in any namespace. This should usually be left as `false`.
594594
watchArgocdNamespaceOnly: false
595+
## @param controller.argocd.resourceName The name of the role and rolebinding that will be created in the Argo CD namespace. Override in case of conflict with existing roles/rolebindings.
596+
resourceName: kargo-controller
595597

596598
## All settings relating to the use of Argo Rollouts AnalysisTemplates and
597599
## AnalysisRuns as a means of verifying Stages after a Promotion.

0 commit comments

Comments
 (0)