[SIMPL-30451] Harden the probe pod against restricted Pod Security

The int cluster did not enforce Pod Security when this was written - no namespace labels, no Kyverno or Gatekeeper. The sandbox was NOT checked; there is no kubeconfig context for it. A cluster that does enforce it rejects the pod outright rather than degrading, which is slow to diagnose from an unrelated namespace.

Records the matching gap it cannot fix: PipesK8sClient builds the payload pod specs, and this service passes no securityContext through base_pod_spec, so a restricted namespace would admit the dispatcher and reject every payload it creates.

Changelog: changed
This commit is contained in:
ILay
2026-08-31 18:40:06 +02:00
parent 515eef7736
commit e686df5710

View File

@@ -43,6 +43,13 @@
# namespaced objects. That is the dry run declining to create the namespace it # namespaced objects. That is the dry run declining to create the namespace it
# would need, not a fault in the manifests; `--dry-run=client` passes clean. # would need, not a fault in the manifests; `--dry-run=client` passes clean.
# #
# LIMITATION under a restricted Pod Security namespace. This pod satisfies the
# restricted standard, but the payload Jobs do not: PipesK8sClient builds those
# pod specs and this service passes no securityContext through base_pod_spec, so
# such a namespace would admit the dispatcher and reject every payload it
# creates. Leave the probe namespace unlabelled, or add the fields to
# base_pod_spec in dispatch_external_work_k8s first.
#
# --- Reading the result ---------------------------------------------------- # --- Reading the result ----------------------------------------------------
# #
# kubectl -n distexec-probe logs -f job/pipes-probe # kubectl -n distexec-probe logs -f job/pipes-probe
@@ -133,10 +140,20 @@ spec:
runAsGroup: 1000 runAsGroup: 1000
# Makes the emptyDir writable by UID 1000, which DAGSTER_HOME needs. # Makes the emptyDir writable by UID 1000, which DAGSTER_HOME needs.
fsGroup: 1000 fsGroup: 1000
seccompProfile:
type: RuntimeDefault
containers: containers:
- name: dispatcher - name: dispatcher
image: gitea.dataprovider01.sandbox-cat-dat.simpl-europe.eu/j.r/distributed-execution:5122da4691f9 image: gitea.dataprovider01.sandbox-cat-dat.simpl-europe.eu/j.r/distributed-execution:5122da4691f9
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
# Satisfies the restricted Pod Security standard. The int cluster did
# not enforce it when this was written and the sandbox was not checked;
# a cluster that does enforce it rejects the pod outright.
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
command: command:
- dagster - dagster
- job - job