STOR-1767: Delete resources if spec.ManagementState is equal to Removed for removable CSI drivers#233
Conversation
|
@mpatlasov: This pull request references STOR-1767 which is a valid jira issue. DetailsIn response to this:
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. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest-required |
|
We don't have go 1.22.* in CI yet :-( |
|
/retest-required |
|
/retest-required |
2 similar comments
|
/retest-required |
|
/retest-required |
|
/hold This PR will wait for a small change in CSO's |
3b1f1f8 to
daa0265
Compare
openshift/vmware-vsphere-csi-driver-operator#233 will do `allowOperatorRemovedState=True` for vsphere csi operator. This will trigger finalazer check in library-go: ``` if management.IsOperatorRemovable() { if err := v1helpers.EnsureFinalizer(ctx, c.operatorClient, c.name); err != nil { ``` `EnsureFinalizer()`, in turn, calculates finalizer name either as `os.Getenv("OPERATOR_NAME")` or `os.Args[0]`. The latter doesn't work for vsphere because leading slash in `/usr/bin/vmware-vsphere-csi-driver-operator` is not allowed: ``` E0701 19:43:32.342151 1 base_controller.go:268] VMwareVSphereDriverControllerServiceController reconciliation failed: ClusterCSIDriver.operator.openshift.io "csi.vsphere.vmware.com" is invalid: metadata.finalizers: Invalid value: "/usr/bin/vmware-vsphere-csi-driver-operator.operator.openshift.io/VMwareVSphereDriverControllerServiceController": a qualified name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') ```
daa0265 to
814dcbb
Compare
814dcbb to
7753336
Compare
|
/test e2e-vsphere-csi |
|
/test e2e-vsphere |
|
/lgtm |
|
/unhold |
|
/hold Waiting for openshift/library-go#1760 to merge. This PR will need update (bumping library-go) after it merges. |
05af972 to
7d218c8
Compare
…to Removed ``` go get github.com/openshift/library-go go mod tidy && go mod vendor ```
This let to specify Create/Delete functions based on `ManagementState` value. So, if `ManagementState` goes to "Removed", static resources are deleted.
7d218c8 to
4706bbb
Compare
Two updates from the latest review:
|
|
/retest-required |
|
/unhold (openshift/library-go#1760 merged) |
|
/lgtm |
|
pre-merge verified with open PR:
|
|
/test e2e-vsphere-zones |
|
/label qe-approved |
|
@mpatlasov: This pull request references STOR-1767 which is a valid jira issue. DetailsIn response to this:
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. |
|
/retest-required |
3 similar comments
|
/retest-required |
|
/retest-required |
|
/retest-required |
|
OK, now it's clear why It's useless to |
|
/retest |
1 similar comment
|
/retest |
|
@mpatlasov: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
[ART PR BUILD NOTIFIER] Distgit: ose-vmware-vsphere-csi-driver-operator |
The first commit bumps library-go to a newer version with openshift/library-go#1741. The second commit updates operator
driver_starter.goto delete static assets ifManagementStateequal toRemoved.