Skip to content

Customize controller pods

Use spec.podOverrides for supported pod settings. Use spec.resourceOverlay only when no typed field can express the required StatefulSet, Service, or Ingress patch.

apiVersion: varroa.dev/v1alpha1
kind: Controller
metadata:
name: demo
namespace: teams-platform
spec:
podOverrides:
jvmOpts: -XX:MaxRAMPercentage=75 -Duser.timezone=UTC
env:
- name: HTTP_PROXY
value: http://proxy.example.com:3128
volumes:
- name: ca-bundle
configMap:
name: organization-ca
volumeMounts:
- name: ca-bundle
mountPath: /etc/organization-ca
readOnly: true
nodeSelector:
workload: jenkins
FieldTarget
env, envFromJenkins container
volumesPod
volumeMountsJenkins container
podLabels, podAnnotationsPod template metadata
labels, annotationsStatefulSet metadata
jvmOptsJenkins Java options
nodeSelector, tolerations, affinityScheduling
securityContextPod security context

Environment variables, volumes, and mounts merge by name. Prefer controller fields such as resources, persistence, ingressSpec, and probes when available.

spec.probes controls startup, readiness, and liveness timing. Set disabled: true to omit one probe.

ProbeInitial delayPeriodTimeoutFailure threshold
Startup10s10s5s30
Readiness0s10s5s3
Liveness0s10s5s6

Timing fields have CRD bounds. Kubernetes requires successThreshold: 1 for startup and liveness probes.

Each value is strategic-merge-patch YAML:

spec:
resourceOverlay:
statefulSet: |
spec:
template:
spec:
containers:
- name: jenkins
resources:
limits:
ephemeral-storage: 4Gi
service: |
metadata:
annotations:
service.example.com/internal: "true"

Overlays apply last and can replace managed fields. Conflicts appear in status.overlayWarnings; OverlayActive reports that an overlay is present. Changes to immutable StatefulSet fields require recreation.

Use the controller preview endpoint before saving an overlay. It returns merged YAML, diffs, warnings, and the selected baseline. Preview requires controller update permission, or create permission for a new controller, and is available only for the local cluster.

SymptomCheck
Override does not persiststatus.overlayWarnings and typed alternatives
Pod is unschedulablePod events and effective scheduling fields
Overlay is rejectedYAML syntax and immutable fields
Write reports an ownership conflictCanonical field ownership procedure