role.yaml 904 B

123456789101112131415161718192021222324
  1. {{- if and .Values.serviceAccount.create .Values.rbac.create }}
  2. apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
  3. kind: Role
  4. metadata:
  5. name: {{ include "common.names.fullname" . }}
  6. namespace: {{ include "common.names.namespace" . | quote }}
  7. labels: {{- include "common.labels.standard" . | nindent 4 }}
  8. {{- if .Values.commonLabels }}
  9. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  10. {{- end }}
  11. {{- if .Values.commonAnnotations }}
  12. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  13. {{- end }}
  14. rules:
  15. - apiGroups:
  16. - ""
  17. resources:
  18. - endpoints
  19. verbs:
  20. - get
  21. {{- if .Values.rbac.rules }}
  22. {{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
  23. {{- end }}
  24. {{- end }}