Skip to content

feat(jenkins): add agentInjection support to pod template#1650

Open
elkh510 wants to merge 4 commits intojenkinsci:mainfrom
elkh510:feat/agent-injection-support
Open

feat(jenkins): add agentInjection support to pod template#1650
elkh510 wants to merge 4 commits intojenkinsci:mainfrom
elkh510:feat/agent-injection-support

Conversation

@elkh510
Copy link
Copy Markdown

@elkh510 elkh510 commented Apr 1, 2026

Summary

Expose the agentInjection property from the Kubernetes plugin PodTemplate in the Helm chart values.

This allows users to configure the "Inject Jenkins agent in agent container" option via values.yaml:

agent:
  agentInjection: true

Instead of manually setting it in the Jenkins UI (Manage Jenkins → Clouds → Kubernetes → Pod Templates → default).

Changes

  • charts/jenkins/values.yaml: Added agent.agentInjection (default: false)
  • charts/jenkins/templates/_helpers.tpl: Render agentInjection in the pod template JCasC config

Motivation

Using agentInjection avoids version drift between the Jenkins controller and the agent by injecting the agent into the agent container instead of using a separate jnlp sidecar. Currently this option can only be set via the UI, which is not compatible with GitOps/IaC workflows.

Fixes #1343

Expose the agentInjection property from the Kubernetes plugin
PodTemplate in the Helm chart values. This allows users to configure
the 'Inject Jenkins agent in agent container' option via values.yaml
instead of manually setting it in the UI.

Fixes jenkinsci#1343
@elkh510 elkh510 requested a review from a team as a code owner April 1, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to configure agentInjection property using latest helm chart

1 participant