kubernetes-sigs / kubernetes-sigs/node-readiness-controller

[FEATURE] Make Helm chart configurable to satisfy Gatekeeper / Pod Security policies

Open Beginner friendly
#442 1 comment 0 reactions 0 assignees View on GitHub

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:

  1. automountServiceAccountToken is 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.
  2. No extraVolumes / extraVolumeMounts values. These are needed to inject a projected ServiceAccount token when automountServiceAccountToken: false. The controller uses rest.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: add serviceAccount.automountServiceAccountToken (default true), plus extraVolumes: [] and extraVolumeMounts: [] with a documented projected-token example.
  • templates/serviceaccount.yaml: render automountServiceAccountToken.
  • templates/deployment.yaml: render pod-level automountServiceAccountToken and wire extraVolumes / 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.crt causes TLS verification failure against the API server, so the full three-source volume is required.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.