zalando-incubator / es-operator

Kubernetes Operator for Elasticsearch
353 stars 46 forks source link

updating a PVC's size is not propagated to the StatefulSet #80

Open drummerwolli opened 4 years ago

drummerwolli commented 4 years ago

Expected Behavior

If I change the size of an existing PVC inside of a ElasticsearchDataSet, it should get propagated to the underlying StatefulSet's pod volumes

Actual Behavior

The StatefulSet does not change its properties and therefore nothing changes.

Steps to Reproduce the Problem

  1. deploy an ElasticsearchDataSet with a PersistentVolumeClaim
  2. afterwards, change the PVC disk size and update the EDS

Specifications

mikkeloscar commented 4 years ago

Unfortunately you can't change the size of a PVC on a statefulset in Kubernetes but our validation doesn't prevent changing it on the EDS.

We could maybe work around this by migrating transparently to a new statefulset, but this is a bigger change, so not something that can easily be fixed.

drummerwolli commented 4 years ago

ah, ok. then maybe as a first "quick fix" would be to validate this similar to K8s (not to allow it), and then later, we can build the "migrate to new statefulset" feature.

drummerwolli commented 3 years ago

@mikkeloscar is it possible that this actually changed? i just managed to change a PVC size with kubectl edit pvc.

mikkeloscar commented 3 years ago

@drummerwolli You can change it on the PVC yes, but the problem is changing it on the StatefulSet which is (still) not allowed.

drummerwolli commented 3 years ago

do you know if this is planned at some point? maybe we can link the upstream issue if it exists?

mikkeloscar commented 3 years ago

Here's an issue: https://github.com/kubernetes/kubernetes/issues/68737 seems like it's not changing soon. But there are suggestions of removing the sts without deleting the pods (kubectl delete sts --cascade=false). This could potentially be implemented as a hack in es-operator