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 \
--show-only templates/csi-daemonset.yaml \
--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 |
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" ]
}
@ -830,4 +830,4 @@ load _helpers
local value=$(echo $object |
yq -r '.limits.cpu' | tee /dev/stderr)
[ "${value}" = "500m" ]
}
}

View file

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

View file

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