scylla-code-samples
scylla-code-samples copied to clipboard
Scylla readiness probe does not work
The readiness probe defined in here:
https://github.com/scylladb/scylla-code-samples/blob/0464f547e2dc3e974d62547cb35ae0f4cc96ebc9/kubernetes-scylla/scylla-statefulset.yaml#L58
It uses exec
to execute the probe script, which will always return 0.
➤ kubectl get pods scylla-2
NAME READY STATUS RESTARTS AGE
scylla-2 1/1 Running 0 15m
➤ kubectl exec scylla-2 bash /opt/ready-probe.sh
command terminated with exit code 1
➤ kubectl exec scylla-2 -- bash -c exec /opt/ready-probe.sh
(returned 0 here)
➤ kubectl get pods scylla-2 -ojsonpath='{.spec.containers[].readinessProbe}'
map[exec:map[command:[/bin/bash -c exec /opt/ready-probe.sh]] failureThreshold:3 initialDelaySeconds:15 periodSeconds:10 successThreshold:1 timeoutSeconds:5]
@dahankzter is this example relevant? If its out of date we can (should) kill it and direct users to https://github.com/scylladb/scylla-operator
It's very much obsolete and we should either change it here or redirect them to the operator repo.
Unless the plan is to make the operator the only way to deploy scylla in k8s, I think a standalone example as a statefulset is still useful.
Also, I took a look at the operator and looks like it uses a sidecar to run nodetool
and exposes an http endpoint. That is definitely a nicer interface, but the idea is the same.
The idea of the operator isn't to make it impossible the deploy scylla without it but simply to make it easier. It will be hard to keep these examples in sync though as time goes by but personally I don't mind it all.