Skip to content

fix(ontoserver): expose podManagementPolicy and OTel exporters, restore empty serverPort default - #13

Merged
edeati merged 5 commits into
masterfrom
fix/statefulset-pmp-otel-exporters-serverport
Aug 13, 2026
Merged

fix(ontoserver): expose podManagementPolicy and OTel exporters, restore empty serverPort default#13
edeati merged 5 commits into
masterfrom
fix/statefulset-pmp-otel-exporters-serverport

Conversation

@edeati

@edeati edeati commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Three issues found while migrating an install to the 0.4.0 chart and doing a throwaway scaled install on EKS alongside it.

1. podManagementPolicy was hardcoded to Parallel

statefulset.yaml set podManagementPolicy: Parallel as a literal. Under Parallel the controller does not wait for a replacement pod to be Ready before replacing the next one, so a rolling update on a multi-replica install can terminate every pod within seconds and leave the Service with no ready endpoint until the first replacement passes its readiness probe. Observed in the field: pods going ~27s apart, ~74s with no ready endpoint, some 503s. A PodDisruptionBudget does not prevent this — it only gates the Eviction API (node drains), not StatefulSet-controller-driven replacement.

Now ontoserver.deployment.podManagementPolicy, defaulting to Parallel so existing installs render identically and keep the fast parallel scale-up. Schema-constrained to Parallel | OrderedReady.

The field is immutable on a live StatefulSet, so the README documents the kubectl delete statefulset <release>-statefulset --cascade=orphan recreate needed to adopt it, and the trade-off that OrderedReady serializes startup and scale-up as well — which matters when pods need a long Lucene index preload under healthCheckOption: -s.

2. OTEL_METRICS_EXPORTER / OTEL_LOGS_EXPORTER were hardcoded to none

Both were literals in the Instrumentation resource with no values override, which puts metricsExporter: otlp — the usual way to get JVM heap and GC metrics off the Java agent — out of reach. Unlike most other agent settings it cannot be worked around from outside the chart.

Now ontoserver.opentelemetry.instrumentation.metricsExporter and .logsExporter, both defaulting to "none", so an existing install renders unchanged.

3. serverPort default went from "" to "8080" ⚠️ behaviour change

b37ce47 changed the default to "8080" so the local port-forward instructions would produce working URLs. The side effect: every install that never sets serverPort — including the aks/eks examples served on 80/443 — publishes host:8080 in its CapabilityStatement, ontoserver.fhir.base and canonical URLs. Nothing errors, so it is easy to miss.

Reverted to "", with serverPort: "8080" moved to where the intent belongs: explicit in examples/local/single-ro.yaml and single-rw.yaml, the two examples whose documented access path is a 8080:80 port-forward. The k3d examples already set it.

Reviewers note: installs on 0.4.0/0.4.1 that relied on the inherited default must now set serverPort: "8080" themselves. Called out in the README.

Verification

  • helm lint clean, no warnings
  • helm unittest: 271 tests pass, 5 new — podManagementPolicy override, exporter defaults, exporter overrides, and base URLs with and without serverPort
  • helm template checked for the default render, OrderedReady, schema rejection of an invalid policy, and both edited examples

Chart.yaml version: deliberately untouched — Release Please owns it, and the feat commits should drive a minor bump. The hand-maintained artifacthub.io/changes list still describes the last released version and is worth updating when the release PR is cut.

🤖 Generated with Claude Code

podManagementPolicy was hardcoded to Parallel. Under Parallel the controller
does not wait for a replacement pod to be Ready before replacing the next one,
so a rolling update on a multi-replica install can terminate every pod within
seconds and leave the Service with no ready endpoint until the first
replacement passes its readiness probe. A PodDisruptionBudget does not help:
it only gates the Eviction API, not StatefulSet-driven pod replacement.

The default stays Parallel, so existing installs render identically and keep
the fast parallel scale-up. Operators who prefer availability during rolling
updates over startup speed can now set OrderedReady.
OTEL_METRICS_EXPORTER and OTEL_LOGS_EXPORTER were hardcoded to "none" in the
Instrumentation resource, with no way to override them from values. That leaves
metricsExporter: otlp - the usual way to get JVM heap and GC metrics off the
Java agent - unreachable for chart users; unlike most other agent settings it
cannot be worked around from outside the chart.

Both default to "none", so an existing install renders unchanged.
0.4.0 changed the serverPort default from "" to "8080" so the local
port-forward instructions would produce working URLs. The side effect is that
every install that never sets serverPort - including the cloud examples served
on 80/443 - publishes host:8080 in its CapabilityStatement, ontoserver.fhir.base
and canonical URLs. Nothing errors, so it is easy to miss.

Revert the default to "" and instead set serverPort: "8080" explicitly in the
two local examples whose documented access path is a 8080:80 port-forward. The
k3d examples already set it.

Installs on 0.4.0/0.4.1 that relied on the inherited default must now set
serverPort: "8080" themselves.
Adds a "StatefulSet rolling updates and podManagementPolicy" section covering
the no-ready-endpoint window under Parallel, why a PDB does not prevent it, the
OrderedReady trade-off, and the kubectl delete --cascade=orphan recreate needed
to adopt the policy on a live StatefulSet since the field is immutable. Also
records the serverPort default change and its effect on 0.4.0/0.4.1 installs,
and adds the new parameters to the values tables.
Runs the helm-readme-generator table pass so the parameter tables match
values.yaml exactly, rather than the hand-written rows added in the previous
commit. Only descriptions and column padding change.
@edeati
edeati merged commit 7cdff43 into master Aug 13, 2026
13 checks passed
@edeati
edeati deleted the fix/statefulset-pmp-otel-exporters-serverport branch August 13, 2026 11:40
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