rancher-partner-charts/charts/kubecost/cost-analyzer/1.105.2/templates/cost-analyzer-psp-rolebindi...

22 lines
679 B
YAML

{{- if .Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy" }}
{{- if .Values.podSecurityPolicy }}
{{- if .Values.podSecurityPolicy.enabled }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "cost-analyzer.fullname" . }}-psp
namespace: {{ .Release.Namespace }}
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 6 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "cost-analyzer.fullname" . }}-psp
subjects:
- kind: ServiceAccount
name: {{ template "cost-analyzer.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}