From 840e21b9cc8b7a8a4d44a1e8d1a6113f45dd6178 Mon Sep 17 00:00:00 2001 From: "Ahmed, Mushtaq" Date: Fri, 25 Sep 2026 23:08:47 -0600 Subject: [PATCH] fix(litellm): allow root seed initContainer under restricted PSS The litellm namespace inherited the cluster-default restricted PSS, which blocks the deliberate root prisma-engine-seed initContainer, so the deployment could not schedule. Stamp the namespace with baseline PSS (as keycloak does), scoped to that namespace only. --- roles/litellm/tasks/install.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/roles/litellm/tasks/install.yaml b/roles/litellm/tasks/install.yaml index 79aef0c..250388c 100644 --- a/roles/litellm/tasks/install.yaml +++ b/roles/litellm/tasks/install.yaml @@ -104,6 +104,22 @@ name: "{{ litellm_namespace }}" state: present + # baseline (not restricted): the prisma-engine-seed initContainer must run as + # root to read the engines baked into /root at image build time (see below). + - name: "litellm | Label namespace — PSS" + kubernetes.core.k8s: + state: present + definition: + apiVersion: v1 + kind: Namespace + metadata: + name: "{{ litellm_namespace }}" + labels: + pod-security.kubernetes.io/enforce: "baseline" + pod-security.kubernetes.io/audit: "restricted" + pod-security.kubernetes.io/warn: "restricted" + when: enforce_pss | default(false) | bool + # ReferenceGrant allows Envoy Gateway SecurityPolicy (in gateway namespace) # to reference the LiteLLM service (in litellm namespace) for extAuth. # Must be created after namespace exists — moved here from envoy_gateway role.