Skip to content

Commit f9b3470

Browse files
authored
Merge pull request #1947 from mkozikowsk/issue/1936
fix missing labels in clusterrole and userrole template
2 parents a6b77f3 + 1cfcabf commit f9b3470

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ list: ## List all make targets
164164
manager: codegen fmt vet ## Build manager binary
165165
go build -o bin/manager main.go
166166

167-
HELM_MANIFEST_OVERRIDE='s@manager-role@{{ template "logging-operator.fullname" . }}\n annotations:\n {{- if .Values.rbac.retainOnDelete }}\n "helm.sh/resource-policy": keep\n {{- end }}@'
167+
HELM_MANIFEST_OVERRIDE='s@manager-role@{{ template "logging-operator.fullname" . }}\n annotations:\n {{- if .Values.rbac.retainOnDelete }}\n "helm.sh/resource-policy": keep\n {{- end }}\n labels:\n{{ include "logging-operator.labels" . | indent 4 }}@'
168168

169169
.PHONY: manifests
170170
manifests: ${CONTROLLER_GEN} ## Generate manifests e.g. CRD, RBAC etc.

charts/logging-operator/templates/clusterrole.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ metadata:
88
{{- if .Values.rbac.retainOnDelete }}
99
"helm.sh/resource-policy": keep
1010
{{- end }}
11+
labels:
12+
{{ include "logging-operator.labels" . | indent 4 }}
1113
rules:
1214
- apiGroups:
1315
- ""

charts/logging-operator/templates/userrole.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ metadata:
77
labels:
88
rbac.authorization.k8s.io/aggregate-to-admin: "true"
99
rbac.authorization.k8s.io/aggregate-to-edit: "true"
10+
{{ include "logging-operator.labels" . | indent 4 }}
1011
rules:
1112
- apiGroups:
1213
- logging.banzaicloud.io

0 commit comments

Comments
 (0)