Skip to content

Controller: default nodeSelector for agent Deployments (parallel to --default-agent-pod-labels) #2258

Closed

Description

@elihai-risk

Problem

The controller supports --default-agent-pod-labels (DEFAULT_AGENT_POD_LABELS), applied to every agent pod template, but there is no equivalent for nodeSelector. spec.declarative.deployment.nodeSelector exists per-Agent, but agents created through the dashboard wizard carry no nodeSelector at all.

In clusters with admission policies that require a nodeSelector on every Deployment (a common Gatekeeper/Kyverno pattern for cost/scheduling governance), every wizard-created agent Deployment is denied at admission. Cluster operators currently have to work around this with an external mutation webhook (we use a Gatekeeper Assign scoped to the agents namespace).

Proposal

Add --default-agent-node-selector (DEFAULT_AGENT_NODE_SELECTOR), same comma-separated key=value format and precedence semantics as --default-agent-pod-labels: applied to all agent Deployments, per-Agent deployment.nodeSelector wins.

Chart-side this would surface naturally as controller.agentDeployment.nodeSelector, next to the existing agentDeployment.podLabels / agentDeployment.serviceAccountName.

Happy to send a PR if this direction is acceptable.

Activity

  1. added a commit that references this issue on Jul 15, 2026
    32e3cdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions