Skip to content

Conversation

solsson
Copy link
Contributor

@solsson solsson commented Oct 27, 2019

Clusters without a default storage class can get one globally using:

kubectl patch storageclass NAME -p "{\"metadata\":{\"annotations\":{\"storageclass.kubernetes.io/is-default-class\":\"true\"}}}"

Note that existing statefulsets can't be upgraded with this change. Apply will result in spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden. When you already have volumes it's better to override storageclass like for example the GKE variant does: https://github.com/Yolean/kubernetes-kafka/blob/v6.0.3/variants/gke-regional/kustomization.yaml#L4 and https://github.com/Yolean/kubernetes-kafka/blob/v6.0.3/variants/gke-regional/gke-storageclass-broker-pd.yaml

Note that ./variants override with specific storageclasses for cloud providers
solsson added a commit to Yolean/ystack that referenced this pull request Oct 27, 2019
Empty strings are used for statically provisioned volumes
solsson added a commit to Yolean/ystack that referenced this pull request Oct 27, 2019
@solsson solsson merged commit 9fc1f62 into master Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant