fix(manualapprovalgate): inject TLS env vars into MAG webhook#3582
Merged
tekton-robot merged 1 commit intoJun 26, 2026
Merged
Conversation
The MAG webhook deployment (manual-approval-gate-webhook) was not receiving TLS environment variables (WEBHOOK_TLS_MIN_VERSION, WEBHOOK_TLS_CIPHER_SUITES, WEBHOOK_TLS_CURVE_PREFERENCES) from the operator, unlike all other Tekton webhook components. The OpenShift extension for manualapprovalgate had an empty implementation with no TLS injection. This fix follows the same pattern used by PAC and Triggers: resolve the cluster TLS profile in PreReconcile and inject it via InjectTLSEnvVars using the WEBHOOK_ prefix (required by the Knative webhook framework). Fixes SRVKP-12613 Signed-off-by: Jawed khelil <jkhelil@redhat.com> Assisted-by: Claude Sonnet 4.6 (via Cursor) Co-authored-by: Cursor <cursoragent@cursor.com>
pramodbindal
approved these changes
Jun 26, 2026
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: pramodbindal The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Member
|
/lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The Manual Approval Gate (MAG) webhook deployment (
manual-approval-gate-webhook) was not receiving TLS environment variables (WEBHOOK_TLS_MIN_VERSION,WEBHOOK_TLS_CIPHER_SUITES,WEBHOOK_TLS_CURVE_PREFERENCES) from the operator, making it inconsistent with all other Tekton webhook components.Root Cause
The OpenShift extension for
manualapprovalgate(pkg/reconciler/openshift/manualapprovalgate/extension.go) had an empty stub implementation — no TLS profile resolution, no transformers — while all other webhook components (operator-webhook, pipelines-webhook, triggers-webhook, pac-webhook) were already covered by the SRVKP-9462 epic.Fix
Updated the MAG OpenShift extension to follow the same pattern used by PAC and Triggers:
PreReconcilenow callsoccommon.ResolveCentralTLSToEnvVarsto fetch the cluster TLS profile from the shared APIServer listerTransformersnow callsoccommon.InjectTLSEnvVarswithWebhookEnvVarPrefix(WEBHOOK_) for themanual-approval-gate-webhookdeployment /manual-approvalcontainerWEBHOOK_prefix is required because the MAG webhook uses the Knative webhook framework (sharedmain.MainWithConfig), which readsWEBHOOK_TLS_*env varsFiles changed:
pkg/reconciler/openshift/manualapprovalgate/extension.go: Add TLS injection following PAC/Triggers patternpkg/reconciler/openshift/manualapprovalgate/extension_test.go: Add unit tests (no TLS config, inject into webhook, do not inject into unrelated deployments)Fixes SRVKP-12613
Submitter Checklist
make test lintbefore submitting a PRRelease Notes
Made with Cursor