Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt CSI for Azure extension beginning with Kubernetes 1.21 #3

Closed
rfranzke opened this issue Jan 10, 2020 · 9 comments · Fixed by #73 or #280
Closed

Adopt CSI for Azure extension beginning with Kubernetes 1.21 #3

rfranzke opened this issue Jan 10, 2020 · 9 comments · Fixed by #73 or #280

Comments

@rfranzke
Copy link
Member

As of Kubernetes 1.18 the in-tree Azure Disk volume driver is deprecated in favour of CSI. We should adopt CSI for 1.18+ clusters (where the Azure Disk migration will be promoted to beta as well)

See also: kubernetes/kubernetes#85231 and https://kubernetes.io/blog/2019/12/09/kubernetes-1-17-feature-csi-migration-beta/

@rfranzke
Copy link
Member Author

rfranzke commented Jan 10, 2020

Adopting CSI together with support for 1.18 seems to be a good plan:

@rfranzke rfranzke transferred this issue from gardener-attic/gardener-extensions Jan 30, 2020
@ghost ghost added the lifecycle/stale Nobody worked on this for 6 months (will further age) label Mar 30, 2020
@rfranzke rfranzke changed the title Adopt CSI for Azure extension beginning with Kubernetes 1.18 Adopt CSI for Azure extension beginning with Kubernetes 1.19 Apr 8, 2020
@rfranzke
Copy link
Member Author

rfranzke commented Apr 8, 2020

The CSI migration is beta with 1.17, though, the CSI plugins for Azure are not yet ready to cater with Gardener needs. We will have to contribute there before we can migrate to CSI. Hence, postponing this issue until 1.19.

@rfranzke
Copy link
Member Author

rfranzke commented Apr 9, 2020

I opened kubernetes-sigs/azuredisk-csi-driver#354 for the Azure Disk CSI plugin. After it's merged I'll use the same approach to enhance the Azure File CSI plugin.

@rfranzke
Copy link
Member Author

rfranzke commented Apr 9, 2020

Turns out that what I described with #3 (comment) was actually a misconfiguration during my tests - the Azure Disk CSI plugin already works for our scenario as it disables the metadata service in the controller service of the CSI driver. Hence kubernetes-sigs/azuredisk-csi-driver#354 is closed again for now.

However, it seems that the node service of the CSI driver also requires the client id/secret credentials in order to talk to the Azure API and find out information about certain disks. This would mean that we would have to expose the credentials in the shoot cluster which is undesired. I'm investigating further...

@rfranzke
Copy link
Member Author

rfranzke commented Apr 9, 2020

I checked a little bit more, and it seems that the checkDiskExists() function in the NodeGetVolumeStats function is the only place in the node service where the credentials are needed right now.
The Azure CSI maintainers offered to look into whether it is possible to get rid of this check. Afterwards it should be possible to start the CSI driver without client id/secret.

@rfranzke rfranzke removed the lifecycle/stale Nobody worked on this for 6 months (will further age) label Apr 14, 2020
@rfranzke rfranzke changed the title Adopt CSI for Azure extension beginning with Kubernetes 1.19 Adopt CSI for Azure extension beginning with Kubernetes 1.18 Apr 14, 2020
@rfranzke
Copy link
Member Author

I played with the latest kubernetes-sigs/azuredisk-csi-driver@v0.7.0 and kubernetes-sigs/azurefile-csi-driver@v0.6.0 releases and it seems that the problems we faced have been resolved. This would mean that we can go ahead and introduce CSI (migration) already with 1.18 as initially planned.
I'll do some more testing tomorrow, and if successful I'll add the respective changes to the currently open 1.18 support PR #72. I'll also update this ticket with my results.

@rfranzke rfranzke changed the title Adopt CSI for Azure extension beginning with Kubernetes 1.18 Adopt CSI for Azure extension beginning with Kubernetes 1.19 Apr 15, 2020
@rfranzke
Copy link
Member Author

It turns out that the Azure CSI migration is still alpha with 1.18 (although suggested differently by https://kubernetes.io/blog/2019/12/09/kubernetes-1-17-feature-csi-migration-beta/), hence, let's plan for 1.19. There are still flaws in the Azure File CSI migration, the Azure Disk CSI migration worked so far.
See also kubernetes/enhancements#1490.

@rfranzke rfranzke changed the title Adopt CSI for Azure extension beginning with Kubernetes 1.19 Adopt CSI for Azure extension beginning with Kubernetes 1.21 Dec 2, 2020
@rfranzke
Copy link
Member Author

rfranzke commented Dec 2, 2020

/reopen
We decided to postpone CSI migration for Azure to Kubernetes v1.21, so let's adapt the version constants in the code from 1.20 to 1.21.

@ialidzhikov
Copy link
Member

We decided to postpone CSI migration for Azure to Kubernetes v1.21, so let's adapt the version constants in the code from 1.20 to 1.21.

Let's wait few more days to make sure that CSIMigrationAzureFile promotion to beta will be pushed back to v1.21 - ref kubernetes/kubernetes#96293. Theoretically it can get in for v1.20 via an Exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants