test-role.yaml 586 B

1234567891011121314151617
  1. {{- if and .Values.testFramework.enabled .Values.rbac.pspEnabled -}}
  2. apiVersion: rbac.authorization.k8s.io/v1
  3. kind: Role
  4. metadata:
  5. name: {{ template "grafana.fullname" . }}-test
  6. namespace: {{ template "grafana.namespace" . }}
  7. annotations:
  8. "helm.sh/hook": test-success
  9. "helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
  10. labels:
  11. {{- include "grafana.labels" . | nindent 4 }}
  12. rules:
  13. - apiGroups: ['policy']
  14. resources: ['podsecuritypolicies']
  15. verbs: ['use']
  16. resourceNames: [{{ template "grafana.fullname" . }}-test]
  17. {{- end }}