feat(probes): liveness probes for worker and ui pods, overridable per component - #28
Open
Azerothian wants to merge 1 commit into
Open
Azerothian wants to merge 1 commit into
Azerothian wants to merge 1 commit into
Conversation
…onent The worker pod had no liveness probe (it serves no gRPC, so the probe the other services use would fail against it) and the ui had none at all, so a wedged process in either would hang indefinitely. The worker now probes its membership port with conservative thresholds, the ui probes /healthz on its http port. Every generated probe can now be replaced or removed through spec.services.<name>.livenessProbe, spec.ui.livenessProbe and spec.adminTools.livenessProbe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17
What
Adds the missing probes and makes every generated probe overridable.
Before this PR the worker pod had no liveness probe on purpose (the comment in the builder read "worker has no grpc endpoint so omit liveness probe") and the UI had none at all, so a wedged worker or UI process would hang forever without a restart.
frontend,history,matching,internalFrontendrpcport (unchanged)workermembershipportui/healthzon thehttpportadmintoolsexec: ls /(unchanged, now overridable)The worker serves no gRPC, so probing
rpcwould always fail — the membership ring is the cheapest real liveness signal. Its thresholds are deliberately conservative (150 s initial delay, 30 s period, failure threshold 5 → ~2.5 minutes of a dead listener before a restart), because a slow worker is not a broken one. The UI probe hits/healthz, which the UI answers without reaching out to the frontend, so a UI that can't reach the cluster isn't restarted — only one whose HTTP server is gone.Override story: a new
spec.services.<name>.livenessProbe,spec.ui.livenessProbeandspec.adminTools.livenessProbe(LivenessProbeSpec) accept eitherprobe(replace the default with anycore/v1.Probe) ordisabled: true(drop it). Unset keeps the operator default;disabledwins overprobe.Resolveis nil-safe, so clusters that never set the field are unaffected.Files
api/v1beta1/temporalcluster_types.go—LivenessProbeSpec.Resolve+ the three new fieldsinternal/resource/base/deployment_builder.go—defaultLivenessProbe()(+ worker membership probe, override hook)internal/resource/ui/deployment_builder.go,internal/resource/admintools/deployment_builder.go— defaults + overrideszz_generated.deepcopy.go,config/crd/bases, chart CRD,docs/api/v1beta1.mdapi/v1beta1/livenessprobe_test.go,internal/resource/base/deployment_builder_test.godocs/features/liveness-probes.md+ nav + CHANGELOGVerification
go build ./...✓ /go vet ./...✓ /gofmtclean ✓make manifests+make api-docsregenerated (repo's yq CRD post-processing included), chart CRD rebuilt via kustomizego test ./api/... ./internal/... ./controllers/...— all ok, including:TestDefaultLivenessProbe— frontend probesrpc, worker probesmembership(asserts the port name, and that the worker's thresholds stay conservative)TestLivenessProbeOverride— custom probe replaces,disabledremovesTestLivenessProbeSpecResolve— unset/empty/disabled/custom precedence, nil-safeLive-cluster verification on
bne1-cluster1was not possible for this run: the host's container runtime is down (containerdpanics on a corrupt bbolt metadata DB,dockercannot connect), so the operator image could not be built/loaded. The probes are exercised by unit tests against the real builders, and the change is additive (new optional fields).