kubo-release icon indicating copy to clipboard operation
kubo-release copied to clipboard

Default storageclasses should exist for all IaaS types

Open mcowger opened this issue 6 years ago • 3 comments

Is your feature request related to a problem? Please describe.

Each supported iaas supports underlying storageclasses. We provide one for GCE, but should provide for all the iaas types

Describe the solution you'd like

The CFCR deployment should create a default storage class appropriate for the iaas with the storageclass.kubernetes.io/is-default-class: "true" annotation.

Describe alternatives you've considered

An alternative would be to remove all the default and simply add these to the documentation.

Additional context

None

mcowger avatar Dec 21 '18 18:12 mcowger

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/162817531

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Dec 21 '18 18:12 cf-gitbot

This would be really handy, I can give user examples if that'd be helpful.

JasonMorgan avatar Mar 18 '19 01:03 JasonMorgan

The trouble with wiring in this default storage class is that it makes it difficult if you want to swap to a different default. If you have multiple default storage classes you'll be unable to leverage either as a default:

$ kubectl get sc
NAME                 PROVISIONER            AGE
junk (default)       kubernetes.io/gce-pd   2m29s
standard (default)   kubernetes.io/gce-pd   21d
$ cat <<EOF | kubectl apply -f -
> ---
> kind: PersistentVolumeClaim
> apiVersion: v1
> metadata:
>   name: pvc-default
> spec:
>   accessModes:
>     - ReadWriteOnce
>   resources:
>     requests:
>       storage: 1Gi
> EOF
Error from server (Forbidden): error when creating "STDIN": persistentvolumeclaims "pvc-default" is forbidden: Internal error occurred: 2 default StorageClasses were found

So of course that means you need to go modify the CFCR-provided StorageClass to no longer be a default. Unfortunately, every time the apply-specs errand is run, it'll override any of those changes you made and send you back into an invalid state.

If anything, I'd rather remove the default for GCP. We could provide sane defaults as a matter of documentation, but I'd rather it not be enforced by the release itself.

tvs avatar Apr 30 '19 16:04 tvs