25 lines
745 B
YAML
25 lines
745 B
YAML
{{- if .Values.networkCosts }}
|
|
{{- if .Values.networkCosts.enabled }}
|
|
{{- if .Values.networkCosts.podSecurityPolicy }}
|
|
{{- if .Values.networkCosts.podSecurityPolicy.enabled }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ template "cost-analyzer.fullname" . }}-network-costs
|
|
labels:
|
|
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
|
|
annotations:
|
|
{{- if .Values.networkCosts.podSecurityPolicy.annotations }}
|
|
{{ toYaml .Values.networkCosts.podSecurityPolicy.annotations | indent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
- apiGroups: ['extensions']
|
|
resources: ['podsecuritypolicies']
|
|
verbs: ['use']
|
|
resourceNames:
|
|
- {{ template "cost-analyzer.fullname" . }}-network-costs
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|