Files
charts/yacy/templates/networkpolicy.yaml

26 lines
690 B
YAML
Raw Normal View History

2026-02-04 14:34:08 +02:00
{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "yacy.fullname" . }}
labels:
{{- include "yacy.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "yacy.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
ingress:
- from:
{{- if .Values.networkPolicy.ingressFrom }}
{{- toYaml .Values.networkPolicy.ingressFrom | nindent 8 }}
{{- else }}
- podSelector: {} # Allow from all pods in the same namespace
{{- end }}
ports:
- protocol: TCP
port: 8090
- protocol: TCP
port: 8443
{{- end }}