Unfortunately https://github.com/CloudHealth/helm/pull/108 did not fix the issue.
String is not a required field but the json schema requires that there is a type of apiToken and that it must be a string and must match the given pattern. The intention is to only match the given pattern if the apiToken is provided.
This PR fixes that.
Output of testing which was performed is below.
null value succeeds
helm template --values=values.yaml . > /dev/null
string less than 6 characters fails
helm template --values=values.yaml --set cloudhealth-collector.apiToken=asf . > /dev/null
Error: values don't meet the specifications of the schema(s) in the following chart(s):
cloudhealth-collector:
- apiToken: Must validate at least one schema (anyOf)
- apiToken: Does not match pattern '^(.{6,48}|)$'
helm template --values=values.yaml --set cloudhealth-collector.apiToken=1234567890123456789012345678901234567890123456789 . > /dev/null
Error: values don't meet the specifications of the schema(s) in the following chart(s):
cloudhealth-collector:
- apiToken: Must validate at least one schema (anyOf)
- apiToken: Does not match pattern '^(.{6,48}|)$'
Unfortunately https://github.com/CloudHealth/helm/pull/108 did not fix the issue. String is not a required field but the json schema requires that there is a type of
apiToken
and that it must be a string and must match the given pattern. The intention is to only match the given pattern if theapiToken
is provided.This PR fixes that. Output of testing which was performed is below.
null value succeeds
string less than 6 characters fails
string longer than 6 characters succeeds
string which is 48 characters succeeds
string which is longer than 48 characters fails