kubernetes-sigs / kubernetes-sigs/node-readiness-controller
[FEATURE] Make Helm chart configurable to satisfy Gatekeeper / Pod Security policies
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 164
- Forks
- 75
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 13
Description
Is your feature request related to a problem or existing issue? Please describe.
The charts/node-readiness-controller Helm chart has two configurability gaps that prevent it from passing common Gatekeeper (gatekeeper-library) constraints without manually editing templates:
automountServiceAccountTokenis neither set nor exposed. Several Gatekeeper policies require this field to be explicitly set on the ServiceAccount and/or pod spec. The chart does not render it anywhere today, so those constraints reject the workload.- No
extraVolumes/extraVolumeMountsvalues. These are needed to inject a projected ServiceAccount token whenautomountServiceAccountToken: false. The controller usesrest.InClusterConfig(), which requires token +ca.crt+ namespace at/var/run/secrets/kubernetes.io/serviceaccount, so there is currently no way to run token-free without patching templates.
Describe the solution you'd like
Expose the missing knobs in the chart:
values.yaml: addserviceAccount.automountServiceAccountToken(defaulttrue), plusextraVolumes: []andextraVolumeMounts: []with a documented projected-token example.templates/serviceaccount.yaml: renderautomountServiceAccountToken.templates/deployment.yaml: render pod-levelautomountServiceAccountTokenand wireextraVolumes/extraVolumeMounts.
Example for running with the token disabled (all three sources required, or InClusterConfig fails):
serviceAccount:
automountServiceAccountToken: false
extraVolumes:
- name: sa-token
projected:
sources:
- serviceAccountToken:
path: token
expirationSeconds: 3600
- configMap:
name: kube-root-ca.crt
items:
- key: ca.crt
path: ca.crt
- downwardAPI:
items:
- path: namespace
fieldRef:
fieldPath: metadata.namespace
extraVolumeMounts:
- name: sa-token
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
readOnly: true
Describe alternatives you've considered
- Keeping the chart as-is and having operators fork/patch templates to satisfy their policy — rejected as poor UX and hard to maintain.
- A token-only projected volume — does not work: missing
ca.crtcauses TLS verification failure against the API server, so the full three-source volume is required.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read values.yaml, templates/serviceaccount.yaml, and templates/deployment.yaml first. Add the documented ServiceAccount, pod, volume, and mount configuration described in the issue, including the projected-token example. Done means the chart exposes these values and renders them so the controller can satisfy the stated policies without template patches.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 86/100