26 lines
690 B
YAML
26 lines
690 B
YAML
|
|
{{- 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 }}
|