werf / werf

A solution for implementing efficient and consistent software delivery to Kubernetes facilitating best practices.
https://werf.io
Apache License 2.0
4.27k stars 204 forks source link

"Additional property werf is not allowed" error if `values.schema.json` has `"additionalProperties": false` #6442

Open felipecrs opened 1 week ago

felipecrs commented 1 week ago

Before proceeding

Version

2.13.1

How to reproduce

$ werf helm upgrade --install --wait --wait-for-jobs cert-manager https://charts.jetstack.io/charts/cert-manager-v1.16.2.tgz --namespace cert-manager --create-namespace --set installCRDs=true
Error: UPGRADE FAILED: values don't meet the specifications of the schema(s) in the following chart(s):
cert-manager:
- (root): Additional property werf is not allowed

Result

See above.

Expected result

To work, as it works without werf.

Additional information

No response

ilya-lesikov commented 23 hours ago

Wow, this is nasty. And it doesn't look like there is a proper workaround, except exposing werf values at $.Values.global.werf. Additionally, for now we can just print a warning if this specific error (Additional property werf is not allowed) occured, without failing the deployment.

We need to think on it.

felipecrs commented 23 hours ago

Maybe you can hack into the function that calls this validation, and patch the schema to add the werf property before actually validating.

ilya-lesikov commented 23 hours ago

Yea, maybe, I'm just afraid how complex these schemas can be and how patchable are they.