networkpolicy-egress.yaml 616 B

12345678910111213141516171819
  1. {{- if and .Values.networkPolicy.enabled .Values.networkPolicy.egressRules.customRules }}
  2. apiVersion: networking.k8s.io/v1
  3. kind: NetworkPolicy
  4. metadata:
  5. name: {{ printf "%s-egress" (include "kafka-ui.fullname" .) }}
  6. namespace: {{ .Release.Namespace }}
  7. labels:
  8. {{- include "kafka-ui.labels" . | nindent 4 }}
  9. spec:
  10. podSelector:
  11. matchLabels:
  12. {{- include "kafka-ui.selectorLabels" . | nindent 6 }}
  13. policyTypes:
  14. - Egress
  15. egress:
  16. {{- if .Values.networkPolicy.egressRules.customRules }}
  17. {{- toYaml .Values.networkPolicy.egressRules.customRules | nindent 4 }}
  18. {{- end }}
  19. {{- end }}