Skip to content

[cherry-pick: release-v0.79.x] fix(common): apply proxy settings to StatefulSets too#3738

Merged
tekton-robot merged 2 commits into
release-v0.79.xfrom
cherry-pick-3710-to-release-v0.79.x
Jul 15, 2026
Merged

[cherry-pick: release-v0.79.x] fix(common): apply proxy settings to StatefulSets too#3738
tekton-robot merged 2 commits into
release-v0.79.xfrom
cherry-pick-3710-to-release-v0.79.x

Conversation

@tekton-robot

Copy link
Copy Markdown
Contributor

This is a cherry-pick of #3710


Changes

ApplyProxySettings only handled resources of kind Deployment, so when
spec.pipeline.performance.statefulset-ordinals is enabled in TektonConfig
and the tekton-pipelines-controller / tekton-pipelines-remote-resolvers
Deployments are converted into StatefulSets, the resulting StatefulSet pods
never inherited the cluster-wide proxy environment variables (HTTP_PROXY,
HTTPS_PROXY, NO_PROXY) that Deployment-based pods correctly pick up.

This PR:

  • Extends ApplyProxySettings to also process StatefulSet resources
    (it's already invoked for both kinds from tektoninstallerset ensureResource,
    but silently no-op'd for StatefulSets).
  • Hardens the containers lookup so a present-but-null containers field
    (e.g. an empty/placeholder StatefulSet) is treated as "no containers"
    instead of returning a type-mismatch error.
  • Adds unit tests covering StatefulSet proxy injection/removal and confirms
    other resource kinds remain unaffected.

Fixes: https://redhat.atlassian.net/browse/SRVKP-12831

Submitter Checklist

Release Notes

Fix StatefulSet pods (used when `statefulset-ordinals` is enabled) not
inheriting cluster-wide proxy environment variables.

Made with Cursor

ApplyProxySettings only handled Deployment resources, so pods
running as StatefulSets (e.g. when statefulset-ordinals is
enabled) never inherited the cluster-wide proxy environment
variables. Extend the transformer to also cover the StatefulSet
kind, and harden the containers lookup to tolerate a null
containers field instead of erroring out.

Fixes SRVKP-12831

Signed-off-by: Jawed khelil <jkhelil@redhat.com>
Assisted-by: Claude Sonnet 5 (via Cursor)
Co-authored-by: Cursor <cursoragent@cursor.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 15, 2026
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 15, 2026
@pratap0007

Copy link
Copy Markdown
Contributor

/lgtm
/approve

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

Copy link
Copy Markdown
Contributor

/lgtm

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

jkhelil commented Jul 15, 2026

Copy link
Copy Markdown
Member

/approve

@tekton-robot

Copy link
Copy Markdown
Contributor Author

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jkhelil, pratap0007

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 15, 2026
@tekton-robot tekton-robot merged commit 07ef5d7 into release-v0.79.x Jul 15, 2026
11 of 12 checks passed
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants