37 lines
886 B
YAML
37 lines
886 B
YAML
|
{{- if .Values.networkCosts }}
|
||
|
{{- if .Values.networkCosts.enabled }}
|
||
|
{{- if .Values.networkCosts.podSecurityPolicy }}
|
||
|
{{- if .Values.networkCosts.podSecurityPolicy.enabled }}
|
||
|
apiVersion: {{ include "cost-analyzer.podSecurityPolicy.apiVersion" . }}
|
||
|
kind: PodSecurityPolicy
|
||
|
metadata:
|
||
|
name: kubecost-network-costs
|
||
|
spec:
|
||
|
privileged: true
|
||
|
hostNetwork: true
|
||
|
allowedHostPaths:
|
||
|
{{- if .Values.networkCosts.hostProc }}
|
||
|
- pathPrefix: {{ default "/proc" .Values.networkCosts.hostProc.hostPath }}
|
||
|
readOnly: false
|
||
|
{{- else }}
|
||
|
- pathPrefix: /proc
|
||
|
readOnly: false
|
||
|
{{- end }}
|
||
|
hostPorts:
|
||
|
- min: 1
|
||
|
max: 65535
|
||
|
seLinux:
|
||
|
rule: RunAsAny
|
||
|
supplementalGroups:
|
||
|
rule: RunAsAny
|
||
|
runAsUser:
|
||
|
rule: RunAsAny
|
||
|
fsGroup:
|
||
|
rule: RunAsAny
|
||
|
volumes:
|
||
|
- '*'
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|