blob: 5a2089f9b15d7651ba89c361ffab2a6b1573d7a6 [file] [log] [blame]
{{- if .Values.networkPolicy.enabled }}
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "tika-helm.fullname" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "tika-helm.selectorLabels" . | nindent 6 }}
egress:
- {}
ingress:
- ports:
- port: {{ .Values.service.port }}
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
matchLabels:
{{ template "tika-helm.fullname" . }}-client: "true"
{{- end }}
{{- end }}