Skip to content

Commit 7c165bb

Browse files
committed
clarify Helm values.yaml comments on unusable generated defaults for empty lists
1 parent db11b93 commit 7c165bb

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

operator/src/main/helm/values.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
# already exists in `src/main/kubernetes/kubernetes.yml`. An empty list `[]` does not survive
66
# there. The fabric8 model marks `PodSpec.imagePullSecrets`, `PodSpec.volumes` and
77
# `Container.volumeMounts` with `@JsonInclude(NON_EMPTY)`. A list with one null element does
8-
# survive, but the generated default then reads `- {}`. That is not a usable default, so this
9-
# file replaces it with a real empty list.
8+
# survive, but the generated default is then unusable, so this file replaces it with a real
9+
# empty list.
10+
#
11+
# The unusable default takes one of two shapes, and the path of the value decides which:
12+
# - A plain path, such as `spec.template.spec.volumes`, produces `- {}`, a list that holds
13+
# one empty object. A user who copies that default and appends an entry gets invalid YAML.
14+
# - A container-filtered path, such as
15+
# `spec.template.spec.containers.(name == postgresql-operator).volumeMounts`, produces
16+
# `{}`, an object. That shape also contradicts the `type: array` of `values.schema.json`.
1017
#
1118
# See https://github.com/quarkiverse/quarkus-helm/issues/453
1219
app:

0 commit comments

Comments
 (0)