github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/prometheus-community/prometheus-adapter/templates/custom-metrics-cluster-role-binding-hpa.yaml (about) 1 {{- /* 2 This if must be aligned with custom-metrics-cluster-role.yaml 3 as otherwise this binding will point to not existing role. 4 */ -}} 5 {{- if and .Values.rbac.create (or .Values.rules.default .Values.rules.custom) -}} 6 apiVersion: rbac.authorization.k8s.io/v1 7 kind: ClusterRoleBinding 8 metadata: 9 {{- if .Values.customAnnotations }} 10 annotations: 11 {{- toYaml .Values.customAnnotations | nindent 4 }} 12 {{- end }} 13 labels: 14 {{- include "k8s-prometheus-adapter.labels" . | indent 4 }} 15 name: {{ template "k8s-prometheus-adapter.name" . }}-hpa-controller 16 roleRef: 17 apiGroup: rbac.authorization.k8s.io 18 kind: ClusterRole 19 name: {{ template "k8s-prometheus-adapter.name" . }}-server-resources 20 subjects: 21 - kind: ServiceAccount 22 name: {{ template "k8s-prometheus-adapter.serviceAccountName" . }} 23 namespace: {{ include "k8s-prometheus-adapter.namespace" . | quote }} 24 {{- end -}}