Hi
I’m trying to create a simple cluster with minimum settings.
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: cassandra
spec:
auth: false
cassandra:
serverVersion: "4.0.7"
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: standard-rwo
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Gi
config:
jvmOptions:
heap_initial_size: 4G
heap_max_size: 4G
networking:
hostNetwork: true
datacenters:
- metadata:
name: dc1
size: 3
racks:
- name: rack1
nodeAffinityLabels:
topology.kubernetes.io/zone: us-central1-a
- name: rack2
nodeAffinityLabels:
topology.kubernetes.io/zone: us-central1-b
- name: rack3
nodeAffinityLabels:
topology.kubernetes.io/zone: us-central1-f
tolerations:
- key: "app"
operator: "Equal"
value: "cassandra"
effect: "NoSchedule"
But it’s failing with error:
CassandraDatacenter.cassandra.datastax.com "dc1" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value
Some more logs:
2023-09-19T16:29:41.883Z INFO KubeAPIWarningLogger unknown field "spec.podTemplateSpec.metadata.annotations"
2023-09-19T16:29:41.884Z INFO KubeAPIWarningLogger unknown field "spec.podTemplateSpec.metadata.creationTimestamp"
2023-09-19T16:29:41.884Z INFO KubeAPIWarningLogger unknown field "spec.storageConfig.additionalVolumes[0].volumeSource"
2023-09-19T16:29:41.884Z ERROR Failed to create datacenter {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"default"}, "namespace": "default", "name": "cassandra", "reconcileID": "9128aa6e-a4cc-4f27-a5e1-7677095ef270", "K8ssandraCluster": "default/cassandra", "CassandraDatacenter": "default/dc1", "K8SContext": "", "error": "CassandraDatacenter.cassandra.datastax.com \"dc1\" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value"}
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).reconcileDatacenters
/workspace/controllers/k8ssandra/datacenters.go:217
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).reconcile
/workspace/controllers/k8ssandra/k8ssandracluster_controller.go:143
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).Reconcile
/workspace/controllers/k8ssandra/k8ssandracluster_controller.go:91
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:121
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:320
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:234
2023-09-19T16:29:41.885Z DEBUG events CassandraDatacenter.cassandra.datastax.com "dc1" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value {"type": "Warning", "object": {"kind":"K8ssandraCluster","namespace":"default","name":"cassandra","uid":"8b72c319-d379-47a4-95f9-9ec0e801159d","apiVersion":"k8ssandra.io/v1alpha1","resourceVersion":"387760072"}, "reason": "Reconcile Error"}
2023-09-19T16:29:41.899Z INFO updated k8ssandracluster status {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"default"}, "namespace": "default", "name": "cassandra", "reconcileID": "9128aa6e-a4cc-4f27-a5e1-7677095ef270", "K8ssandraCluster": "default/cassandra"}
2023-09-19T16:29:41.899Z ERROR Reconciler error {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"default"}, "namespace": "default", "name": "cassandra", "reconcileID": "9128aa6e-a4cc-4f27-a5e1-7677095ef270", "error": "CassandraDatacenter.cassandra.datastax.com \"dc1\" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:326
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:234
I tried reinstalling/different version of k8ssandra-operator: 1.7.0 and 1.8.1.
Please help