diff --git a/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml b/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml index 8b610e98..dafe3fe6 100644 --- a/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml +++ b/charts/fluent-operator/templates/fluent-operator-clusterRole.yaml @@ -1,4 +1,4 @@ -{{- if .Values.operator.enable }} +{{- if and .Values.operator.enable .Values.operator.rbac.create}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: diff --git a/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml b/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml index e346ade2..0a44ae36 100644 --- a/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml +++ b/charts/fluent-operator/templates/fluent-operator-clusterRoleBinding.yaml @@ -1,4 +1,4 @@ -{{- if .Values.operator.enable }} +{{- if and .Values.operator.enable .Values.operator.rbac.create}} apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: diff --git a/charts/fluent-operator/values.yaml b/charts/fluent-operator/values.yaml index 093a7860..714b3b39 100644 --- a/charts/fluent-operator/values.yaml +++ b/charts/fluent-operator/values.yaml @@ -38,6 +38,9 @@ operator: priorityClassName: "" # Pod security context for Fluent Operator. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ podSecurityContext: {} + rbac: + # -- Specifies whether to create the ClusterRole and ClusterRoleBinding. + create: true # Container security context for Fluent Operator container. Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ securityContext: {} # Fluent Operator resources. Usually user needn't to adjust these.