23 lines
608 B
YAML
23 lines
608 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: kubecost-network-costs
|
|
annotations:
|
|
{{- if .Values.networkCosts.podSecurityPolicy.annotations }}
|
|
{{ toYaml .Values.networkCosts.podSecurityPolicy.annotations | indent 4 }}
|
|
{{- end }}
|
|
rules:
|
|
- apiGroups: ['extensions']
|
|
resources: ['podsecuritypolicies']
|
|
verbs: ['use']
|
|
resourceNames:
|
|
- kubecost-network-costs
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|