Skip to content

Commit 787d2df

Browse files
authored
feat(roles): Allow to change name of serviceAccount, clusterRole and clusterRoleBinding (#1748)
Signed-off-by: kiblik <[email protected]>
1 parent 4390e10 commit 787d2df

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

charts/fluent-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords:
66
- fluent-bit
77
- fluentd
88
- operator
9-
version: 3.5.0
9+
version: 3.5.1
1010
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-operator
1111
appVersion: "3.5.0"
1212
icon: https://raw.githubusercontent.com/fluent/fluent-operator/master/docs/images/fluent-operator-icon.svg

charts/fluent-operator/templates/fluent-operator-clusterRole.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
labels:
66
app.kubernetes.io/component: controller
77
app.kubernetes.io/name: fluent-operator
8-
name: fluent-operator
8+
name: {{ .Values.operator.rbac.clusterRole.name }}
99
rules:
1010
- apiGroups:
1111
- apps

charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ metadata:
55
labels:
66
app.kubernetes.io/component: controller
77
app.kubernetes.io/name: fluent-operator
8-
name: fluent-operator
8+
name: {{ .Values.operator.rbac.clusterRoleBinding.name }}
99
roleRef:
1010
apiGroup: rbac.authorization.k8s.io
1111
kind: ClusterRole
12-
name: fluent-operator
12+
name: {{ .Values.operator.rbac.clusterRole.name }}
1313
subjects:
1414
- kind: ServiceAccount
15-
name: fluent-operator
15+
name: {{ .Values.operator.serviceAccount.name }}
1616
namespace: {{ .Release.Namespace | quote }}
1717
{{- end }}

charts/fluent-operator/templates/serviceaccount.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:
5-
name: fluent-operator
5+
name: {{ .Values.operator.serviceAccount.name }}
66
namespace: {{ .Release.Namespace | quote }}
77
labels:
88
app.kubernetes.io/component: operator

charts/fluent-operator/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ operator:
4444
rbac:
4545
# -- Specifies whether to create the ClusterRole and ClusterRoleBinding.
4646
create: true
47+
clusterRole:
48+
name: fluent-operator
49+
clusterRoleBinding:
50+
name: fluent-operator
4751
# Container security context for Fluent Operator container. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
4852
securityContext: {}
4953
# Fluent Operator resources. Usually user needn't to adjust these.
@@ -98,6 +102,9 @@ operator:
98102
relabelings: []
99103
metricRelabelings: []
100104

105+
serviceAccount:
106+
name: fluent-operator
107+
101108
fluentbit:
102109
# Installs a sub chart carrying the CRDs for the fluent-bit controller. The sub chart is enabled by default.
103110
crdsEnable: true

0 commit comments

Comments
 (0)