-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Update external-provisioner for storage provisioner for Kubernetes 1.18 #8610
Update external-provisioner for storage provisioner for Kubernetes 1.18 #8610
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: johscheuer The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
de7c3d0
to
f93d0f8
Compare
@@ -85,7 +83,8 @@ require ( | |||
k8s.io/kubectl v0.0.0 | |||
k8s.io/kubernetes v1.17.3 | |||
k8s.io/utils v0.0.0-20200229041039-0a110f9eb7ab // indirect | |||
sigs.k8s.io/sig-storage-lib-external-provisioner v4.0.0+incompatible | |||
sigs.k8s.io/sig-storage-lib-external-provisioner v4.0.0+incompatible // indirect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to run go mod tidy
(and to remove it manually) but somehow I was not able to remove this import:
$ go mod tidy
go: finding module for package sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics
go: found sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics in sigs.k8s.io/sig-storage-lib-external-provisioner v4.1.0+incompatible
and
$ go mod why sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics
# sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics
k8s.io/minikube/pkg/storage
sigs.k8s.io/sig-storage-lib-external-provisioner/v5/controller
sigs.k8s.io/sig-storage-lib-external-provisioner/v5/controller.test
sigs.k8s.io/sig-storage-lib-external-provisioner/controller/metrics
f93d0f8
to
bc30de4
Compare
Travis tests have failedHey @johscheuer, 1st Buildmake test
TravisBuddy Request Identifier: b324af10-baee-11ea-bd85-f15c2d376ac7 |
bc30de4
to
de7c3d0
Compare
de7c3d0
to
73fccf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this PR, the main topic for v.1.13.0 is fixing all the storage provsioiner legacy debt, and this is a good start.
for this this PR to be tested, we would need to rebuild the Dockerfile and make sure it still works
do you mind building the storage docker file locally and test it locally and paste the output of it with the new storage provisioners?
link to the dockerfile
https://github.com/medyagh/minikube/blob/a4e5aab8b6d6a84bc562e885f3f880964e26a3ba/deploy/storage-provisioner/Dockerfile#L16
I just tested it: $ kubectl -n kube-system get po storage-provisioner -o yaml | ag 'image:'
f:image: {}
image: johscheuer/storage-provisioner:latest
image: johscheuer/storage-provisioner:latest and the controller is able to create the PVC: I0701 06:38:43.387502 1 leaderelection.go:252] successfully acquired lease kube-system/k8s.io-minikube-hostpath
I0701 06:38:43.390623 1 controller.go:799] Starting provisioner controller k8s.io/minikube-hostpath_minikube_3b784daa-88ed-450c-8cc2-0fe442878e5e!
I0701 06:38:43.391187 1 event.go:281] Event(v1.ObjectReference{Kind:"Endpoints", Namespace:"kube-system", Name:"k8s.io-minikube-hostpath", UID:"3da7db69-b8a1-41ba-a7b3-d01ef82b0d3b", APIVersion:"v1", ResourceVersion:"1950", FieldPath:""}): type: 'Normal' reason: 'LeaderElection' minikube_3b784daa-88ed-450c-8cc2-0fe442878e5e became leader
I0701 06:38:43.493239 1 controller.go:848] Started provisioner controller k8s.io/minikube-hostpath_minikube_3b784daa-88ed-450c-8cc2-0fe442878e5e!
I0701 06:38:43.494436 1 controller.go:1284] provision "default/controller-sqlite" class "standard": started
I0701 06:38:43.504127 1 event.go:281] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"controller-sqlite", UID:"b04a5cb5-d6a8-4cc3-908d-81d83b79d046", APIVersion:"v1", ResourceVersion:"1177", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "default/controller-sqlite"
I0701 06:38:43.505755 1 controller.go:1392] provision "default/controller-sqlite" class "standard": volume "pvc-b04a5cb5-d6a8-4cc3-908d-81d83b79d046" provisioned
I0701 06:38:43.505803 1 controller.go:1409] provision "default/controller-sqlite" class "standard": succeeded
I0701 06:38:43.506080 1 volume_store.go:212] Trying to save persistentvolume "pvc-b04a5cb5-d6a8-4cc3-908d-81d83b79d046"
I0701 06:38:43.518494 1 volume_store.go:219] persistentvolume "pvc-b04a5cb5-d6a8-4cc3-908d-81d83b79d046" saved
I0701 06:38:43.519411 1 event.go:281] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"controller-sqlite", UID:"b04a5cb5-d6a8-4cc3-908d-81d83b79d046", APIVersion:"v1", ResourceVersion:"1177", FieldPath:""}): type: 'Normal' reason: 'ProvisioningSucceeded' Successfully provisioned volume pvc-b04a5cb5-d6a8-4cc3-908d-81d83b79d046 and ``bash
|
/ok-to-test |
kvm2 Driver Times for Minikube (PR 8610): [62.311154687 67.160744305 61.853980576000005] Averages Time Per Log
docker Driver Times for Minikube (PR 8610): [25.193244747 26.059300242 26.704945151999997] Averages Time Per Log
|
Hm, the failures seem unrelated to me. Is there a way to retrigger them? |
Hey @johscheuer I think the test failures are unrelated -- this LGTM |
This PR updates the https://sigs.k8s.io/sig-storage-lib-external-provisioner to version v5.0.0 to support Kubernetes 1.18 properly (1.18 support was introduces in
5.0.0
). The new version of the lib automatically tries to use leader-election, I added an extraRole
+RoleBinding
for the RBAC. For the most use-cases the old version will work but if a controller/operator changes thePVC
object the storage provisioner will fail with the following error message:With the new version of the lib everything works as expected.