Skip to content

fix: use tcp startup probes for tls-backed workloads#2307

Merged
AndrewChubatiuk merged 1 commit into
VictoriaMetrics:masterfrom
immanuwell:fix/tls-startup-probe
Jun 19, 2026
Merged

fix: use tcp startup probes for tls-backed workloads#2307
AndrewChubatiuk merged 1 commit into
VictoriaMetrics:masterfrom
immanuwell:fix/tls-startup-probe

Conversation

@immanuwell

Copy link
Copy Markdown
Contributor

Fixes #1824

When a managed app enables TLS on its HTTP endpoint, the operator still renders default httpGet app probes. kubelet hits that endpoint without a TLS handshake, so health checks can fail even when the pod is fine.

This keeps plain HTTP behavior as-is, and switches the default app probe to a tcpSocket startupProbe only for TLS-backed endpoints when no custom probes are set. Custom probes still win, no funny business.

Repro:

  1. Create a VMAuth with spec.extraArgs.tls: "true" and no custom probes.
  2. Check the rendered pod spec. It gets default httpGet probes on the app port.
  3. Run it with TLS or mTLS. kubelet probe requests fail, pod looks sick for no good reason.

Checks:

  • go test ./internal/controller/operator/factory/...
  • make test

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@AndrewChubatiuk

Copy link
Copy Markdown
Contributor

@immanuwell @vrutkovs
why tcp liveness and readiness checks are not used for TLS endpoints by default?
why they are just disabled?

@immanuwell

immanuwell commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@AndrewChubatiuk I didn't switch TLS endpoints to default TCP livenessProbe/readinessProbe because, per the discussion in #1824 these probes only verify that the listener is accepting connections, not that the app is actually healthy or meaningfully ready

so the agreed direction was to use a TCP startupProbe for the default TLS/mTLS case, and not keep steady-state default liveness/readiness checks with weaker semantics

custom probes still override this, so users who want TCP liveness/readiness can set them explicitly

that's my understanding of the agreed direction, maybe I'm wrong

@AndrewChubatiuk

Copy link
Copy Markdown
Contributor

LGTM! Thanks for contribution!

@AndrewChubatiuk AndrewChubatiuk merged commit b2f0bea into VictoriaMetrics:master Jun 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add TCP startup checks

3 participants