bug(helm): certgen hook is rejected by Restricted Pod Security
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- helm, kubernetes
- Ambito
- devops, infrastructure, security
Direzione di ricerca
Inizia con il template del chart Helm di OpenShell che esegue il rendering del certgen Job e confrontalo con i security context configurabili del pod e del container del gateway. Esegui helm template usando le impostazioni di riproduzione, quindi esamina i test del chart. Il lavoro è completo quando l’hook renderizzato per impostazione predefinita supera Restricted admission, espone override specifici per certgen ed è coperto da test senza richiedere una migrazione per le installazioni esistenti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
User Story
As a Kubernetes platform operator enforcing the Restricted Pod Security Standard on controller namespaces, I want the OpenShell Helm chart's certificate-generation hook to pass admission, so that I can install the gateway without weakening the namespace security policy.
Problem Statement
OpenShell Helm chart 0.0.116 renders Job/<release>-certgen without a pod securityContext and without runAsNonRoot or seccompProfile on its container. The container already drops all capabilities and disables privilege escalation, but Kubernetes Restricted Pod Security admission still rejects the hook for the missing non-root and seccomp settings.
The main gateway workload can already be configured with podSecurityContext and securityContext; the certgen hook does not inherit those settings and exposes no equivalent values.
Impact / Why This Matters
The pre-install/pre-upgrade hook blocks the entire Helm release in a namespace labeled pod-security.kubernetes.io/enforce: restricted. Operators must either weaken admission for the trusted gateway namespace or carry a Flux/Helm post-render patch for a security-sensitive hook. The post-render workaround is coupled to the hook resource name and container position and can silently stop matching after a chart refactor unless it is separately tested.
Acceptance Criteria
- A default
helm templaterender of the certgen Job satisfies the Restricted Pod Security Standard for the chart's supported Kubernetes versions. - The certgen pod and container run as non-root and declare a Restricted-compatible seccomp profile.
- The chart exposes certgen-specific pod/container security-context values if operators need to override the defaults.
- Chart tests cover the rendered certgen security context.
- Existing installs that do not enforce Pod Security continue to upgrade without manual migration.
Reproduction Steps
- Create a namespace with
pod-security.kubernetes.io/enforce: restricted(tested with policy versionv1.36). - Install OpenShell chart
0.0.116with Agent Sandbox available andpkiInitJob.enabled: true. - Observe that
Job/<release>-certgenis rejected by Pod Security admission for missingrunAsNonRootandseccompProfilefields. - Render the chart and compare the certgen Job with the configurable gateway StatefulSet security contexts.
Environment
- OpenShell Helm chart:
0.0.116, OCI digestsha256:df55cd1538bdfb7836834c30dfcf8373b85ffea83bbfd70d50dbe69407a0d2b3 - Kubernetes:
v1.36.4 - Distribution: Talos Linux
v1.13.9 - Deployment: Flux HelmRelease, Kubernetes Agent Sandbox driver
Logs
The rendered certgen container has allowPrivilegeEscalation: false and drops ALL, but neither the pod nor container declares runAsNonRoot or seccompProfile. Restricted admission reports those missing fields under the restricted policy.
- Lingua principale
- Rust
- Stelle
- 8.7k
- Fork
- 1.3k
- Merge medio
- 2g 6h
- PR unite (30g)
- 297
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/OpenShell
-
area:docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
state:triage-needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:cli state:validated
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
state:triage-needed
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
area:build spike state:review-ready state:stale
Difficoltà 2/5 Mezza giornata Idoneità per principianti 68/100
Tutte le issue di NVIDIA/OpenShell
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
state:needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
zed-industries/zed#64680 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
RustPython/RustPython#8802 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2390 ·