Skip to content

feat(helm): configurable replicas (webhook + operator) and extraObjects#3683

Closed
aqeelat wants to merge 4 commits into
tektoncd:mainfrom
aqeelat:feat/chart-replicas-extraobjects
Closed

feat(helm): configurable replicas (webhook + operator) and extraObjects#3683
aqeelat wants to merge 4 commits into
tektoncd:mainfrom
aqeelat:feat/chart-replicas-extraobjects

Conversation

@aqeelat

@aqeelat aqeelat commented Jul 8, 2026

Copy link
Copy Markdown

Changes

Feature additions to the community Helm chart (charts/tekton-operator/). Each is a separate commit for independent review/cherry-pick. Split out from the bug-fix PR #3661 to keep review focused.

1. feat(helm): make webhook Deployment replicas configurable, floored at 1

The webhook Deployment hardcoded replicas: 1. Expose it via webhook.replicas (default 1), guarded with max 1 so an explicit 0 renders 1. A webhook scaled to 0 has no endpoints, so admission calls time out; under failurePolicy: Fail this wedges operations on the matched CRs.

2. feat(helm): add extraObjects for user-supplied manifests

Render arbitrary manifests from values.extraObjects (standard pattern, e.g. argoproj/argo-cd). Useful for resources the chart deliberately does not template, most notably a TektonConfig CR. Defaults to [] (renders nothing).

3. feat(helm): make operator Deployment replicas configurable

The operator Deployment hardcoded replicas: 1. Expose it via operator.replicas (default 1). Unlike the webhook, scaling up is safe here: the operator runs on knative sharedmain, which enables leader election by default (WithHADisabled is never called), so >=2 replicas run active/standby — no duplicate writes. A config-leader-election ConfigMap is optional; knative falls back to defaults when it is absent.

Submitter Checklist

  • Run make test lint before submitting a PR
    (chart-only change; make lint / make test cover Go packages and do not exercise the chart. Verified with helm lint / helm template. Note: full-chart templating also requires the CRD parse fix from fix(helm): correct logging CM, add webhook replicas, add extraObjects #3661, which is a pre-existing bug on main.)
  • Includes tests
    (No chart test framework exists in this repo. Validation is via helm lint / helm template rendering.)
  • Includes docs (if user facing)
    (values.yaml comments document all new values, including the leader-election note on operator.replicas and the autoInstallComponents warning on extraObjects.)
  • Commit messages follow commit message best practices

Release Notes

The webhook Deployment replica count is now configurable via
webhook.replicas (default 1, floored at 1 to avoid wedging admission).

The operator Deployment replica count is now configurable via
operator.replicas (default 1). Leader election is active by default, so
>=2 runs active/standby.

A new extraObjects value allows rendering arbitrary Kubernetes manifests
alongside the operator (e.g. a TektonConfig CR).

aqeelat added 4 commits July 8, 2026 13:09
The webhook Deployment hardcoded replicas: 1. Expose it through

webhook.replicas (default 1 in values.yaml). The operator Deployment is

left at a fixed replica count of 1 because the operator does not run

leader election, so scaling its reconcilers horizontally would cause

duplicate writes and status flapping.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
A webhook scaled to 0 pods has no endpoints, so admission calls
time out and fail. Under failurePolicy: Fail this wedges operations
on the matched CRs. Guard with `max 1` so an explicit 0 renders 1
instead of silently breaking admission. Addresses review feedback.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
Render arbitrary user-supplied manifests from values.extraObjects,

matching the standard pattern used by charts like argoproj/argo-cd.

Lets consumers deploy resources the chart deliberately does not

template, most notably a TektonConfig CR. Defaults to an empty list,

which renders nothing.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
The operator Deployment hardcoded replicas: 1. Expose it through
operator.replicas (default 1). Unlike the webhook, scaling up is safe
here: the operator runs on knative sharedmain, which enables leader
election by default, so >=2 replicas run active/standby (no duplicate
writes). A config-leader-election ConfigMap is optional; knative falls
back to defaults when it is absent.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jul 8, 2026
@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign khrm after the PR has been reviewed.
You can assign the PR to them by writing /assign @khrm in a comment when ready.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 8, 2026
@aqeelat aqeelat closed this Jul 8, 2026
@aqeelat aqeelat deleted the feat/chart-replicas-extraobjects branch July 8, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants