Skip to content

fix(common): apply proxy settings to StatefulSets too#3710

Merged
tekton-robot merged 1 commit into
tektoncd:mainfrom
jkhelil:fix/statefulset-proxy-settings-SRVKP-12831
Jul 15, 2026
Merged

fix(common): apply proxy settings to StatefulSets too#3710
tekton-robot merged 1 commit into
tektoncd:mainfrom
jkhelil:fix/statefulset-proxy-settings-SRVKP-12831

Conversation

@jkhelil

@jkhelil jkhelil commented Jul 13, 2026

Copy link
Copy Markdown
Member

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

@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 13, 2026
@tekton-robot tekton-robot requested review from khrm and pratap0007 July 13, 2026 08:20
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 13, 2026
@codecov-commenter

codecov-commenter commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.52%. Comparing base (9f33b03) to head (6f25544).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3710   +/-   ##
=======================================
  Coverage   25.51%   25.52%           
=======================================
  Files         448      448           
  Lines       23309    23309           
=======================================
+ Hits         5948     5950    +2     
+ Misses      16675    16674    -1     
+ Partials      686      685    -1     
Flag Coverage Δ
unit-tests 25.52% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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>
@jkhelil jkhelil force-pushed the fix/statefulset-proxy-settings-SRVKP-12831 branch from 950349c to 6f25544 Compare July 13, 2026 08:33
@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 13, 2026
@jkhelil

jkhelil commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

/kind Bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label Jul 13, 2026
@l-qing

l-qing commented Jul 14, 2026

Copy link
Copy Markdown
Member

Thanks for this fix @jkhelil. All checks are green and it already has a /lgtm, but tide is blocking the merge with Not mergeable. PR can't be rebased — the branch has drifted from main and Prow can't auto-rebase it.

Could you rebase fix/statefulset-proxy-settings-SRVKP-12831 onto the latest main and force-push? That should clear the tide block and let it merge. Thanks!

@jkhelil

jkhelil commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

/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 15, 2026
@tekton-robot tekton-robot merged commit 4f18311 into tektoncd:main Jul 15, 2026
16 checks passed
@jkhelil

jkhelil commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-v0.80.x

@jkhelil

jkhelil commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

/cherry-pick release-v0.79.x

@tekton-robot

Copy link
Copy Markdown
Contributor

Cherry-pick to release-v0.80.x successful!

A new pull request has been created to cherry-pick this change to release-v0.80.x.

PR: #3737

Please review and merge the cherry-pick PR.

@tekton-robot

Copy link
Copy Markdown
Contributor

Cherry-pick to release-v0.79.x successful!

A new pull request has been created to cherry-pick this change to release-v0.79.x.

PR: #3738

Please review and merge the cherry-pick PR.

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. kind/bug Categorizes issue or PR as related to a bug. 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.

5 participants