Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 106 additions & 76 deletions charts/ontoserver/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions charts/ontoserver/examples/local/single-ro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

ontoserver:
serverName: localhost
# Matches the port-forward above, so the CapabilityStatement and canonical URLs
# advertise http://localhost:8080/... Remove this when serving on port 80/443.
serverPort: "8080"
hostNames:
- localhost

Expand Down
3 changes: 3 additions & 0 deletions charts/ontoserver/examples/local/single-rw.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@

ontoserver:
serverName: localhost
# Matches the port-forward above, so the CapabilityStatement and canonical URLs
# advertise http://localhost:8080/... Remove this when serving on port 80/443.
serverPort: "8080"
hostNames:
- localhost

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ spec:
value: {{ .Values.ontoserver.opentelemetry.instrumentation.exporter.endpoint | quote }}
{{- end }}
- name: OTEL_METRICS_EXPORTER
value: "none"
value: {{ .Values.ontoserver.opentelemetry.instrumentation.metricsExporter | quote }}
- name: OTEL_LOGS_EXPORTER
value: "none"
value: {{ .Values.ontoserver.opentelemetry.instrumentation.logsExporter | quote }}
- name: OTEL_PROPAGATORS
value: {{ .Values.ontoserver.opentelemetry.instrumentation.propagators | quote }}
- name: OTEL_INSTRUMENTATION_COMMON_ENDUSER_ENABLED
Expand Down
2 changes: 1 addition & 1 deletion charts/ontoserver/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
{{- fail (printf "ontoserver.deployment.type must be one of the following: 'single', 'scaled'. Got: '%s'" .Values.ontoserver.deployment.type) }}
{{- end }}
replicas: {{ .Values.ontoserver.deployment.replicas }}
podManagementPolicy: Parallel
podManagementPolicy: {{ .Values.ontoserver.deployment.podManagementPolicy }}
serviceName: {{ .Release.Name }}-ontoserver-headless
selector:
matchLabels:
Expand Down
28 changes: 28 additions & 0 deletions charts/ontoserver/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,34 @@ tests:
path: spec.replicas
value: 1

- it: omits a port from the published base URLs by default
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ontoserver.fhir.base
value: http://localhost/fhir
- contains:
path: spec.template.spec.containers[0].env
content:
name: ontoserver.synd.base
value: http://localhost/synd

- it: appends serverPort to the published base URLs when set
set:
ontoserver.serverPort: "8080"
asserts:
- contains:
path: spec.template.spec.containers[0].env
content:
name: ontoserver.fhir.base
value: http://localhost:8080/fhir
- contains:
path: spec.template.spec.containers[0].env
content:
name: ontoserver.formats.html.base
value: http://localhost:8080/static

- it: sets replicas from values
set:
ontoserver.deployment.replicas: 0
Expand Down
30 changes: 30 additions & 0 deletions charts/ontoserver/tests/optional_features_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,36 @@ tests:
- equal:
path: spec.exporter.endpoint
value: "http://jaeger:4317"
- contains:
path: spec.java.env
content:
name: OTEL_METRICS_EXPORTER
value: "none"
- contains:
path: spec.java.env
content:
name: OTEL_LOGS_EXPORTER
value: "none"

- it: honours metricsExporter and logsExporter overrides
templates:
- templates/opentelemetry-instrumentation.yaml
set:
ontoserver.opentelemetry.instrumentation.enabled: true
ontoserver.opentelemetry.instrumentation.exporter.endpoint: "http://collector:4317"
ontoserver.opentelemetry.instrumentation.metricsExporter: otlp
ontoserver.opentelemetry.instrumentation.logsExporter: otlp
asserts:
- contains:
path: spec.java.env
content:
name: OTEL_METRICS_EXPORTER
value: "otlp"
- contains:
path: spec.java.env
content:
name: OTEL_LOGS_EXPORTER
value: "otlp"

- it: renders no Envoy policies by default
templates:
Expand Down
9 changes: 9 additions & 0 deletions charts/ontoserver/tests/statefulset_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ tests:
path: spec.podManagementPolicy
value: Parallel

- it: honours a podManagementPolicy override
set:
ontoserver.deployment.kind: StatefulSet
ontoserver.deployment.podManagementPolicy: OrderedReady
asserts:
- equal:
path: spec.podManagementPolicy
value: OrderedReady

- it: sets serviceName to headless service
set:
ontoserver.deployment.kind: StatefulSet
Expand Down
16 changes: 16 additions & 0 deletions charts/ontoserver/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
"type": "integer",
"minimum": 0
},
"podManagementPolicy": {
"type": "string",
"enum": [
"Parallel",
"OrderedReady"
],
"description": "StatefulSet pod management policy. Parallel does not wait for Ready before replacing the next pod; OrderedReady does. Immutable on a live StatefulSet."
},
"clusterName": {
"type": "string"
},
Expand Down Expand Up @@ -653,6 +661,14 @@
"excludedClasses": {
"type": "string"
},
"metricsExporter": {
"type": "string",
"description": "OTEL_METRICS_EXPORTER for the Java agent (e.g. otlp, prometheus, none)."
},
"logsExporter": {
"type": "string",
"description": "OTEL_LOGS_EXPORTER for the Java agent (e.g. otlp, none)."
},
"exporter": {
"type": "object",
"properties": {
Expand Down
10 changes: 8 additions & 2 deletions charts/ontoserver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ontoserver:
allowScaledReadWrite: false
## @param ontoserver.deployment.replicas Number of replicas - min 2 for scaled deployment - can be set to 0
replicas: 1
## @param ontoserver.deployment.podManagementPolicy StatefulSet pod management policy (Parallel or OrderedReady); ignored when kind is Deployment. Parallel starts and replaces pods without waiting for Ready, so a multi-replica rolling update can leave the Service with no ready endpoint; OrderedReady waits for each pod to become Ready first. Immutable on a live StatefulSet - see the README for the --cascade=orphan recreate.
podManagementPolicy: Parallel
## @param ontoserver.deployment.clusterName Cluster name for auto-discovery in scaled deployments (overrides the default "ontoserver" set in application.properties); ignored for single deployments
clusterName: ""
## @param ontoserver.deployment.annotations Deployment/Statefulset manifest annotations
Expand Down Expand Up @@ -199,7 +201,7 @@ ontoserver:
## @param ontoserver.serverName Server hostname - must match a hostName at ontoserver.hostNames
serverName: localhost
## @param ontoserver.serverPort Non-standard port exposed to clients (e.g. 8080 when port-forwarding or k3d maps 8080:80). Leave empty for standard ports (80/443).
serverPort: "8080"
serverPort: ""
## @param ontoserver.hostNames Hostnames for ingress/gateway
hostNames:
- localhost
Expand Down Expand Up @@ -318,8 +320,12 @@ ontoserver:
propagators: "tracecontext,baggage,b3multi"
## @param ontoserver.opentelemetry.instrumentation.excludedClasses Classes to exclude from instrumentation
excludedClasses: "ca.uhn.fhir.*Interceptor*"
## @param ontoserver.opentelemetry.instrumentation.metricsExporter OTEL_METRICS_EXPORTER for the Java agent (e.g. otlp for JVM heap and GC metrics, or none to disable)
metricsExporter: "none"
## @param ontoserver.opentelemetry.instrumentation.logsExporter OTEL_LOGS_EXPORTER for the Java agent (e.g. otlp, or none to disable)
logsExporter: "none"
exporter:
## @param ontoserver.opentelemetry.instrumentation.exporter.type Exporter type (zipkin, otlp, etc.)
## @param ontoserver.opentelemetry.instrumentation.exporter.type Trace exporter type (OTEL_TRACES_EXPORTER - zipkin, otlp, etc.)
type: zipkin
## @param ontoserver.opentelemetry.instrumentation.exporter.endpoint Exporter endpoint URL (required when enabled)
endpoint: ""
Expand Down
Loading