k8ssandra / k8ssandra-operator

The Kubernetes operator for K8ssandra
https://k8ssandra.io/
Apache License 2.0
176 stars 79 forks source link

Liveness and readiness probes for Cassandra should be configurable #26

Open jsanda opened 3 years ago

jsanda commented 3 years ago

The K8ssandraCluster CRD should make the liveness and readiness probes for Cassandra pods configurable. Note that they are not currently configurable in the CassandraDatacenter CRD. See https://github.com/k8ssandra/cass-operator/issues/124.

┆Issue is synchronized with this Jira Story by Unito ┆Issue Number: K8OP-114

bradfordcp commented 2 years ago

What's the use case here?

adutra commented 2 years ago

The original reporter mentions sstableloader as their use case. I could also see value depending on what is the image pull policy in place, and how long it may take to pull all the images for mgmt-api, config-builder and server-system-logger.

shaotingcheng commented 1 year ago

I can't update the livenessProbe or readinessProbe in a running k8ssandraClusrer.

I thought "K8ssandraCluster.spec.cassandra.datacenters[index].containers[index].readinessProbe " can be used, but it's not. https://docs.k8ssandra.io/reference/crd/releases/k8ssandra-operator-releases/k8ssandra-operator-crds-1.5/#k8ssandraclusterspeccassandradatacentersindexcontainersindexreadinessprobe

operator will show ERROR

2023-05-08T02:26:22.620Z  ERROR SuperuserSecretName is immutable, reverting to existing value in CassandraDatacenter  {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"demo1"}, "namespace": "demo1", "name": "cassandra", "reconcileID": "9c77a9ed-ca1d-48bc-81fb-61b232d2c7a1", "K8ssandraCluster": "demo1/cassandra", "CassandraDatacenter": "demo1/dc1", "K8SContext": "", "error": "tried to update superuserSecretName in K8ssandraCluster"}
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).reconcileDatacenters
  /workspace/controllers/k8ssandra/datacenters.go:128
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