fix ui.serviceNodePort schema (#537)

UI service nodePort defaults to null, but is set as an integer
This commit is contained in:
Theron Voran 2021-06-01 10:41:02 -07:00 committed by GitHub
parent 3afcb463f8
commit af25981752
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 1 deletions

View file

@ -300,3 +300,26 @@ load _helpers
yq -r '.spec.selector["vault-active"]' | tee /dev/stderr)
[ "${actual}" = 'true' ]
}
@test "ui/Service: default is no nodePort" {
cd `chart_dir`
local actual=$(helm template \
--show-only templates/ui-service.yaml \
--set 'ui.enabled=true' \
. | tee /dev/stderr |
yq -r '.spec.ports[0].nodePort' | tee /dev/stderr)
[ "${actual}" = "null" ]
}
@test "ui/Service: can set nodePort" {
cd `chart_dir`
local actual=$(helm template \
--show-only templates/ui-service.yaml \
--set 'ui.enabled=true' \
--set 'ui.serviceNodePort=123' \
. | tee /dev/stderr |
yq -r '.spec.ports[0].nodePort' | tee /dev/stderr)
[ "${actual}" = "123" ]
}

View file

@ -775,7 +775,10 @@
"type": "boolean"
},
"serviceNodePort": {
"type": "null"
"type": [
"null",
"integer"
]
},
"serviceType": {
"type": "string"