Skip to content

fix(ontoserver): stop config passthroughs re-enabling writes on scaled deployments - #17

Merged
edeati merged 1 commit into
masterfrom
fix/guard-scaled-readonly-override
Aug 14, 2026
Merged

fix(ontoserver): stop config passthroughs re-enabling writes on scaled deployments#17
edeati merged 1 commit into
masterfrom
fix/guard-scaled-readonly-override

Conversation

@edeati

@edeati edeati commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #15. Removing allowScaledReadWrite closed 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.config and ontoserver.secretConfig render 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: scaled with isReadOnly: 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.

existingSecretConfig and externalSecret are deliberately not checked, and the template says why: 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 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 lint clean; helm unittest 276 pass (5 new)
  • New tests cover every accepted spelling, both ontoserver.config and ontoserver.secretConfig, and a negative case proving an unrelated passthrough entry (ontoserver.fhir.closureTable.max) still renders — an over-broad match would otherwise break legitimate config
  • No README parameter-table drift — no values were added

Cuts 0.5.2 as a fix:.

🤖 Generated with Claude Code

…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
edeati force-pushed the fix/guard-scaled-readonly-override branch from faa2571 to fd908cd Compare August 14, 2026 00:13
@edeati edeati changed the title fix(ontoserver): reject scaledReadOnly overrides from the config passthroughs fix(ontoserver): stop config passthroughs re-enabling writes on scaled deployments Aug 14, 2026
@edeati
edeati merged commit 78cf606 into master Aug 14, 2026
13 checks passed
@edeati
edeati deleted the fix/guard-scaled-readonly-override branch August 14, 2026 00:19
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.

2 participants