-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated role and cleanup image (#1339)
* updated cleanup image * added leader election permissions * refactoring
- Loading branch information
1 parent
54089b5
commit 90a7674
Showing
13 changed files
with
189 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
charts/victoria-metrics-operator/templates/clusterrole_binding.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{{- if .Values.rbac.create -}} | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ include "vm-operator.fullname" . }} | ||
{{- $ctx := merge (deepCopy .) (dict "extraLabels" .Values.extraLabels) }} | ||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }} | ||
{{- with .Values.annotations }} | ||
annotations: {{ toYaml . | nindent 4 }} | ||
{{- end }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "vm-operator.serviceAccountName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ include "vm-operator.fullname" . }} | ||
apiGroup: rbac.authorization.k8s.io | ||
{{- end -}} | ||
{{- if or .Values.cleanupCRD .Values.crd.cleanup.enabled }} | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "vm-operator.cleanupHookName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
labels: {{ include "vm-operator.labels" . | nindent 4 }} | ||
annotations: {{ include "vm-operator.cleanup.annotations" (dict "hookWeight" "-4") | nindent 4 }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ include "vm-operator.cleanupHookName" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "vm-operator.cleanupHookName" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{- end }} |
Oops, something went wrong.