networkpolicy-egress.yaml 983 B

12345678910111213141516171819202122
  1. {{- if and .Values.networkPolicy.enabled .Values.networkPolicy.egressRules.customRules }}
  2. kind: NetworkPolicy
  3. apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }}
  4. metadata:
  5. name: {{ printf "%s-egress" (include "common.names.fullname" .) }}
  6. namespace: {{ .Release.Namespace | quote }}
  7. labels: {{- include "common.labels.standard" . | nindent 4 }}
  8. {{- if .Values.commonLabels }}
  9. {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
  10. {{- end }}
  11. {{- if .Values.commonAnnotations }}
  12. annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
  13. {{- end }}
  14. spec:
  15. podSelector:
  16. matchLabels:
  17. {{- include "common.labels.matchLabels" . | nindent 6 }}
  18. policyTypes:
  19. - Egress
  20. egress:
  21. {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.egressRules.customRules "context" $) | nindent 4 }}
  22. {{- end }}