jenkins

by HelmForge

Helm chartv1.0.13App 2.580.2Apache-2.0Verified publisher

Jenkins Helm Chart with secure controller defaults, JCasC, plugin bootstrap, Gateway API, and Kubernetes agent RBAC

About this chart

Jenkins

Jenkins is an open source automation server for continuous integration and delivery.

This HelmForge chart deploys the official jenkins/jenkins controller image at the pinned 2.580.2-lts-jdk21 release with production-oriented Kubernetes defaults. It includes a StatefulSet controller, persistent Jenkins home, secure initial admin bootstrap, optional Jenkins Configuration as Code, optional plugin installation with jenkins-plugin-cli, optional RBAC for Kubernetes agents, dual-stack Service support, Gateway API, Ingress, NetworkPolicy, ExternalSecret, ServiceMonitor, PodDisruptionBudget, and Helm tests.

Jenkins 2.580.2 is the latest LTS line after 2.580.1 and retains the core fixes in the September 2 security advisory. The chart retains the LTS/JDK 21 distribution and existing plugin configuration. Before upgrading, back up JENKINS_HOME, update installed plugins, and review the 2.580.x upgrade guide, especially for offline controllers that may need detached plugins installed explicitly.

NetworkPolicy supports networkPolicy.egress.extraEgress for appending custom egress rules without replacing the chart-generated DNS, cluster, internet, and networkPolicy.egress.extraRules controls.

Features

  • Single-controller StatefulSet with stable JENKINS_HOME storage identity.
  • Official Jenkins LTS image pinned to a JDK 21 tag.
  • Stable chart-generated admin credentials during live Helm operations, or operator-managed Secret keys for rendered GitOps workflows.
  • Optional Configuration as Code and pinned plugin bootstrap.
  • Optional namespaced RBAC for Kubernetes plugin agents.
  • Ingress and Gateway API routing with a named HTTP service target port.
  • Optional inbound TCP agent listener, NetworkPolicy, ServiceMonitor, PDB, and External Secrets integration.
  • Dual-stack Service controls and scheduling overrides for production clusters.

Architecture

The chart runs one Jenkins controller because JENKINS_HOME is a single-writer application data boundary. A StatefulSet preserves controller and PVC identity. The HTTP Service exposes the web UI, and the same Service can expose the inbound agent port. Ingress or an HTTPRoute can route HTTP traffic to the named service port. Optional plugin installation runs before the controller, while JCasC files and the initial admin script come from the chart ConfigMap.

Kubernetes agents are created by Jenkins and are not chart workloads. Enable rbac.create only when the controller must manage agent Pods in its namespace. See DESIGN.md for trust boundaries and docs/production.md for operational guidance.

Install

helm repo add helmforge https://repo.helmforge.dev
helm install jenkins helmforge/jenkins

Configuration

The defaults install a persistent, single-replica controller with generated initial admin credentials. The following settings define the primary user contract; run helm show values helmforge/jenkins for the complete annotated values file.

ParameterDefaultDescription
image.repositorydocker.io/jenkins/jenkinsOfficial controller image repository.
image.tag2.580.2-lts-jdk21Pinned Jenkins LTS and JDK 21 image tag.
controller.httpPort8080Real Jenkins HTTP listener port.
controller.agentPort50000Real inbound agent listener port.
service.httpPort8080Cluster Service HTTP port.
agent.enabledtrueExpose the inbound agent listener.
agent.servicePort50000Cluster Service port for inbound agents.
admin.createtrueBootstrap the initial admin account.
admin.existingSecret""Use an operator-managed admin Secret.
persistence.enabledtruePersist JENKINS_HOME.
persistence.size8GiDefault Jenkins home claim size.
plugins.install.enabledfalseInstall the pinned plugin list before startup.
plugins.install.initializeOncetrueReuse the initialized plugin state on the PVC.
jcasC.enabledfalseMount and activate JCasC scripts.
ingress.enabledfalseRender an Ingress.
gateway.enabledfalseRender a Gateway API HTTPRoute.
networkPolicy.enabledfalseRender controller network boundaries.
rbac.createfalseGrant namespaced permissions for Kubernetes agents.
metrics.serviceMonitor.enabledfalseRender a Prometheus Operator ServiceMonitor.
externalSecrets.enabledfalseRender an ExternalSecret for admin credentials.

Listener and Service ports are intentionally separate. Changing controller.httpPort changes the Jenkins process and Pod probe target; changing only service.httpPort changes the Service-facing port. Do not set --httpPort in controller.jenkinsOpts; a user-supplied argument takes precedence over the generated argument while the container port and probes still use controller.httpPort. If an existing deployment already supplies that argument, its value must exactly match controller.httpPort.

Admin Credentials

By default the chart creates an initial admin user and stores the generated password in a Kubernetes Secret:

kubectl get secret jenkins-admin -o jsonpath='{.data.jenkins-admin-password}' | base64 -d

Use admin.existingSecret with admin.existingSecretUserKey and admin.existingSecretPasswordKey to manage credentials externally. Generated credentials remain stable when Helm can look up the live Secret during an install or upgrade. Offline rendering cannot perform that lookup, so GitOps workflows that render manifests before applying them must use admin.existingSecret or externalSecrets to avoid Secret and Jenkins credential drift. When externalSecrets.enabled=true, admin.existingSecret is required and becomes the target Secret name managed by the ExternalSecret.

Examples

Production, JCasC, Gateway API, and External Secrets examples are maintained in the examples/ directory. Download the production values file, review every credential, storage, resource, and network setting, and create the Secret it references before installation:

helm repo update
JENKINS_CHART_VERSION="$(helm search repo helmforge/jenkins --versions | awk 'NR == 2 { print $2; exit }')"
test -n "${JENKINS_CHART_VERSION}"
curl -fsSLo jenkins-production-values.yaml \
  "https://raw.githubusercontent.com/helmforgedev/charts/jenkins-v${JENKINS_CHART_VERSION}/charts/jenkins/examples/production.yaml"
kubectl create namespace jenkins --dry-run=client -o yaml | kubectl apply -f -
kubectl create secret generic jenkins-admin \
  --namespace jenkins \
  --from-literal=jenkins-admin-user=admin \
  --from-literal=jenkins-admin-password='replace-with-a-strong-password'
helm upgrade --install jenkins helmforge/jenkins \
  --namespace jenkins \
  --version "${JENKINS_CHART_VERSION}" \
  --values jenkins-production-values.yaml

Plugins and JCasC

The chart can install pinned plugins before Jenkins starts:

plugins:
  install:
    enabled: true
    initializeOnce: true
    list:
      - kubernetes:4423.vb_59f230b_ce53
      - workflow-aggregator:608.v67378e9d3db_1
      - git:5.10.1
      - configuration-as-code:2074.va_57f83f7a_10b_

JCasC files can be mounted and activated with jcasC.enabled=true. The configuration-as-code plugin must be included in the image or installed through the plugin bootstrap.

Ingress

ingress:
  enabled: true
  ingressClassName: nginx
  hosts:
    - host: jenkins.example.com
      paths:
        - path: /
          pathType: Prefix

Gateway API

gateway:
  enabled: true
  parentRefs:
    - name: public
  hostnames:
    - jenkins.example.com

Validation

This chart is tested with Helm lint, strict lint, Helm unittest, kubeconform, Artifact Hub lint, markdown lint, security scans, and k3d runtime validation.

Troubleshooting

  • If Jenkins remains unready, inspect the controller logs and confirm the configured HTTP listener matches controller.httpPort.
  • If plugin initialization fails, verify update-center egress and every pinned coordinate in plugins.install.list. Existing initialized homes skip the installer while initializeOnce=true.
  • If JCasC is ignored, ensure the Configuration as Code plugin is installed and that jcasC.configScripts contains at least one entry.
  • If Kubernetes agents cannot start, verify rbac.create, the controller ServiceAccount, API-server egress, and any agent-specific Jenkins cloud configuration.
  • If an upgrade changes credentials unexpectedly, restore the prior Secret or configure admin.existingSecret before retrying. Back up JENKINS_HOME before core or plugin changes.

Security Scan: jenkins

FrameworkScore
MITRE + NSA + SOC291.41%

Security posture acceptable with controller security contexts, non-root execution, optional NetworkPolicy, and operator-controlled plugin/JCasC inputs.

Documentation

  • Design
  • Production guide
  • Networking
  • External Secrets
  • JCasC and plugins

Deploy jenkins with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has jenkins on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartjenkins is pinned at v1.0.13 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply