Added YaCy chart
This commit is contained in:
26
yacy/templates/networkpolicy.yaml
Normal file
26
yacy/templates/networkpolicy.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
{{- 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 }}
|
||||
Reference in New Issue
Block a user