Configure pod and container security contexts for ADH Cloud services
ADH Cloud allows you to configure security contexts for pods and containers:
-
podSecurityContextapplies to the whole pod and controls process identity and volume ownership. -
securityContextapplies to one container and controls its identity, capabilities, privilege escalation, and root filesystem mode.
When a context is omitted, the product operator or ADC renderer applies its product default. An explicit context is passed through as a complete override: missing fields are not merged from the default.
| Product | Component | Default UID/GID |
|---|---|---|
Impala |
Catalog, Coordinator, Executor, Statestore |
1000 |
Spark |
Spark-submit job, Driver, Executor, Spark History Server |
185 |
Trino |
Coordinator, Worker |
1001 |
YuniKorn |
Scheduler, Web UI |
4444 |
Celeborn |
Master, Worker |
10006 |
Optional explicit contexts can be added to the following configuration parameter paths:
-
ImpalaCluster —
spec.catalog,spec.coordinator,spec.executor,spec.statestore; -
SparkApplication —
spec.job,spec.driver,spec.executor; -
SparkHistoryServer —
spec.server; -
TrinoCluster —
spec.coordinator,spec.worker; -
Celeborn —
spec.master,spec.worker; -
YuniKorn —
spec.podSecurityContextandspec.securityContextfor the shared pod and scheduler;spec.web.securityContextfor web UI.
For example, an explicit Trino coordinator override that preserves the product identity can be written as:
spec:
coordinator:
podSecurityContext:
runAsUser: 1001
runAsGroup: 1001
runAsNonRoot: true
supplementalGroups: [1001]
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
securityContext:
capabilities:
drop: [ALL]
privileged: false
runAsUser: 1001
runAsGroup: 1001
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
The Impala, Spark, and Trino product charts expose the same two maps under their component
names. The YuniKorn chart uses podSecurityContext, schedulerSecurityContext,
webSecurityContext, admissionPodSecurityContext, and
admissionContainerSecurityContext.
Helm values are empty by default and are not rendered until the user fills them. Examples that preserve the product identity must use the UID/GID from the table above.
When changing UID/GID, check PVC and hostPath ownership, secret file modes, and writable
paths required by a read-only root filesystem. For the YuniKorn Unix socket, keep the
scheduler and web UI group access compatible. A shared pod-level fsGroup is the simplest
option.