You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ kpt cfg create-setter tmp/ \
istio-gateway "kubeflow-gateway" \
--type array --field "spec.gateways"
$ kpt cfg list-setters tmp/
Error: The input value doesn't validate against provided OpenAPI schema: validation failure list:
istio-gateway in body must be of type array: "string"
While the expected output is:
$ kpt cfg list-setters tmp/
NAME VALUE SET BY DESCRIPTION COUNT
istiogateway [istio-system/istio-ingressgateway] 2
Diagnose
When checking Kptfile, I've noticed that it uses value instead of listValues under setter:
Note: Currently create-setter will not directly create a setter reference for a list field. The simplest way to create a list setter is to create a setter for one of the elements, and then move the reference to the list field.
@phanimarupaka notes taken, that's the workaround I'm using now. Thanks. But is this by design? b/c there will be lots of work that moves field references from the source YAML.
And list-setters works fine
Looks like the value becomes string instead of array. it's going to be a problem if there're multiple values.
Problem
Given:
And
Kptfile
:Run:
While the expected output is:
Diagnose
When checking
Kptfile
, I've noticed that it usesvalue
instead oflistValues
undersetter
:While the expected
Kptfile
should be:According to https://googlecontainertools.github.io/kpt/guides/producer/setters/#setting-lists
another problem is the field reference in updated
input.yaml
is not in the expected line (should be at the line ofgateways:
):Actual result:
The text was updated successfully, but these errors were encountered: