IBM / ibm-spectrum-scale-csi

The IBM Spectrum Scale Container Storage Interface (CSI) project enables container orchestrators, such as Kubernetes and OpenShift, to manage the life-cycle of persistent storage.
Apache License 2.0
67 stars 49 forks source link

Operator projects using the removed APIs in k8s 1.22 requires changes. #483

Closed camilamacedo86 closed 2 years ago

camilamacedo86 commented 3 years ago

Problem Description

Kubernetes has been deprecating API(s), which will be removed and are no longer available in 1.22. Operators projects using these APIs versions will not work on Kubernetes 1.22 or any cluster vendor using this Kubernetes version(1.22), such as OpenShift 4.9+. Following the APIs that are most likely your projects to be affected by:

Therefore, looks like this project distributes solutions in the repository and does not contain any version compatible with k8s 1.22/OCP 4.9. (More info). Following some findings by checking the distributions published:

NOTE: The above findings are only about the manifests shipped inside of the distribution. It is not checking the codebase.

How to solve

It would be very nice to see new distributions of this project that are no longer using these APIs and so they can work on Kubernetes 1.22 and newer and published in the community-operators collection. OpenShift 4.9, for example, will not ship operators anymore that do still use v1beta1 extension APIs.

Due to the number of options available to build Operators, it is hard to provide direct guidance on updating your operator to support Kubernetes 1.22. Recent versions of the OperatorSDK greater than 1.0.0 and Kubebuilder greater than 3.0.0 scaffold your project with the latest versions of these APIs (all that is generated by tools only). See the guides to upgrade your projects with OperatorSDK Golang, Ansible, Helm or the Kubebuilder one. For APIs other than the ones mentioned above, you will have to check your code for usage of removed API versions and upgrade to newer APIs. The details of this depend on your codebase.

If this projects only need to migrate the API for CRDs and it was built with OperatorSDK versions lower than 1.0.0 then, you maybe able to solve it with an OperatorSDK version >= v0.18.x < 1.0.0:

$ operator-sdk generate crds --crd-version=v1 INFO[0000] Running CRD generator.
INFO[0000] CRD generation complete.

Alternatively, you can try to upgrade your manifests with controller-gen (version >= v0.4.1) :

If this project does not use Webhooks:

$ controller-gen crd:trivialVersions=true,preserveUnknownFields=false rbac:roleName=manager-role paths="./..."

If this project is using Webhooks:

  1. Add the markers sideEffects and admissionReviewVersions to your webhook (Example with sideEffects=None and admissionReviewVersions={v1,v1beta1}: memcached-operator/api/v1alpha1/memcached_webhook.go):

  2. Run the command:

    $ controller-gen crd:trivialVersions=true,preserveUnknownFields=false rbac:roleName=manager-role webhook paths="./..."

For further information and tips see the comment.

deeghuge commented 3 years ago

Hi @camilamacedo86 , Thanks for the reporting issue. We have taken care of deprecated api's in ibm-spectrum-scale-csi-operator.v2.3.0 release. Older versions of our driver are not supported on 1.22 and above.

Please let us know if you still seeing any issue with ibm-spectrum-scale-csi-operator.v2.3.0 for supporting it with 1.22 and above.

camilamacedo86 commented 3 years ago

HI @deeghuge,

Thank you for your attention. I can see the version ibm-spectrum-scale-csi-operator.v2.3.0 in https://github.com/redhat-openshift-ecosystem/community-operators-prod/tree/main/operators/ibm-spectrum-scale-csi-operator/2.3.0 and I am no longer checking the errors/warns over the removed APIs usage with.

However, note that I can only look at the manifests shipped inside of the bundle. Suppose your operator is using the removed APIs, but they are not shipped on the bundle, OR they depend on a project that uses them and will not work on OCP 4.9+. In that case, unfortunately, we can not identify these scenarios. You will need to determine if this is your case by code review and QE testing under 4.8 and pre-release 4.9 OCP.

Also, seems that you have also been publishing via RedHat Connect. Am I right? Did you publish the new version there as well? If not, I would recommend you publish it there too. For further info and tips see the blog.

Thank you for your attention.

Jainbrt commented 3 years ago

@camilamacedo86 We have already opened an issue 5184 with ansible community where we see 4 high severity vulnerabilities in ansible-base-operator image and that is the reason we are not able to submit our CSI driver 2.3.0 images and redhat bundle to redhat market place. Could you please help with 5184 defect to be addressed in community also ?

Jainbrt commented 3 years ago

Thanks @camilamacedo86 for your help, as issue 5184 is closed now and we are able to get rid of 4 high severity vulnerabilities with our latest build.

camilamacedo86 commented 3 years ago

Hi, would we have any update on this?

See that we are very close to the release data and fix the projects seems not very hard. See how to fix it in the first comment. Then, would be great to be able to check a new version of your project distributed which is compatible with 4.9.

Jainbrt commented 3 years ago

@camilamacedo86 Thanks for checking. As discussed above we have fixed this issue in community operators but we have to still update the redhat bundle community which is planned in this month with 2.3.1 release. We will update this issue,once we will be done with the updation.

deeghuge commented 3 years ago

Hi @camilamacedo86 , We have uploaded the new operator images in the RedHat registry but it is not showing up after scanning. Earlier it used to take less than day to show up in the project but it is almost week and it is not showing up in project IBM Spectrum Scale CSI Operator. Any idea what can be the issue here ?

camilamacedo86 commented 3 years ago

Hi @deeghuge, Could you please raise a ticket with your scenario in the portal to get help?

deeghuge commented 3 years ago

Hi @deeghuge, Could you please raise a ticket with your scenario in the portal to get help?

sure @camilamacedo86. I pushed operator image again today and I can see that image now. Seems like intermediate issue. If not resolved for other images then will raise the ticket

deeghuge commented 2 years ago

Hi @camilamacedo86, We have decided that we will not be pushing new operator. Customer using 1.22 or higher need to make use of alternative methods for using IBM Spectrum Scale CSI Driver.

Jainbrt commented 2 years ago

@camilamacedo86 we are closing this issue, in case you have any query, please post us.