-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Support global.nodeSelector in the Helm chart #7817
Description
Feature Request: Support global.nodeSelector in the Helm chart to reduce configuration duplication
Is this a BUG REPORT or FEATURE REQUEST?: FEATURE REQUEST
Description:
Currently, the cert-manager Helm chart requires the nodeSelector to be specified individually for each component that creates pods (controller, cainjector, webhook, startupapicheck).
In many common scenarios, users want all cert-manager components to be scheduled on the same set of nodes (e.g., nodes dedicated to "cluster-services" or infrastructure workloads). To achieve this today, the user must duplicate the nodeSelector configuration across multiple sections in their values.yaml file.
This leads to a configuration that is not DRY (Don't Repeat Yourself), is more verbose than necessary, and increases the chance of error if a user forgets to update the selector for one of the components.
Example of current duplicated configuration:
# values.yaml
#
# To schedule all components on a specific node pool, one must currently do this:
nodeSelector:
workload: "cluster-services"
cainjector:
nodeSelector:
workload: "cluster-services"
webhook:
nodeSelector:
workload: "cluster-services"
startupapicheck:
nodeSelector:
workload: "cluster-services"Proposed Solution:
I propose adding a new global.nodeSelector value to the Helm chart.
This global value would serve as a fallback. The scheduling logic for each component's pods should be:
- If a component-specific
nodeSelectoris defined (e.g.,webhook.nodeSelector), use it. This preserves the ability to schedule components differently if needed. - If a component-specific
nodeSelectoris not defined, use theglobal.nodeSelectorif it is defined. - If neither is defined, do not add a
nodeSelectorto the pod spec (current default behavior).
PR
I'm happy to work on this and will submit a PR shortly
/kind feature