Skip to content

Commit

Permalink
- Tempalized the clusterrole to get the correct labels
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaccuknox committed Jul 2, 2024
1 parent 8efde05 commit b97aac0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 9 additions & 0 deletions deployments/nimbus-kyverno/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ app.kubernetes.io/name: {{ include "nimbus-kyverno.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
ClusterRoleSelector labels
*/}}
{{- define "nimbus-kyverno.clusterRoleSelectorLabels" -}}
app.kubernetes.io/name: background-controller
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/part-of: {{ .Release.Name }}-kyverno
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
4 changes: 1 addition & 3 deletions deployments/nimbus-kyverno/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/component: background-controller
app.kubernetes.io/instance: nimbus-kyverno
app.kubernetes.io/part-of: nimbus-kyverno
{{- include "nimbus-kyverno.clusterRoleSelectorLabels" . | nindent 4 }}
name: nimbus-kyverno:update-resources
rules:
- apiGroups:
Expand Down

0 comments on commit b97aac0

Please sign in to comment.