Open mcowger opened 5 years ago
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.
This would be really handy, I can give user examples if that'd be helpful.
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.
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