Open vDMG opened 4 years ago
Do you mind sending your storage class spec @vDMG
I mean if I previously applied this conf for my historicalNodeSpec :
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 250Gi
storageClassName: ssd
and try to update it with
volumeClaimTemplates:
- metadata:
name: data-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 300Gi
storageClassName: ssd
I'm getting the error below.
my storage class spec
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: ssd
parameters:
type: pd-ssd
provisioner: kubernetes.io/gce-pd
reclaimPolicy: Delete
volumeBindingMode: Immediate
kind of related to this issue https://github.com/kubernetes/kubernetes/issues/68737
try adding this parameter to your storage class @vDMG
allowVolumeExpansion: true
operator supports the update as long as StatefulSet itself support same. For such cases, when I know what I am doing, workaround I use, I delete the corresponding StatefulSet after updating Druid spec, operator then recreates it.
https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/ Might be useful, all depends on your sc and cloud provider
I delete the corresponding StatefulSet after updating Druid spec, the operator then recreates it.
That's against operators' goals... The operator is to eliminate or reduce the operation by us and automate the most things from scaling and other operations right?
@RohitR1 you are right and this is not ideal, things should be improved wherever, case by case, a good alternative is possible.
allowVolumeExpansion: true
sounds like the right thing to do.
Unfortunately, my storage class spec already has allowVolumeExpansion: true
. However, the PVC still won't resize when I update the size in the druid cluster spec.
@AdheipSingh @himanshug has this worked for you/anyone here?
@neeleshkorade
To enable this feature scalePvcSts needs to be enabled to true.
https://github.com/druid-io/druid-operator/blob/master/apis/druid/v1alpha1/druid_types.go#L43
Today if I try to update the storage size of my
volumeClaimTemplates
on a NodeSpec and try to apply my change the operator return the following error :Most of Kubernetes cluster now handle PVC extension and need a pod restart. We could manage this feature.