1 {{- if and .Values.networkPolicy.enabled (or .Values.networkPolicy.egressRules.denyConnectionsToExternal .Values.networkPolicy.egressRules.customRules) }}
2 apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
5 name: {{ printf "%s-egress" (include "common.names.fullname" .) }}
6 namespace: {{ .Release.Namespace }}
7 labels: {{- include "common.labels.standard" . | nindent 4 }}
8 {{- if .Values.commonLabels }}
9 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
11 {{- if .Values.commonAnnotations }}
12 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
16 matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
20 {{- if .Values.networkPolicy.egressRules.denyConnectionsToExternal }}
27 - namespaceSelector: {}
29 {{- if .Values.networkPolicy.egressRules.customRules }}
30 {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.egressRules.customRules "context" $) | nindent 4 }}