Skip to content

Conversation

@jsafrane
Copy link
Contributor

@jsafrane jsafrane commented Oct 16, 2025

Rework custom CommonCSIDeploymentController / CSIDriverOperatorDeploymentController / HyperShiftDeploymentController to use the default DeploymentController.

The refactoring is taken in small steps

  • Refactor functionality of the controllers to manifest / Deployment hooks, one small piece after another. That's majority of the commits in this PR to make review chunks smaller.
  • Once every custom code is a hook, remove the controllers and run DeploymentController with the hooks instead. This commit is huge, but it just removes a lot of code.
  • The only code that DeploymentController misses is PostStartHook. Hack it into vendor/, I'll move it into library-go during review.
  • Fix conditions. Despite comments in the code, the old controllers produced <short name>Progressing (such as GCPPDProgressing) and <short name>CSIDriverOperatorDeploymentDegraded (GCPPDCSIDriverOperatorDeploymentDegraded). The new DeploymentController progressing condition have the long prefix instead. So add a stale condition remover with the old <short name>Progressing conditions.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2025
@openshift-ci openshift-ci bot requested review from dobsonj and gnufied October 16, 2025 13:33
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 16, 2025
@jsafrane jsafrane force-pushed the remove-deploymentcontroller branch from 184efa7 to 8040103 Compare October 16, 2025 13:36
@jsafrane jsafrane force-pushed the remove-deploymentcontroller branch from 8040103 to 7a263c4 Compare October 16, 2025 14:06
@gnufied
Copy link
Member

gnufied commented Oct 16, 2025

Looks like we broke Storage on hypershift:

eventually.go:227:  - incorrect condition: wanted ClusterVersionSucceeding=True, got ClusterVersionSucceeding=False: ClusterOperatorNotAvailable(Cluster operator storage is not available)

if len(c.postStartHooks) > 0 {
controller = controller.WithPostStartHooks(c.postStartHooks...)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Custom changes for WIP stuff?

Copy link
Contributor Author

@jsafrane jsafrane Oct 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I need to add it to library-go. If we decide that this PR looks as a good approach.

Use DeploymentController to manage Deployment. Remove the custom
controller.

Ad move functions from the original controller to global functions, so they
can be used by the hooks.
And all other <short name>_Progressing. The new DeploymentController will
create <short name>SSIDriverOperatorDeployment_Progressing as documented in the
code.
@jsafrane jsafrane force-pushed the remove-deploymentcontroller branch from 7a263c4 to e054102 Compare October 17, 2025 14:38
@jsafrane
Copy link
Contributor Author

/test hypershift-aws-e2e-external

@jsafrane jsafrane mentioned this pull request Oct 20, 2025
@jsafrane
Copy link
Contributor Author

/test hypershift-aws-e2e-external

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 20, 2025

@jsafrane: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify-deps e054102 link true /test verify-deps
ci/prow/okd-scos-e2e-aws-ovn e054102 link false /test okd-scos-e2e-aws-ovn
ci/prow/hypershift-e2e-aks e054102 link true /test hypershift-e2e-aks
ci/prow/hypershift-aws-e2e-external e054102 link true /test hypershift-aws-e2e-external

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants