add back netpol without egress

This commit is contained in:
Waylon S. Walker 2025-02-23 20:48:23 -06:00
parent 93e8b9a6c5
commit a27e9e871f

View file

@ -1,26 +1,27 @@
# 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:
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: {}
# TODO, optionally add egress restriction.
# - to:
# - namespaceSelector: {}
# podSelector: {}