blob: 195b068d154d2437aaadc9d2bb7f13ddd72f5e58 [file] [log] [blame]
{{- if .Values.networkPolicy.enabled }}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1 {{ include "nacos.networkPolicy.apiVersion" . }}
metadata:
name: {{ include "nacos.fullname" . }}
namespace: {{ template "nacos.namespace" . }}
labels: {{- include "nacos.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels: {{- include "nacos.matchLabels" . | nindent 6 }}
policyTypes:
- Ingress
ingress:
- ports:
- port: {{ .Values.service.port }}
from:
- podSelector:
matchLabels:
{{ include "nacos.fullname" . }}-client: "true"
- podSelector:
matchLabels: {{- include "nacos.matchLabels" . | nindent 14 }}
- ports:
- port: {{ .Values.service.port }}
from:
- podSelector:
matchLabels: {{- include "nacos.matchLabels" . | nindent 14 }}
{{- end }}