fix(ontoserver): stop config passthroughs re-enabling writes on scaled deployments - #17
Merged
Merged
Conversation
…d deployments Scaled deployments are read-only, and the chart declares that to the server. The ontoserver.config and ontoserver.secretConfig passthroughs render after the chart's own entries in the container's env list, and Kubernetes applies the later of two duplicate env names, so a passthrough copy silently overrode the chart and re-enabled the unsupported scaled read-write topology while still satisfying the isReadOnly guard. Removing allowScaledReadWrite in 0.5.1 closed one route to that topology and left this one open. Validation now rejects such an entry in either passthrough. Matching is normalised — lowercased with _ and - folded to . — so every form Spring resolves a property from is caught, including the uppercase underscored environment form. existingSecretConfig and externalSecret are deliberately not checked: their contents are opaque at render time, and they arrive via envFrom, which Kubernetes applies before the container's own env, so the chart's entry still wins there.
edeati
force-pushed
the
fix/guard-scaled-readonly-override
branch
from
August 14, 2026 00:13
faa2571 to
fd908cd
Compare
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.
Follow-up to #15. Removing
allowScaledReadWriteclosed one route to the unsupported scaled read-write topology; this closes the other.The gap
Scaled deployments are read-only, and the chart declares that to the server. But
ontoserver.configandontoserver.secretConfigrender after the chart's own entries in the container's env list (deployment.yaml:220), Kubernetes does not reject duplicate env names, and the later entry is the one that applies.So a values file could set
type: scaledwithisReadOnly: true, pass the render-time guard, and still end up with a scaled server that accepts writes — the passthrough quietly winning over the chart.The guard
Validation now rejects any such entry in either passthrough. Matching is normalised — lowercased, with
_and-folded to.— so every form Spring will resolve a property from is caught, including the older spelling that still applies on pre-2023 images and the uppercase underscored environment form.existingSecretConfigandexternalSecretare deliberately not checked, and the template says why: their contents are opaque at render time, and they arrive viaenvFrom, which Kubernetes applies before the container's ownenv— so the chart's entry still wins on that path and there is nothing to guard.Nothing about what the chart sends to the server changes. The guard is only what stops it being shadowed.
Verification
helm lintclean;helm unittest276 pass (5 new)ontoserver.configandontoserver.secretConfig, and a negative case proving an unrelated passthrough entry (ontoserver.fhir.closureTable.max) still renders — an over-broad match would otherwise break legitimate configCuts 0.5.2 as a
fix:.🤖 Generated with Claude Code