Skip to content

fix(helm): correct logging CM, add webhook replicas, add extraObjects#3661

Open
aqeelat wants to merge 7 commits into
tektoncd:mainfrom
aqeelat:fix/chart-logging-replicas-extraobjects
Open

fix(helm): correct logging CM, add webhook replicas, add extraObjects#3661
aqeelat wants to merge 7 commits into
tektoncd:mainfrom
aqeelat:fix/chart-logging-replicas-extraobjects

Conversation

@aqeelat

@aqeelat aqeelat commented Jul 6, 2026

Copy link
Copy Markdown

Changes

Community Helm chart (charts/tekton-operator/).

Features

  • webhook.replicas — webhook Deployment replica count is configurable (default 1, floored at 1).
  • operator.replicas — operator Deployment replica count is configurable (default 1; leader election is active, so >=2 runs active/standby).
  • extraObjects — render arbitrary user-supplied manifests alongside the operator (e.g. a TektonConfig CR).

Fixes

  • Logging ConfigMap used dead keys and a hardcoded debug level. loglevel.controller/loglevel.webhook matched nothing; replaced with the operator's real logger names (tekton-operator-lifecycle, tekton-operator-cluster-operations, <fullname>-webhook). Default level is now info via operator.logLevel (was hardcoded debug/development). Operator containers now set CONFIG_LOGGING_NAME so they consume this ConfigMap. loglevel.* values are quoted to avoid YAML type coercion.
  • openshift-crds.yaml broke helm template/install/lint (pre-existing on main). Missing {{- end -}} on an {{- if }} block caused unexpected EOF for all flavors, since helm parses every file at load. Added the closing tag.

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 and helm template across default, custom-logLevel, custom-operatorName, divergent release-name, replicas (operator + webhook), extraObjects, and both k8s/openshift flavors.)
  • 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/changed values, including the autoInstallComponents warning on extraObjects and the leader-election note on operator.replicas.)
  • Commit messages follow commit message best practices

Release Notes

The Helm chart's logging ConfigMap now uses the correct logger names
(tekton-operator-lifecycle, tekton-operator-cluster-operations,
<fullname>-webhook) instead of the inert controller/webhook keys. The
default log level changes from debug to info (configurable via
operator.logLevel). The operator containers now set CONFIG_LOGGING_NAME so
they consume the chart's logging ConfigMap.

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).

fix: openshift-crds.yaml no longer breaks helm template/install/lint with
an "unexpected EOF" parse error (missing {{- end -}}).

@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 6, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 6, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

@tekton-robot tekton-robot requested review from infernus01 and khrm July 6, 2026 01:39
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 6, 2026
@jkhelil

jkhelil commented Jul 6, 2026

Copy link
Copy Markdown
Member

hi @aqeelat , Thank you for your PR, can you go through the easyCLA please.

@aqeelat

aqeelat commented Jul 6, 2026

Copy link
Copy Markdown
Author

@jkhelil done

Comment thread charts/tekton-operator/templates/config.yaml Outdated
Comment thread charts/tekton-operator/templates/deployment.yaml Outdated
aqeelat added 4 commits July 8, 2026 09:32
The logging ConfigMap used inert loglevel.controller / loglevel.webhook

keys, copy-pasted from knative-serving. The Tekton operator's actual

logger names are its unique-process-names (tekton-operator-lifecycle,

tekton-operator-cluster-operations) and its webhook service name

(<fullname>-webhook), so the old keys matched nothing and the effective

level fell back to the global zap-logger-config, which was hardcoded to

debug/development in production.

Replace the inert keys with the operator's real logger names and drive

the global zap-logger-config from operator.logLevel (default info,

development false). The webhook key uses fullname (not operator-name)

because the webhook derives its logger name from WEBHOOK_SERVICE_NAME,

which is fullname-based. Also set CONFIG_LOGGING_NAME on the operator

containers so they consume this ConfigMap; previously they fell back to

knative's default name (config-logging), which this chart does not

create, leaving all logging config inert for the operator containers.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
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>
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>
Quote the three loglevel.* ConfigMap values so a non-string value
(false, null, a bare number) renders as a YAML string rather than
being type-coerced. Matches the already-quoted `level` field in
zap-logger-config. Addresses review feedback.

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
@aqeelat aqeelat force-pushed the fix/chart-logging-replicas-extraobjects branch from 8bbe1e0 to 7010203 Compare July 8, 2026 06:34
aqeelat added 3 commits July 8, 2026 12:11
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>
The openshift CRDs template opens {{- if ... -}} at line 1 but never
closes it, so helm reports "unexpected EOF" when parsing the chart.
Helm parses every template file at load time regardless of the if
condition, so this broke helm template/install/lint for all flavors,
not just openshift. Add the missing {{- end -}}, matching the
structure of kubernetes-crds.yaml.

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>
@aqeelat aqeelat changed the title fix(helm): correct logging CM, add webhook replicas, add extraObjects fix(helm): correct logging CM, quote loglevel values, fix CRD parse error Jul 8, 2026
@aqeelat aqeelat force-pushed the fix/chart-logging-replicas-extraobjects branch from 7ce2443 to 8265de9 Compare July 8, 2026 10:12
@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2026
@aqeelat aqeelat marked this pull request as draft July 8, 2026 10:17
@tekton-robot tekton-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2026
@aqeelat aqeelat force-pushed the fix/chart-logging-replicas-extraobjects branch from 8265de9 to 7ce2443 Compare July 8, 2026 10:22
@tekton-robot tekton-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 8, 2026
@aqeelat aqeelat changed the title fix(helm): correct logging CM, quote loglevel values, fix CRD parse error fix(helm): correct logging CM, add webhook replicas, add extraObjects Jul 8, 2026
@aqeelat aqeelat marked this pull request as ready for review July 8, 2026 10:23
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 8, 2026
@tekton-robot tekton-robot requested a review from jkhelil July 8, 2026 10:23
@tekton-robot tekton-robot requested a review from pramodbindal July 8, 2026 10:23
@aqeelat

aqeelat commented Jul 8, 2026

Copy link
Copy Markdown
Author

@jkhelil sorry for the mess. The PR is ready now.

@jkhelil

jkhelil commented Jul 8, 2026

Copy link
Copy Markdown
Member

/approve

@tekton-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkhelil

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 8, 2026
@jkhelil

jkhelil commented Jul 8, 2026

Copy link
Copy Markdown
Member

@infernus01 can you have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants