rolebinding.yaml 815 B

1234567891011121314151617181920212223
  1. {{- if and .Values.alertmanager.enabled .Values.rbac.create (eq .Values.alertmanager.useClusterRole false) -}}
  2. {{ range $.Values.alertmanager.namespaces }}
  3. apiVersion: {{ template "rbac.apiVersion" . }}
  4. kind: RoleBinding
  5. metadata:
  6. labels:
  7. {{- include "prometheus.alertmanager.labels" $ | nindent 4 }}
  8. name: {{ template "prometheus.alertmanager.fullname" $ }}
  9. namespace: {{ . }}
  10. subjects:
  11. - kind: ServiceAccount
  12. name: {{ template "prometheus.serviceAccountName.alertmanager" $ }}
  13. {{ include "prometheus.namespace" $ | indent 4 }}
  14. roleRef:
  15. apiGroup: rbac.authorization.k8s.io
  16. kind: Role
  17. {{- if (not $.Values.alertmanager.useExistingRole) }}
  18. name: {{ template "prometheus.alertmanager.fullname" $ }}
  19. {{- else }}
  20. name: {{ $.Values.alertmanager.useExistingRole }}
  21. {{- end }}
  22. {{- end }}
  23. {{ end }}