bitnami / kube-libsonnet

Bitnami's jsonnet library for building Kubernetes manifests
https://bitnami.com
Apache License 2.0
174 stars 50 forks source link

Fixed missing `storageClassName` field in PersistentVolumeClaim's `spec` #26

Closed irizzant closed 5 years ago

irizzant commented 5 years ago

Fix #25

As reported in the official Kubernetes docs:

A PV can have a class, which is specified by setting the storageClassName attribute to the name of a StorageClass. A PV of a particular class can only be bound to PVCs requesting that class. A PV with no storageClassName has no class and can only be bound to PVCs that request no particular class.

In the past, the annotation volume.beta.kubernetes.io/storage-class was used instead of the storageClassName attribute. This annotation is still working, however it will become fully deprecated in a future Kubernetes release

jjo commented 5 years ago

Thanks @irizzant for the PR, could you please add a comment there pointing to https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class ? Mentions both: annotation and actual field, former to be deprecated in a future release.

irizzant commented 5 years ago

Hi @jjo , I updated the PR. I'd also like to point out that currently minikube 1.3.1 (Kubernetes v1.15.2) does not work with the annotation.

jjo commented 5 years ago

Hi @jjo , I updated the PR. I'd also like to point out that currently minikube 1.3.1 (Kubernetes v1.15.2) does not work with the annotation.

Can you please double check ?, don't see it in this PR

jjo commented 5 years ago

Hi @jjo , I updated the PR. I'd also like to point out that currently minikube 1.3.1 (Kubernetes v1.15.2) does not work with the annotation.

Also note checks are failing on lint, please run: make fix-lint

irizzant commented 5 years ago

Hi @jjo , the checks are ok now.

Hi @jjo , I updated the PR. I'd also like to point out that currently minikube 1.3.1 (Kubernetes v1.15.2) does not work with the annotation.

Can you please double check ?, don't see it in this PR

I put the references to official Kubernetes docs in the PR header, see attached: screenshot-github com-2019 09 11-17_50_26

irizzant commented 5 years ago

LGTM, thanks much for the fix!

My pleasure, thank you