Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/sim/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: sim
description: A Helm chart for Sim - the open-source AI workspace where teams build, deploy, and manage AI agents
type: application
version: 1.11.18
version: 1.11.19
appVersion: "v0.8.26"
kubeVersion: ">=1.25.0-0"
home: https://sim.ai
Expand Down
72 changes: 36 additions & 36 deletions helm/sim/templates/networkpolicy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -348,42 +348,6 @@ spec:
port: 443
{{- end }}

{{- if .Values.pii.enabled }}
---
# Network Policy for the PII (Presidio) service
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "sim.fullname" . }}-pii
namespace: {{ .Release.Namespace }}
labels:
{{- include "sim.pii.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "sim.pii.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
- Egress
ingress:
# Allow ingress from main application
- from:
- podSelector:
matchLabels:
{{- include "sim.app.selectorLabels" . | nindent 10 }}
ports:
- protocol: TCP
port: {{ .Values.pii.service.targetPort }}
egress:
# Allow DNS resolution. Models are baked into the image, so no external egress.
- to: []
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
{{- end }}

{{- if .Values.telemetry.enabled }}
---
# Network Policy for OpenTelemetry Collector
Expand Down Expand Up @@ -515,3 +479,39 @@ spec:
port: 53
{{- end }}
{{- end }}

{{- if .Values.pii.enabled }}
---
# Network Policy for the PII (Presidio) service. Outside the networkPolicy.enabled guard: the service has no auth.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "sim.fullname" . }}-pii
namespace: {{ .Release.Namespace }}
labels:
{{- include "sim.pii.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "sim.pii.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
- Egress
ingress:
# Allow ingress from main application
- from:
- podSelector:
matchLabels:
{{- include "sim.app.selectorLabels" . | nindent 10 }}
ports:
- protocol: TCP
port: {{ .Values.pii.service.targetPort }}
egress:
# Allow DNS resolution. Models are baked into the image, so no external egress.
- to: []
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
{{- end }}
20 changes: 14 additions & 6 deletions helm/sim/tests/pii_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,27 @@ tests:
- protocol: TCP
port: 5001

- it: renders a dedicated NetworkPolicy for the PII service
- it: confines the PII service to app pods even when networkPolicy.enabled=false
template: networkpolicy.yaml
set:
networkPolicy.enabled: true
pii.enabled: true
documentSelector:
path: metadata.name
value: t-sim-pii
asserts:
- isKind: { of: NetworkPolicy }
- hasDocuments: { count: 1 }
- equal:
path: spec.podSelector.matchLabels["app.kubernetes.io/component"]
value: pii
- equal:
path: spec.ingress
value:
- from:
- podSelector:
matchLabels:
app.kubernetes.io/name: sim
app.kubernetes.io/instance: t
app.kubernetes.io/component: app
ports:
- protocol: TCP
port: 5001

- it: pii pod inherits global tolerations (not component-scoped)
template: deployment-pii.yaml
Expand Down
3 changes: 3 additions & 0 deletions helm/sim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,9 @@ ollama:
# Guardrails PII block and configured data-retention masking work. Set
# app.env.INTERNAL_API_BASE_URL to the in-cluster app service URL (the redaction path calls the app's own
# /api/guardrails/mask-batch, which must be reachable from inside the cluster).
# The service has no authentication, so its NetworkPolicy (ingress from app pods
# only, DNS-only egress) renders whenever pii.enabled, even when
# networkPolicy.enabled is false. Your CNI must enforce NetworkPolicy for it to apply.
pii:
# Enable/disable the PII redaction service
enabled: false
Expand Down
Loading