{{- if .Values.networkPolicy -}} {{- if .Values.networkPolicy.enabled -}} apiVersion: {{ include "cost-analyzer.networkPolicy.apiVersion" . }} kind: NetworkPolicy metadata: name: deny-egress labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} spec: podSelector: matchLabels: {{ include "cost-analyzer.selectorLabels" . | nindent 6 }} policyTypes: - Egress egress: - to: - namespaceSelector: {} {{- end -}} {{- end -}}