Skip to content

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

Open
aqeelat wants to merge 3 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 3 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 aqeelat force-pushed the fix/chart-logging-replicas-extraobjects branch from 8bbe1e0 to 7010203 Compare July 8, 2026 06:34
@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
@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

@infernus01

Copy link
Copy Markdown
Member

/ok-to-test

@infernus01 infernus01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aqeelat Could you please rebase the PR?

@aqeelat aqeelat force-pushed the fix/chart-logging-replicas-extraobjects branch from 7ce2443 to 2507bcd Compare July 9, 2026 12:07
@aqeelat

aqeelat commented Jul 9, 2026

Copy link
Copy Markdown
Author

@infernus01 rebased

@infernus01 infernus01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, I'm confused reading commit messages. Commit 3cb395c says "the operator does not run leader election", while commit 7ce2443 correctly says "the operator runs on knative sharedmain, which enables leader election by default". The PR description and values.yaml comments are correct. Only affects someone reading individual commit messages in git log.

@aqeelat

aqeelat commented Jul 9, 2026

Copy link
Copy Markdown
Author

@infernus01 this was part of the journey I took. I thought it didn't then I figured out that it did. Do you want me to squash into one commit with a proper message?

@infernus01

Copy link
Copy Markdown
Member

That would be good, we'd have a clean git history.

aqeelat added 3 commits July 9, 2026 19:26
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 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>
Expose Deployment replica counts and allow user-supplied manifests.

- operator.replicas: operator Deployment replica count (default 1;
  knative sharedmain runs leader election by default, so >=2 is
  active/standby, no duplicate writes).
- webhook.replicas: webhook Deployment replica count (default 1, floored
  at 1; 0 would wedge admission under failurePolicy: Fail).
- extraObjects: render arbitrary user-supplied manifests (e.g. a
  TektonConfig CR). Defaults to [].

Signed-off-by: Abdullah Alaqeel <abdullah.t.aqeel@gmail.com>
@aqeelat aqeelat force-pushed the fix/chart-logging-replicas-extraobjects branch from 2507bcd to c7dd389 Compare July 9, 2026 17:27
@aqeelat

aqeelat commented Jul 9, 2026

Copy link
Copy Markdown
Author

@infernus01 done.

@infernus01 infernus01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2026
@infernus01

Copy link
Copy Markdown
Member

/ok-to-test

@aqeelat

aqeelat commented Jul 11, 2026

Copy link
Copy Markdown
Author

@jkhelil can you please approve the PR? For some reason, Github is not showing @infernus01 as an approved reviewer.

Screenshot 2026-07-11 at 5 35 41 PM

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. lgtm Indicates that a PR is ready to be merged. 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.

4 participants