stackabletech / stackabletech/trino-operator
Support overriding Trino's liveness probe with other probe type
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 63
- Forks
- 13
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 12
Description
Affected Stackable version
23.7.0
Affected Trino version
414
Current and expected behavior
I want to override livenessProbe because of some memory issues. This is what i want it to be
workers:
podOverrides:
spec:
containers:
- name: trino
livenessProbe:
exec:
command:
- /bin/sh
- -c
- |
#!/bin/sh
mem_total=$(grep MemTotal /proc/meminfo | awk '{print $2}')
mem_available=$(grep MemAvailable /proc/meminfo | awk '{print $2}')
used_percent=$(( (100 * (mem_total - mem_available)) / mem_total ))
echo "Node memory usage: ${used_percent}%"
if [ "$used_percent" -gt 94 ]; then
echo "Node memory usage above 94% — failing liveness probe."
exit 1
fi
# TCP socket check (simulate original)
timeout 2 bash -c 'cat < /dev/null > /dev/tcp/127.0.0.1/8080' || exit 1
periodSeconds: 30
failureThreshold: 2
timeoutSeconds: 10
but i get this error in message in my trino worker statefulset:
create Pod trino-coac-worker-default-0 in StatefulSet trino-coac-worker-default failed error: Pod "trino-coac-worker-default-0" is invalid: spec.containers[0].livenessProbe.tcpSocket: Forbidden: may not specify more than 1 handler type
looks like it doesn't really override the livenessProbe as the tcpSocket field still exists?
Possible solution
No response
Additional context
No response
Environment
No response
Would you like to work on fixing this bug?
None
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the StatefulSet validation error with the shown workers.podOverrides configuration and inspect how the Trino liveness probe is merged. Done means an exec-based liveness probe can replace the existing tcpSocket handler without Kubernetes rejecting the generated Pod.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes, rust
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100