From 58a0ae461d0f6552d546eb23cba77de6de0f2f3e Mon Sep 17 00:00:00 2001 From: Stefan Bethke Date: Fri, 19 Jul 2024 09:53:46 +0200 Subject: [PATCH] Do not adjust PersistentVolumeClaimTemplates in StatefulSets k8s does not allow removing PVCTs after the STS has been created. --- .../cmcc/cmccoperator/resource/StatefulSetReconciler.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/com/tsystemsmms/cmcc/cmccoperator/resource/StatefulSetReconciler.java b/src/main/java/com/tsystemsmms/cmcc/cmccoperator/resource/StatefulSetReconciler.java index d32812f..f6691d3 100644 --- a/src/main/java/com/tsystemsmms/cmcc/cmccoperator/resource/StatefulSetReconciler.java +++ b/src/main/java/com/tsystemsmms/cmcc/cmccoperator/resource/StatefulSetReconciler.java @@ -33,8 +33,6 @@ public void reconcile(KubernetesClient kubernetesClient, String namespace, HasMe existing.edit(r -> new StatefulSetBuilder(r).editOrNewSpec() .withMinReadySeconds(spec.getMinReadySeconds()) -// .withPersistentVolumeClaimRetentionPolicy(spec.getPersistentVolumeClaimRetentionPolicy()) // do not use because of feature gate? - .withVolumeClaimTemplates(spec.getVolumeClaimTemplates()) .withReplicas(spec.getReplicas()) .withTemplate(spec.getTemplate()) .withUpdateStrategy(spec.getUpdateStrategy())