Skip to content

Conversation

@mpatlasov
Copy link
Contributor

New annotation release.openshift.io/desired-version will be used by CSI driver operators to compare the version from env var OPERATOR_IMAGE_VERSION with actual version of currently running operand.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 27, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 27, 2025

@mpatlasov: This pull request references STOR-2523 which is a valid jira issue.

In response to this:

New annotation release.openshift.io/desired-version will be used by CSI driver operators to compare the version from env var OPERATOR_IMAGE_VERSION with actual version of currently running operand.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from mandre and stephenfin October 27, 2025 07:05
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 27, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mpatlasov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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 27, 2025
@mpatlasov
Copy link
Contributor Author

/retest-required

3 similar comments
@mpatlasov
Copy link
Contributor Author

/retest-required

@mpatlasov
Copy link
Contributor Author

/retest-required

@mpatlasov
Copy link
Contributor Author

/retest-required

@mpatlasov
Copy link
Contributor Author

/assign @jsafrane

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 4, 2025
New annotation `release.openshift.io/desired-version` will be used by CSI driver operators to compare the version from env var `OPERATOR_IMAGE_VERSION` with actual version of currently running operand.
@mpatlasov mpatlasov force-pushed the STOR-2523-Add-desired-version-annotation branch from 7576b2b to 05353f3 Compare November 5, 2025 06:25
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 5, 2025
@mpatlasov
Copy link
Contributor Author

/retest-required

@mpatlasov
Copy link
Contributor Author

/hold

Current approach requests Deployment from the hook like this:

deployment2, err := c.ControlPlaneKubeClient.AppsV1().Deployments(deployment.Namespace).Get(context.TODO(), deployment.Name, metav1.GetOptions{})

It's not good. Let's try another approach -- new controller that would reconcile "release.openshift.io/version" annotation.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 5, 2025
@mpatlasov mpatlasov force-pushed the STOR-2523-Add-desired-version-annotation branch from 05353f3 to 812763e Compare November 11, 2025 02:38
return nil
}

klog.Infof("VersionController: getting deployment %s in namespace %s ...", c.controllerDeploymentName, c.commonClient.ControlPlaneNamespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

Reduce the log level or remove this log completely, I am not sure how useful it is.

Copy link
Contributor

Choose a reason for hiding this comment

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

The other logs look useful, just lower the level to V(4) for debugging and V(2) for useful low frequency changes (like deployment updated with version %s below).

defaultReSyncPeriod = 10 * time.Minute
)

type VersionController struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add documentation what the controller does, how it's useful and what it expects from the Deployment (presence of desired-version annotation?)

defaultReSyncPeriod = 10 * time.Minute
)

type VersionController struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would probably add HyperShift either in the controller or package name, as it's very HCP specific.

defaultReSyncPeriod = 10 * time.Minute
)

type VersionController struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some unit tests + move it to library-go. We will vendor it to CSO, snapshot operator, drivers and who knows where else.

var desiredVersion string
var actualVersion string
for k, v := range deployment.Annotations {
if k == "release.openshift.io/desired-version" {
Copy link
Contributor

Choose a reason for hiding this comment

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

the annotation names should be constants

New annotation `release.openshift.io/version` signals that rollout of Deployment is complete (see https://issues.redhat.com/browse/STOR-2523 for details).
This commit implements new controller (VersionController) which reconciles version annotation if controller deplyment is done.
@mpatlasov mpatlasov force-pushed the STOR-2523-Add-desired-version-annotation branch from 812763e to 1289852 Compare November 12, 2025 01:32
@mpatlasov
Copy link
Contributor Author

/hold
(to address comments: 1) move to library-go; 2) add unit tests; 3) add some docs; 4) lower log level; 5) other minor nits)

@mpatlasov mpatlasov changed the title STOR-2523: hypershift: Add desired-version annotation to controller Deployments WIP: STOR-2523: hypershift: Add desired-version annotation to controller Deployments Nov 12, 2025
@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 Nov 12, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 12, 2025

@mpatlasov: 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/e2e-openstack-manila-csi 1289852 link true /test e2e-openstack-manila-csi
ci/prow/e2e-openstack 1289852 link false /test e2e-openstack
ci/prow/e2e-openstack-cinder-csi 1289852 link true /test e2e-openstack-cinder-csi
ci/prow/e2e-azurestack-csi 1289852 link false /test e2e-azurestack-csi

Full PR test history. Your PR dashboard.

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/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants