You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/ontoserver/templates/validate-values.yaml
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,28 @@
124
124
{{- fail "Scaled deployments must set ontoserver.deployment.isReadOnly: true. Ontoserver forces read-only on a scaled deployment, and each replica has its own Lucene index, so content written through the round-robin Service is only indexed on the replica that served the write and $expand/$validate-code fail on the others. Load content with a single-instance read-write deployment, then serve it scaled and read-only." }}
125
125
{{- end }}
126
126
127
+
{{- /* The chart sets ontoserver.internal.deployment.scaledReadOnly itself on scaled deployments.
128
+
The config passthroughs render after that entry in the container's env list, and a later
129
+
duplicate wins, so a passthrough copy would silently override the chart and re-enable the
130
+
unsupported scaled read-write topology while still passing the isReadOnly guard above.
131
+
Reject it instead of rendering a manifest that contradicts itself.
132
+
133
+
Matching is normalised because Spring resolves a property from the environment in several
134
+
forms: the dotted name, an older all-lowercase spelling of it, and the uppercase underscored
135
+
form. Lowercasing and folding _ and - to . collapses all of them to one comparison.
136
+
137
+
Not checked, because it cannot be: existingSecretConfig and externalSecret contents are
138
+
opaque at render time. They arrive via envFrom, which Kubernetes applies *before* the
139
+
container's own env, so the chart's entry still wins there. */ -}}
{{- fail (printf "%s must not set %s. Scaled read-write is not supported: Ontoserver forces read-only on a scaled deployment and the chart sets this itself, so a passthrough copy would only produce a manifest whose env list contradicts itself. Remove the entry. To serve content read-write, use a single-instance deployment." $section $key) }}
145
+
{{- end }}
146
+
{{- end }}
147
+
{{- end }}
148
+
127
149
{{- if and (eq .Values.ontoserver.deployment.kind "StatefulSet") .Values.ontoserver.deployment.persistence.files.existingVolume.enabled }}
128
150
{{- fail "StatefulSet deployments do not support ontoserver.deployment.persistence.files.existingVolume. Each replica needs its own volume; use dynamic provisioning via storageClass or a Deployment for single-instance prebound volumes." }}
Copy file name to clipboardExpand all lines: charts/ontoserver/tests/validate_values_test.yaml
+53Lines changed: 53 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,59 @@ tests:
204
204
- failedTemplate:
205
205
errorMessage: "Scaled deployments must set ontoserver.deployment.isReadOnly: true. Ontoserver forces read-only on a scaled deployment, and each replica has its own Lucene index, so content written through the round-robin Service is only indexed on the replica that served the write and $expand/$validate-code fail on the others. Load content with a single-instance read-write deployment, then serve it scaled and read-only."
206
206
207
+
# The chart sets scaledReadOnly itself, and the config passthroughs render after it, so a
208
+
# duplicate would win at runtime and re-enable scaled read-write while still passing the
209
+
# isReadOnly guard. Each accepted spelling must be rejected.
210
+
- it: rejects a scaledReadOnly override in ontoserver.config
0 commit comments