diff --git a/docs/api-reference.md b/docs/api-reference.md
index 9b4e1fc3..9ab637aa 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -10903,6 +10903,13 @@ Resources requirements.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
tolerations |
[]object |
@@ -17529,6 +17536,13 @@ Service configuration.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
tolerations |
[]object |
@@ -29167,6 +29181,13 @@ Indicates if a StorageClass is used. The operator will create the StorageClass i
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
tolerations |
[]object |
@@ -35810,6 +35831,13 @@ Service configuration.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
tolerations |
[]object |
@@ -47214,6 +47242,13 @@ Update strategy for the StatefulSet.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
tolerations |
[]object |
@@ -57926,6 +57961,13 @@ TLS configurations related to the ZooKeeper component.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
standaloneFunctionsWorker |
boolean |
@@ -64450,6 +64492,13 @@ Service configuration.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
standaloneFunctionsWorker |
boolean |
@@ -76049,6 +76098,13 @@ Resources requirements.
Sidecar containers
false |
+
+ skipVolumeClaimLabels |
+ boolean |
+
+ Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ |
+ false |
tolerations |
[]object |
diff --git a/helm/kaap/crds/bookkeepers.kaap.oss.datastax.com-v1.yml b/helm/kaap/crds/bookkeepers.kaap.oss.datastax.com-v1.yml
index 70f13a8d..5a14ff82 100644
--- a/helm/kaap/crds/bookkeepers.kaap.oss.datastax.com-v1.yml
+++ b/helm/kaap/crds/bookkeepers.kaap.oss.datastax.com-v1.yml
@@ -904,6 +904,9 @@ spec:
type: string
type: object
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -3083,6 +3086,9 @@ spec:
type: string
type: object
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
diff --git a/helm/kaap/crds/brokers.kaap.oss.datastax.com-v1.yml b/helm/kaap/crds/brokers.kaap.oss.datastax.com-v1.yml
index 0f0b6e98..1ace66ef 100644
--- a/helm/kaap/crds/brokers.kaap.oss.datastax.com-v1.yml
+++ b/helm/kaap/crds/brokers.kaap.oss.datastax.com-v1.yml
@@ -855,6 +855,9 @@ spec:
Default is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -3000,6 +3003,9 @@ spec:
is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
diff --git a/helm/kaap/crds/functionsworkers.kaap.oss.datastax.com-v1.yml b/helm/kaap/crds/functionsworkers.kaap.oss.datastax.com-v1.yml
index a5ff149e..a3bca881 100644
--- a/helm/kaap/crds/functionsworkers.kaap.oss.datastax.com-v1.yml
+++ b/helm/kaap/crds/functionsworkers.kaap.oss.datastax.com-v1.yml
@@ -787,6 +787,9 @@ spec:
should be used.
type: string
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
diff --git a/helm/kaap/crds/proxies.kaap.oss.datastax.com-v1.yml b/helm/kaap/crds/proxies.kaap.oss.datastax.com-v1.yml
index 6d6ca6ab..a0277151 100644
--- a/helm/kaap/crds/proxies.kaap.oss.datastax.com-v1.yml
+++ b/helm/kaap/crds/proxies.kaap.oss.datastax.com-v1.yml
@@ -850,6 +850,9 @@ spec:
Default is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -2992,6 +2995,9 @@ spec:
is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
diff --git a/helm/kaap/crds/pulsarclusters.kaap.oss.datastax.com-v1.yml b/helm/kaap/crds/pulsarclusters.kaap.oss.datastax.com-v1.yml
index 416bfbcc..e68bc13a 100644
--- a/helm/kaap/crds/pulsarclusters.kaap.oss.datastax.com-v1.yml
+++ b/helm/kaap/crds/pulsarclusters.kaap.oss.datastax.com-v1.yml
@@ -850,6 +850,9 @@ spec:
Default is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -2992,6 +2995,9 @@ spec:
is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -5077,6 +5083,9 @@ spec:
should be used.
type: string
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -9619,6 +9628,9 @@ spec:
should be used.
type: string
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -11763,6 +11775,9 @@ spec:
Default is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -13908,6 +13923,9 @@ spec:
is 'false'.
type: boolean
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -16101,6 +16119,9 @@ spec:
type: string
type: object
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
@@ -18280,6 +18301,9 @@ spec:
type: string
type: object
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
diff --git a/helm/kaap/crds/zookeepers.kaap.oss.datastax.com-v1.yml b/helm/kaap/crds/zookeepers.kaap.oss.datastax.com-v1.yml
index e31ddb88..b378ced8 100644
--- a/helm/kaap/crds/zookeepers.kaap.oss.datastax.com-v1.yml
+++ b/helm/kaap/crds/zookeepers.kaap.oss.datastax.com-v1.yml
@@ -226,6 +226,9 @@ spec:
should be used.
type: string
type: object
+ skipVolumeClaimLabels:
+ description: Skip Applying Labels to Statefulset.VolumeClaimTemplate
+ type: boolean
imagePullSecrets:
description: Image pull secrets.
items:
diff --git a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGenerator.java b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGenerator.java
index ebdf838c..92ad6a8b 100644
--- a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGenerator.java
+++ b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGenerator.java
@@ -44,6 +44,7 @@
import java.util.function.Predicate;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
@Slf4j
@@ -210,11 +211,11 @@ private AuthConfig getAuthConfig() {
)
.contains(spec.getSpecName()) && spec.isEnabled();
- final boolean authEnabled = getValueAssertSame(
+ final boolean authEnabled = BooleanUtils.isTrue(getValueAssertSame(
filterComponents,
spec -> parseConfigValueBool(spec.getConfig(), "authenticationEnabled"),
false,
- "authenticationEnabled").booleanValue();
+ "authenticationEnabled"));
if (!authEnabled) {
log.info("Found authenticationEnabled=false, auth will be disabled in the CRD");
return AuthConfig.builder()
diff --git a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/AutorecoverySpecGenerator.java b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/AutorecoverySpecGenerator.java
index 14b0f5dc..a568a88c 100644
--- a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/AutorecoverySpecGenerator.java
+++ b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/AutorecoverySpecGenerator.java
@@ -31,6 +31,7 @@
import java.util.Map;
import java.util.Objects;
import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
@Slf4j
public class AutorecoverySpecGenerator extends BaseSpecGenerator {
@@ -82,8 +83,9 @@ public void internalGenerateSpec() {
isRestartOnConfigMapChange = isPodDependantOnConfigMap(deploymentSpec.getTemplate());
priorityClassName = spec.getPriorityClassName();
config = convertConfigMapData(configMap);
- if (!config.containsKey("ensemblePlacementPolicy")) {
- config.put("ensemblePlacementPolicy", "");
+ Object ensemblePlacementPolicy = config.get("ensemblePlacementPolicy");
+ if (ensemblePlacementPolicy instanceof String policy && StringUtils.isBlank(policy)) {
+ config.remove("ensemblePlacementPolicy");
}
tlsEntryConfig = createTlsEntryConfig(deployment);
diff --git a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/BookKeeperSetSpecGenerator.java b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/BookKeeperSetSpecGenerator.java
index 8b191c79..c2773613 100644
--- a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/BookKeeperSetSpecGenerator.java
+++ b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/BookKeeperSetSpecGenerator.java
@@ -121,6 +121,7 @@ public void internalGenerateSpec() {
.nodeAffinity(nodeAffinity)
.pdb(podDisruptionBudgetConfig)
.labels(statefulSet.getMetadata().getLabels())
+ .skipVolumeClaimLabels(true)
.podLabels(statefulSetSpec.getTemplate().getMetadata().getLabels())
.matchLabels(matchLabels)
.config(config)
diff --git a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/FunctionsWorkerSpecGenerator.java b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/FunctionsWorkerSpecGenerator.java
index 137276f9..a800dcd1 100644
--- a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/FunctionsWorkerSpecGenerator.java
+++ b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/FunctionsWorkerSpecGenerator.java
@@ -124,6 +124,7 @@ public void internalGenerateSpec() {
.nodeAffinity(nodeAffinity)
.probes(createProbeConfig(mainContainer))
.labels(statefulSet.getMetadata().getLabels())
+ .skipVolumeClaimLabels(true)
.podLabels(statefulSetSpec.getTemplate().getMetadata().getLabels())
.matchLabels(matchLabels)
.config(config)
diff --git a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/ZooKeeperSpecGenerator.java b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/ZooKeeperSpecGenerator.java
index 3a093c1c..5b2fdd49 100644
--- a/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/ZooKeeperSpecGenerator.java
+++ b/migration-tool/src/main/java/com/datastax/oss/kaap/migrationtool/specs/ZooKeeperSpecGenerator.java
@@ -118,6 +118,7 @@ public void internalGenerateSpec() {
.nodeAffinity(nodeAffinity)
.pdb(podDisruptionBudgetConfig)
.labels(statefulSet.getMetadata().getLabels())
+ .skipVolumeClaimLabels(true)
.podLabels(statefulSetSpec.getTemplate().getMetadata().getLabels())
.matchLabels(matchLabels)
.config(config)
diff --git a/migration-tool/src/test/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGeneratorTest.java b/migration-tool/src/test/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGeneratorTest.java
index a934e0a4..ea6fe6ed 100644
--- a/migration-tool/src/test/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGeneratorTest.java
+++ b/migration-tool/src/test/java/com/datastax/oss/kaap/migrationtool/PulsarClusterResourceGeneratorTest.java
@@ -58,7 +58,7 @@ public void test() throws Exception {
final DiffCollectorOutputWriter diff = generate(client, tmpDir);
final File outputDir = new File(tmpDir.toFile(), CONTEXT);
assertValue(outputDir);
- assertDiff(diff, 159);
+ assertDiff(diff, 155);
}
@Test
@@ -74,7 +74,7 @@ public void testNoFunctions() throws Exception {
final DiffCollectorOutputWriter diff = generate(client, tmpDir);
final File outputDir = new File(tmpDir.toFile(), CONTEXT);
final PulsarCluster pulsar = getPulsarClusterFromOutputdir(outputDir);
- assertDiff(diff, 120);
+ assertDiff(diff, 117);
Assert.assertEquals(pulsar.getSpec().getFunctionsWorker().getReplicas(), 0);
}
@@ -91,7 +91,7 @@ public void testNoBastion() throws Exception {
final DiffCollectorOutputWriter diff = generate(client, tmpDir);
final File outputDir = new File(tmpDir.toFile(), CONTEXT);
final PulsarCluster pulsar = getPulsarClusterFromOutputdir(outputDir);
- assertDiff(diff, 152);
+ assertDiff(diff, 148);
Assert.assertEquals(pulsar.getSpec().getBastion().getReplicas(), 0);
}
@@ -202,6 +202,7 @@ private void assertValue(File tmpDir) {
component: zookeeper
heritage: Helm
release: pulsar-cluster
+ skipVolumeClaimLabels: true
podLabels:
app: pulsar
cluster: pulsar-cluster
@@ -284,6 +285,7 @@ private void assertValue(File tmpDir) {
component: bookkeeper
heritage: Helm
release: pulsar-cluster
+ skipVolumeClaimLabels: true
podLabels:
app: pulsar
cluster: pulsar-cluster
@@ -892,7 +894,6 @@ private void assertValue(File tmpDir) {
PULSAR_EXTRA_OPTS: -Dpulsar.log.root.level=info
PULSAR_LOG_LEVEL: info
PULSAR_LOG_ROOT_LEVEL: info
- ensemblePlacementPolicy: ""
zkServers: pulsar-cluster-zookeeper-ca:2181
replicas: 1
annotations: {}
@@ -1013,6 +1014,7 @@ private void assertValue(File tmpDir) {
component: function
heritage: Helm
release: pulsar-cluster
+ skipVolumeClaimLabels: true
podLabels:
app: pulsar
cluster: pulsar-cluster
diff --git a/operator/src/main/java/com/datastax/oss/kaap/controllers/BaseResourcesFactory.java b/operator/src/main/java/com/datastax/oss/kaap/controllers/BaseResourcesFactory.java
index 65ac3af7..d4f8cde0 100644
--- a/operator/src/main/java/com/datastax/oss/kaap/controllers/BaseResourcesFactory.java
+++ b/operator/src/main/java/com/datastax/oss/kaap/controllers/BaseResourcesFactory.java
@@ -689,6 +689,13 @@ protected String genChecksum(Object object) {
protected PersistentVolumeClaim createPersistentVolumeClaim(String name,
VolumeConfig volumeConfig,
Map labels) {
+ return createPersistentVolumeClaim(name, volumeConfig, labels, false);
+ }
+
+ protected PersistentVolumeClaim createPersistentVolumeClaim(String name,
+ VolumeConfig volumeConfig,
+ Map labels,
+ boolean skipLabels) {
String storageClassName = null;
if (volumeConfig.getExistingStorageClassName() != null) {
if (!volumeConfig.getExistingStorageClassName().equals("default")) {
@@ -701,7 +708,7 @@ protected PersistentVolumeClaim createPersistentVolumeClaim(String name,
return new PersistentVolumeClaimBuilder()
.withNewMetadata()
.withName(name)
- .withLabels(labels)
+ .withLabels(skipLabels ? Map.of() : labels)
.endMetadata()
.withNewSpec()
.withAccessModes(List.of("ReadWriteOnce"))
diff --git a/operator/src/main/java/com/datastax/oss/kaap/controllers/bookkeeper/BookKeeperResourcesFactory.java b/operator/src/main/java/com/datastax/oss/kaap/controllers/bookkeeper/BookKeeperResourcesFactory.java
index 6c705e01..9cabf60b 100644
--- a/operator/src/main/java/com/datastax/oss/kaap/controllers/bookkeeper/BookKeeperResourcesFactory.java
+++ b/operator/src/main/java/com/datastax/oss/kaap/controllers/bookkeeper/BookKeeperResourcesFactory.java
@@ -49,6 +49,7 @@
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import lombok.extern.jbosslog.JBossLog;
+import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.ObjectUtils;
@JBossLog
@@ -214,6 +215,7 @@ public void patchStatefulSet() {
public StatefulSet generateStatefulSet() {
Map labels = getLabels(spec.getLabels());
+ boolean getSkipVolumeClaimLabels = BooleanUtils.isTrue(spec.getSkipVolumeClaimLabels());
Map podLabels = getPodLabels(spec.getPodLabels());
Objects.requireNonNull(configMap, "ConfigMap should have been created at this point");
Map podAnnotations = getPodAnnotations(spec.getPodAnnotations(), configMap, DEFAULT_HTTP_PORT + "");
@@ -295,9 +297,9 @@ public StatefulSet generateStatefulSet() {
);
} else {
persistentVolumeClaims.add(createPersistentVolumeClaim(journalVolumeName, spec.getVolumes().getJournal(),
- labels));
+ labels, getSkipVolumeClaimLabels));
persistentVolumeClaims.add(createPersistentVolumeClaim(ledgersVolumeName, spec.getVolumes().getLedgers(),
- labels));
+ labels, getSkipVolumeClaimLabels));
}
diff --git a/operator/src/main/java/com/datastax/oss/kaap/controllers/function/FunctionsWorkerResourcesFactory.java b/operator/src/main/java/com/datastax/oss/kaap/controllers/function/FunctionsWorkerResourcesFactory.java
index a8478c0d..7c18ca61 100644
--- a/operator/src/main/java/com/datastax/oss/kaap/controllers/function/FunctionsWorkerResourcesFactory.java
+++ b/operator/src/main/java/com/datastax/oss/kaap/controllers/function/FunctionsWorkerResourcesFactory.java
@@ -55,6 +55,7 @@
import java.util.Objects;
import java.util.TreeSet;
import lombok.extern.jbosslog.JBossLog;
+import org.apache.commons.lang3.BooleanUtils;
@JBossLog
public class FunctionsWorkerResourcesFactory extends BaseResourcesFactory {
@@ -352,6 +353,7 @@ public StatefulSet generateStatefulSet() {
}
Map labels = getLabels(spec.getLabels());
+ boolean skipVolumeClaimLabels = BooleanUtils.isTrue(spec.getSkipVolumeClaimLabels());
Map podLabels = getPodLabels(spec.getPodLabels());
Objects.requireNonNull(configMap, "ConfigMap should have been created at this point");
Map annotations = getAnnotations(spec.getAnnotations());
@@ -473,7 +475,8 @@ public StatefulSet generateStatefulSet() {
List persistentVolumeClaims = new ArrayList<>();
if (global.getPersistence()) {
persistentVolumeClaims.add(
- createPersistentVolumeClaim(logsVolumeName, spec.getLogsVolume(), labels)
+ createPersistentVolumeClaim(logsVolumeName, spec.getLogsVolume(),
+ labels, skipVolumeClaimLabels)
);
} else {
volumes.add(new VolumeBuilder()
diff --git a/operator/src/main/java/com/datastax/oss/kaap/controllers/zookeeper/ZooKeeperResourcesFactory.java b/operator/src/main/java/com/datastax/oss/kaap/controllers/zookeeper/ZooKeeperResourcesFactory.java
index bac1e156..92a0ce72 100644
--- a/operator/src/main/java/com/datastax/oss/kaap/controllers/zookeeper/ZooKeeperResourcesFactory.java
+++ b/operator/src/main/java/com/datastax/oss/kaap/controllers/zookeeper/ZooKeeperResourcesFactory.java
@@ -54,6 +54,7 @@
import java.util.Objects;
import java.util.stream.Collectors;
import lombok.extern.jbosslog.JBossLog;
+import org.apache.commons.lang3.BooleanUtils;
@JBossLog
public class ZooKeeperResourcesFactory extends BaseResourcesFactory {
@@ -236,6 +237,7 @@ public void patchStatefulSet() {
}
Map labels = getLabels(spec.getLabels());
+ boolean skipVolumeClaimLabels = BooleanUtils.isTrue(spec.getSkipVolumeClaimLabels());
Map podLabels = getPodLabels(spec.getPodLabels());
Map matchLabels = getMatchLabels(spec.getMatchLabels());
Map annotations = getAnnotations(spec.getAnnotations());
@@ -331,7 +333,8 @@ public void patchStatefulSet() {
} else {
final VolumeConfig dataVolume = spec.getDataVolume();
persistentVolumeClaims.add(
- createPersistentVolumeClaim(dataStorageVolumeName, dataVolume, labels)
+ createPersistentVolumeClaim(dataStorageVolumeName, dataVolume,
+ labels, skipVolumeClaimLabels)
);
}
diff --git a/operator/src/main/java/com/datastax/oss/kaap/crds/BaseComponentSpec.java b/operator/src/main/java/com/datastax/oss/kaap/crds/BaseComponentSpec.java
index dbb1af41..a323905d 100644
--- a/operator/src/main/java/com/datastax/oss/kaap/crds/BaseComponentSpec.java
+++ b/operator/src/main/java/com/datastax/oss/kaap/crds/BaseComponentSpec.java
@@ -65,6 +65,8 @@ public abstract class BaseComponentSpec extends ValidableSpec implements W
private Map podAnnotations;
@JsonPropertyDescription(CRDConstants.DOC_LABELS)
private Map labels;
+ @JsonPropertyDescription(CRDConstants.DOC_SKIP_VOLUME_CLAIM_LABELS)
+ private Boolean skipVolumeClaimLabels;
@JsonPropertyDescription(CRDConstants.DOC_POD_LABELS)
private Map podLabels;
@JsonPropertyDescription(CRDConstants.DOC_POD_MATCH_LABELS)
diff --git a/operator/src/main/java/com/datastax/oss/kaap/crds/CRDConstants.java b/operator/src/main/java/com/datastax/oss/kaap/crds/CRDConstants.java
index aa77414f..9de307be 100644
--- a/operator/src/main/java/com/datastax/oss/kaap/crds/CRDConstants.java
+++ b/operator/src/main/java/com/datastax/oss/kaap/crds/CRDConstants.java
@@ -42,6 +42,8 @@ public final class CRDConstants {
public static final String DOC_ANNOTATIONS = "Annotations to add to each resource (except pods).";
public static final String DOC_POD_ANNOTATIONS = "Annotations to add to pod.";
public static final String DOC_LABELS = "Labels to add to each resource (except pods).";
+ public static final String DOC_SKIP_VOLUME_CLAIM_LABELS =
+ "Skip Applying Labels to Statefulset.VolumeClaimTemplate";
public static final String DOC_POD_LABELS = "Labels to add to each pod.";
public static final String DOC_POD_MATCH_LABELS = "Match labels selectors to add to each pod.";
public static final String DOC_CONFIG = "Configuration.";