Conversation
The cluster-health readiness probe authenticates as a Fluss client, so a
SASL-enforced cluster needs a credential for it.
tablet.readinessProbe.healthCheckAuth takes it as a literal, which the
chart inlines into the StatefulSet's exec command, leaving it in plain
text in the rendered manifest. Keeping it out is possible today only
through the generic secrets.env list, where the credential sits far from
the probe settings it belongs to and the link between the two is the
naming convention on READINESS_HEALTH_CHECK_AUTH rather than something
the values schema expresses.
Accept the chart's existing existingSecret {name, key} idiom for it:
security:
readinessProbe:
existingSecret:
name: fluss-readiness-probe-auth
key: auth
The chart renders READINESS_HEALTH_CHECK_AUTH as a secretKeyRef on every
server container; the exec probe inherits the container environment, so
readiness-check.sh and ClusterHealthReadinessCheck are unchanged.
Two placement decisions. The key lives under security rather than under
tablet, because every component's probe authenticates with the same
credential - the coordinator gains a health-based probe in apache#4115 and
needs no second copy. And it is a new key rather than a map accepted on
tablet.readinessProbe.healthCheckAuth, so that key keeps its string type
and existing values files keep rendering the inline form unchanged.
The credential now has three possible sources, and any two of them
conflict: the probe command exports the literal over the Secret-sourced
env var, and two env entries of the same name make the StatefulSet
invalid. Reject every combination at render time.
Closes apache#4330. Supersedes apache#4329, which documents the secrets.env route
for the same credential.
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.
Purpose
Linked issue: close #4330
The cluster-health readiness probe authenticates as a Fluss client, so a SASL-enforced cluster needs a credential for it.
tablet.readinessProbe.healthCheckAuthtakes that credential as a literal, which the chart inlines into the StatefulSet's exec command, leaving it in plain text in the rendered manifest.Keeping it out of the manifest is possible today only through the generic top-level
secrets.envlist: the credential sits far from the probe settings it belongs to, and the link between the two is a naming convention onREADINESS_HEALTH_CHECK_AUTHrather than something the values schema expresses.The chart already has an
existingSecret {name, key}idiom for exactly this, used three times undersecurity.*. This PR accepts the same shape for the probe credential.Brief change log
New value, rendered as a
secretKeyRefinstead of an inlineexportin the probe command:fluss.security.readinessProbe.envrendersREADINESS_HEALTH_CHECK_AUTHas asecretKeyRefon every server container. The exec probe inherits the container environment, soreadiness-check.shandClusterHealthReadinessCheckare unchanged — no Java or shell change in this PR.fluss.security.readinessProbe.validateAuthrejects setting the credential more than once. It now has three possible sources and any two conflict: the probe command would export the literal over the Secret-sourced env var, and two env entries of the same name make the StatefulSet invalid.Two decisions the issue left open:
security, nottablet. Every component's probe authenticates with the same credential; the coordinator gains a health-based readiness probe in [helm] First-class coordinator HA: standby-aware readiness gate #4115 and should not need a second copy of it. A key undertablet.*that also configures the coordinator container would misdescribe itself.tablet.readinessProbe.healthCheckAuthkeeps its string type, so existing values files render exactly as before and the inline form stays supported. Overloading one key to accept both a string and a map is not expressible in a values schema and is awkward under--set.This supersedes #4329, which documents the
secrets.envroute for the same credential. Happy to keep that one and rebase instead if reviewers prefer the incremental split.Tests
helm/tests/readiness_probe_auth_test.yaml(new suite, 6 cases):exportit in the probe commandauthexistingSecretexistingSecret+ asecrets.enventry namedREADINESS_HEALTH_CHECK_AUTHsecrets.enventry namedREADINESS_HEALTH_CHECK_AUTHhelm lint ./helmandhelm unittest ./helmpass (56 suites, 154 tests).API and Format
No API or storage format change. Chart values gain
security.readinessProbe.existingSecret, defaulting to{}; no existing value changes meaning or type.Documentation
website/docs/install-deploy/deploying-with-helm.md: a new "Probe credentials on a SASL cluster" subsection covering both the inline and the Secret-backed form, plus a row in the Security Configuration parameter table.