fix(common): apply proxy settings to StatefulSets too#3710
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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>
950349c to
6f25544
Compare
|
/lgtm |
|
/kind Bug |
|
Thanks for this fix @jkhelil. All checks are green and it already has a Could you rebase |
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/cherry-pick release-v0.80.x |
|
/cherry-pick release-v0.79.x |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #3737 Please review and merge the cherry-pick PR. |
|
✅ Cherry-pick to A new pull request has been created to cherry-pick this change to PR: #3738 Please review and merge the cherry-pick PR. |
Changes
ApplyProxySettingsonly handled resources of kindDeployment, so whenspec.pipeline.performance.statefulset-ordinalsis enabled inTektonConfigand the
tekton-pipelines-controller/tekton-pipelines-remote-resolversDeployments 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:
ApplyProxySettingsto also processStatefulSetresources(it's already invoked for both kinds from
tektoninstallersetensureResource,but silently no-op'd for StatefulSets).
nullcontainersfield(e.g. an empty/placeholder StatefulSet) is treated as "no containers"
instead of returning a type-mismatch error.
other resource kinds remain unaffected.
Fixes: https://redhat.atlassian.net/browse/SRVKP-12831
Submitter Checklist
make test lintbefore submitting a PRRelease Notes
Made with Cursor