actions / actions/actions-runner-controller
Support official Kubernetes namespace selector label `kubernetes.io/metadata.name`
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.5k
- Forks
- 1.5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 27
Description
What would you like added?
as of kubernetes 1.21, all namespaces are automatically labeled by the control plane with kubernetes.io/metadata.name.
this label is intended to be used as a selector.
i therefore propose, that you update the helm chart to use kubernetes.io/metadata.name instead of name as the namespace selector label in the validating- / mutating webhook config:
Why is this needed?
the name label is very helm specific and may not be appropriate for all kubernetes clusters.
it is quite common not to use helm to actually deploy workloads in kubernetes but to use it as a templating engine in combination with a tool such as fluxcd or argocd.
consequently, namespace creation (especially in multi-tenanted clusters) may be done elsewhere (and by different teams) since namespaces may require custom labels and annotations to implement various admission restrictions and the like.
using the default kubernetes.io/metadata.name label doesn't make any assumptions about how namespaces are deployed and what (helm-specific) labels they posses. so this seems like a cleaner, more broadly applicable solution to me.
Additional context
n/a
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
Open charts/actions-runner-controller/templates/webhook_configs.yaml at the referenced selector near line 22, and inspect both the validating and mutating webhook configurations. Update the namespace selector to use the official Kubernetes metadata label, then verify that both rendered configurations use the proposed label instead of the Helm-specific one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- infrastructure
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100