Closed nitishm closed 3 years ago
/sig api-machinery
your schema does not define any properties in the values
field:
values:
description: Values holds the values for this Helm release.
type: object
By default, unknown fields are pruned. To preserve them, specify x-kubernetes-preserve-unknown-fields: true
, per https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#controlling-pruning
values:
description: Values holds the values for this Helm release.
type: object
x-kubernetes-preserve-unknown-fields: true
Thanks @liggitt that solved the problem :+1:
/triage accepted
Thank you Jordan!
What happened: Custom resource type has an embedded field
Values
of golang typemap[string]interface{}
orobject
in OAS3. On applying an object with the field set to a valid YAML block, the objects gets submitted successfully but on retrieving the object back, thevalues
field is set to an empty object.What you expected to happen: Fields should be reflected/set in the applied object and not be defaulted to an empty
{}
objectHow to reproduce it (as minimally and precisely as possible):
file: application-crd.yaml
Custom Resource object
file: application-obj.yaml
output:
Anything else we need to know?:
The embedded field is the same as https://github.com/fluxcd/helm-operator/blob/v1.2.0/chart/helm-operator/crds/helmrelease.yaml#L237-L239 in Helm Operator project, HelmRelease object
Environment:
kubectl version
):cat /etc/os-release
):uname -a
):kind
cluster