Skip to content

fix(common): propagate config to StatefulSets too - #26961

Closed
smahadik-27 wants to merge 1 commit into
openshift-pipelines:release-v1.20.xfrom
smahadik-27:SRVKP-13067-propagate-config-to-statefulset
Closed

fix(common): propagate config to StatefulSets too#26961
smahadik-27 wants to merge 1 commit into
openshift-pipelines:release-v1.20.xfrom
smahadik-27:SRVKP-13067-propagate-config-to-statefulset

Conversation

@smahadik-27

@smahadik-27 smahadik-27 commented Aug 6, 2026

Copy link
Copy Markdown

Summary

  • Extended AddConfiguration transformer to handle StatefulSets in addition to Deployments
  • This ensures TektonConfig.spec.config.nodeSelector and tolerations are propagated to tekton-results-postgres StatefulSet
  • Added unit test for StatefulSet configuration propagation

Problem

After upgrading to OpenShift Pipelines 1.20.5, customers configuring scheduling settings in TektonConfig CR found that:

  • Deployment-based components (api, watcher, retention-policy-agent) correctly received nodeSelector/tolerations
  • StatefulSet-based components (tekton-results-postgres) did not receive these settings

This caused the PostgreSQL pod to remain scheduled on worker nodes instead of the intended infra nodes.

Root Cause

The AddConfiguration transformer in pkg/reconciler/common/transformers.go only handled Deployment resources, ignoring StatefulSet resources.

Fix

Extended AddConfiguration to use a switch statement that handles both Deployment and StatefulSet kinds, ensuring all workloads respect the global scheduling configuration.

Test plan

  • Unit test added: TestAddConfigurationStatefulSet
  • Customer verified the issue (Deployments receive config, StatefulSet does not) - see SRVKP-13067

Fixes: SRVKP-13067

The AddConfiguration transformer only handled Deployments, so
TektonConfig.spec.config.nodeSelector and tolerations were not
propagated to StatefulSet workloads like tekton-results-postgres.

This change extends AddConfiguration to also handle StatefulSets,
ensuring that all workloads respect the global scheduling configuration.

Fixes: SRVKP-13067
Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci
openshift-ci Bot requested review from jkhelil and pratap0007 August 6, 2026 15:10
@openshift-ci

openshift-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: smahadik-27
Once this PR has been reviewed and has the lgtm label, please assign jkhelil for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants