Issues with ECK and pvc-autoresizer

Hi all,

We're currently working with both ECK and pvc-autoresizer in our deployment, where our pvc-resizer annotations are defined with the volumeClaimTemplate as:

annotations = {
  "resize.topolvm.io/threshold"     = "25%"
  "resize.topolvm.io/increase"      = "10%"
  "resize.topolvm.io/storage_limit" = "1000Gi"
}

This deployed succesfully and worked as intended. Soon as we're reaching close to the storage_limit set, we looked to increase the storage_limit to 2000Gi. When applying this, we were met with the error:

 Error: API response status: Failure
│ 
│   with kubernetes_manifest.elasticsearch,
│   on elasticsearch.tf line 149, in resource "kubernetes_manifest" "elasticsearch":
│  149: resource "kubernetes_manifest" "elasticsearch" {
│ 
│ admission webhook "elastic-es-validation-v1.k8s.elastic.co" denied the
│ request: Elasticsearch.elasticsearch.k8s.elastic.co "elasticsearch"
│ is invalid: spec.nodeSet[0].volumeClaimTemplates: Invalid value:
│ [{"metadata":{"name":"elasticsearch-data","annotations":{"resize.topolvm.io/increase":"10%","resize.topolvm.io/storage_limit":"2000Gi","resize.topolvm.io/threshold":"25%"}},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"256Gi"}},"storageClassName":"elasticsearch-es-storage-class"},"status":{}}]:
│ volume claim templates can only have their storage requests increased, if
│ the storage class allows volume expansion. Any other change is forbidden

Has anyone succesfully managed both ECK and pvc-autoresizer together? We'd prefer this way than manually increasing the resource request to 2TB, as the incremental (smaller) increases are more cost effective for us.

Thanks.

1 Like