Files
loki3-vector/helm/loki-stack/templates/networkpolicy.yaml
2026-04-06 21:36:15 +07:00

34 lines
864 B
YAML

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "loki-stack.fullname" . }}-allow-internal
labels:
{{- include "loki-stack.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "loki-stack.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
- Egress
ingress:
# Allow all traffic within the namespace
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
egress:
# Allow all traffic within the namespace
- to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: {{ .Release.Namespace }}
# Allow DNS
- to:
- namespaceSelector: {}
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53