2 changed files with 28 additions and 0 deletions
@ -0,0 +1,23 @@ |
|||||
|
{{- 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 }} |
||||
Loading…
Reference in new issue