Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Wordpress storageclass "default" fails with a k8s deployed NFS service #807

Closed
sputnick opened this issue Mar 16, 2017 · 9 comments
Closed
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@sputnick
Copy link
Contributor

sputnick commented Mar 16, 2017

Found a strange bug. The wordpress PVCs will not be bound by the cluster deployed NFS service (external provider) because of the KEY NAME for the default storage class "default". I'm using K8s 1.5.2.

In short this fails:
volume.alpha.kubernetes.io/storage-class: default

But this works!?
volume.beta.kubernetes.io/storage-class: default

Steps to reproduce.

Essentially I setup an NFS provisioner with this
https://github.com/kubernetes-incubator/external-storage/blob/master/nfs/docs/deployment.md#in-kubernetes---deployment-of-1-replica

And created a Storage Class called "default" so i wouldn't need to change every Charts values to deploy with persistent storage. However that will fail to bind the a PV to the PVCs with the error message:

Claim "default/wordypress-wordpress-wordpress": StorageClass "" not found

So that didn't make sense because specifying any other storage class worked. So on a whim I tried changing "alpha" in the annotation key name (only used when no storage class is provided) to "beta" and it instantly worked!

This is the "offending" line but I was very surprised that this mattered at all...
https://github.com/kubernetes/charts/blob/master/stable/wordpress/templates/wordpress-pvc.yaml#L15

I'm unsure if this is the fault of the provisioner, kubernetes or that we just need to change all charts to use the "beta" key name from now on...

Thoughts?

@sputnick
Copy link
Contributor Author

Hopefully the NFS provisioner can be fixed instead of changing all the charts but perhaps one day we need to update to the "beta" api.

@sputnick
Copy link
Contributor Author

There are a few comments on the referenced ticket and the conversations I had on the #helm slack channel seem to point to the same conclusion. We should be using the "beta" key in the charts now.
volume.beta.kubernetes.io/storage-class: default

@sputnick
Copy link
Contributor Author

And this k8s 1.6 change basically means that ALL charts using the alpha key will break with 1.6.
kubernetes/website#2557

@prydonius
Copy link
Member

@sputnick sorry only just saw this. All the charts should support the beta annotation (#116) when you supply a custom storage class. See https://github.com/kubernetes/charts/blob/master/stable/wordpress/values.yaml#L127.

When k8s 1.6 is released, we will change all charts to only use the beta annotation.

@sputnick
Copy link
Contributor Author

sputnick commented Mar 23, 2017

Good @prydonius. But is using the beta annotation + "default" the correct value or "" (for the default)?

@prydonius
Copy link
Member

Not sure if I understand correctly, there is no default for the beta annotation as you have to specifically provide the storage class. The value of the alpha annotation is inconsequential, I believe, but we are following the guidelines described in https://kubernetes.io/docs/user-guide/persistent-volumes/#writing-portable-configuration.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 22, 2017
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 21, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants