This commit is contained in:
Waylon S. Walker 2025-02-23 09:34:01 -06:00
parent 5507c7c7dc
commit 01e146db7c
6 changed files with 129 additions and 8 deletions

View file

@ -0,0 +1,31 @@
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ .Values.name }}
namespace: {{ .Values.namespace | default .Values.name }}
labels:
service: {{ .Values.name }}
spec:
podSelector:
matchLabels:
service: {{ .Values.name }}
policyTypes:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
name: ingress-nginx
ports:
- protocol: TCP
port: {{ .Values.port }}
egress:
- to:
- namespaceSelector: {}
podSelector: {}
ports:
- protocol: TCP
port: 53
- protocol: UDP
port: 53