github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/kube-state-metrics/templates/rolebinding.yaml (about) 1 {{- if and (eq .Values.rbac.create true) (eq .Values.rbac.useClusterRole false) -}} 2 {{- range (join "," $.Values.namespaces) | split "," }} 3 --- 4 apiVersion: rbac.authorization.k8s.io/v1 5 kind: RoleBinding 6 metadata: 7 labels: 8 {{- include "kube-state-metrics.labels" $ | indent 4 }} 9 name: {{ template "kube-state-metrics.fullname" $ }} 10 namespace: {{ . }} 11 roleRef: 12 apiGroup: rbac.authorization.k8s.io 13 kind: Role 14 {{- if (not $.Values.rbac.useExistingRole) }} 15 name: {{ template "kube-state-metrics.fullname" $ }} 16 {{- else }} 17 name: {{ $.Values.rbac.useExistingRole }} 18 {{- end }} 19 subjects: 20 - kind: ServiceAccount 21 name: {{ template "kube-state-metrics.serviceAccountName" $ }} 22 namespace: {{ template "kube-state-metrics.namespace" $ }} 23 {{- end -}} 24 {{- end -}}