# helm_charts_psp-halyard-role.yaml
{{- if .Values.rbac.pspEnabled }}
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: {{ template "spinnaker.fullname" . }}-halyard-psp
  labels:
{{ include "spinnaker.standard-labels" . | indent 4 }}
rules:
- apiGroups: ['extensions']
  resources: ['podsecuritypolicies']
  verbs:     ['use']
  resourceNames:
  - {{ template "spinnaker.fullname" . }}-halyard
{{- end }}