You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
664 B
23 lines
664 B
{{- if .Values.networkPolicy.enabled }}
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: {{ include "portalmodelo.fullname" . }}-ingress
|
|
labels:
|
|
{{- include "portalmodelo.labels" . | nindent 4 }}
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
{{- include "portalmodelo.selectorLabels" . | nindent 6 }}
|
|
policyTypes:
|
|
- Ingress
|
|
ingress:
|
|
# Allow traffic from ingress controller namespace
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: {{ .Values.networkPolicy.ingressNamespace }}
|
|
# Allow traffic from same namespace
|
|
- from:
|
|
- podSelector: {}
|
|
{{- end }}
|
|
|