@@ -348,42 +348,6 @@ spec:
348348 port : 443
349349{{- end }}
350350
351- {{- if .Values.pii.enabled }}
352- ---
353- # Network Policy for the PII (Presidio) service
354- apiVersion : networking.k8s.io/v1
355- kind : NetworkPolicy
356- metadata :
357- name : {{ include "sim.fullname" . }}-pii
358- namespace : {{ .Release.Namespace }}
359- labels :
360- {{- include "sim.pii.labels" . | nindent 4 }}
361- spec :
362- podSelector :
363- matchLabels :
364- {{- include "sim.pii.selectorLabels" . | nindent 6 }}
365- policyTypes :
366- - Ingress
367- - Egress
368- ingress :
369- # Allow ingress from main application
370- - from :
371- - podSelector :
372- matchLabels :
373- {{- include "sim.app.selectorLabels" . | nindent 10 }}
374- ports :
375- - protocol : TCP
376- port : {{ .Values.pii.service.targetPort }}
377- egress :
378- # Allow DNS resolution. Models are baked into the image, so no external egress.
379- - to : []
380- ports :
381- - protocol : UDP
382- port : 53
383- - protocol : TCP
384- port : 53
385- {{- end }}
386-
387351{{- if .Values.telemetry.enabled }}
388352---
389353# Network Policy for OpenTelemetry Collector
@@ -515,3 +479,39 @@ spec:
515479 port : 53
516480{{- end }}
517481{{- end }}
482+
483+ {{- if .Values.pii.enabled }}
484+ ---
485+ # Network Policy for the PII (Presidio) service. Outside the networkPolicy.enabled guard: the service has no auth.
486+ apiVersion : networking.k8s.io/v1
487+ kind : NetworkPolicy
488+ metadata :
489+ name : {{ include "sim.fullname" . }}-pii
490+ namespace : {{ .Release.Namespace }}
491+ labels :
492+ {{- include "sim.pii.labels" . | nindent 4 }}
493+ spec :
494+ podSelector :
495+ matchLabels :
496+ {{- include "sim.pii.selectorLabels" . | nindent 6 }}
497+ policyTypes :
498+ - Ingress
499+ - Egress
500+ ingress :
501+ # Allow ingress from main application
502+ - from :
503+ - podSelector :
504+ matchLabels :
505+ {{- include "sim.app.selectorLabels" . | nindent 10 }}
506+ ports :
507+ - protocol : TCP
508+ port : {{ .Values.pii.service.targetPort }}
509+ egress :
510+ # Allow DNS resolution. Models are baked into the image, so no external egress.
511+ - to : []
512+ ports :
513+ - protocol : UDP
514+ port : 53
515+ - protocol : TCP
516+ port : 53
517+ {{- end }}
0 commit comments