Skip to content

Commit

Permalink
added cluster rbac
Browse files Browse the repository at this point in the history
  • Loading branch information
ATGardner committed Sep 10, 2024
1 parent a311650 commit 12b983b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ printf "%s-%s-application-controller" .Release.Name (get .Values "argo-cd").fullnameOverride | trunc 63 | trimSuffix "-" }}
labels:
{{- include "codefresh-gitops-runtime.labels" . | nindent 4 }}
rules:
- apiGroups:
- '*'
resources:
- '*'
verbs:
- '*'
- nonResourceURLs:
- '*'
verbs:
- '*'
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ printf "%s-%s-application-controller" .Release.Name (get .Values "argo-cd").fullnameOverride | trunc 63 | trimSuffix "-" }}
labels:
{{- include "codefresh-gitops-runtime.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ printf "%s-%s-application-controller" .Release.Name (get .Values "argo-cd").fullnameOverride | trunc 63 | trimSuffix "-" }}
subjects:
- kind: ServiceAccount
name: argocd-application-controller
namespace: {{ .Release.Namespace }}
2 changes: 1 addition & 1 deletion charts/gitops-runtime/templates/gitops-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if index (get .Values "gitops-operator") "libraryMode" }}
{{- if and (index (get .Values "gitops-operator") "libraryMode") (index (get .Values "gitops-operator") "enabled") }}
{{- $gitopsOperatorContext := (index .Subcharts "gitops-operator")}}
{{- $argoCDImageDict := index .Subcharts "argo-cd" "Values" "global" "image" }}
{{- if not $argoCDImageDict.tag }}
Expand Down

0 comments on commit 12b983b

Please sign in to comment.