csi: update affinity and nodeselector schema (#907)

array -> object
This commit is contained in:
Theron Voran 2023-06-06 22:51:14 -07:00 committed by GitHub
parent 1be10380d1
commit cd30d9890a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -373,9 +373,9 @@ load _helpers
local actual=$(helm template \ local actual=$(helm template \
--show-only templates/csi-daemonset.yaml \ --show-only templates/csi-daemonset.yaml \
--set 'csi.enabled=true' \ --set 'csi.enabled=true' \
--set "csi.pod.nodeSelector[0].foo=bar,csi.pod.nodeSelector[1].baz=qux" \ --set "csi.pod.nodeSelector.foo=bar,csi.pod.nodeSelector.baz=qux" \
. | tee /dev/stderr | . | tee /dev/stderr |
yq '.spec.template.spec.nodeSelector[0].foo == "bar" and .spec.template.spec.nodeSelector[1].baz == "qux"' | tee /dev/stderr) yq '.spec.template.spec.nodeSelector.foo == "bar" and .spec.template.spec.nodeSelector.baz == "qux"' | tee /dev/stderr)
[ "${actual}" = "true" ] [ "${actual}" = "true" ]
} }

View file

@ -139,7 +139,7 @@
"affinity": { "affinity": {
"type": [ "type": [
"null", "null",
"array", "object",
"string" "string"
] ]
}, },
@ -155,7 +155,7 @@
"nodeSelector": { "nodeSelector": {
"type": [ "type": [
"null", "null",
"array", "object",
"string" "string"
] ]
}, },

View file

@ -1070,7 +1070,7 @@ csi:
# Example: # Example:
# nodeSelector: # nodeSelector:
# beta.kubernetes.io/arch: amd64 # beta.kubernetes.io/arch: amd64
nodeSelector: [] nodeSelector: {}
# Affinity Settings # Affinity Settings
# This should be either a multi-line string or YAML matching the PodSpec's affinity field. # This should be either a multi-line string or YAML matching the PodSpec's affinity field.