Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specifying configData in the policy-controller helm chart gives a values validation error #888

Open
steinwelberg opened this issue Jan 7, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@steinwelberg
Copy link

steinwelberg commented Jan 7, 2025

Description

When upgrading the policy-controller Helm chart (from version 0.8.0 to 0.8.1) with the following values:

webhook:
  replicaCount: 3
  securityContext:
    enabled: true
    runAsUser: 1000
  configData:
    no-match-policy: warn
serviceMonitor:
  enabled: true

this will result in the following error:

  Warning  UpgradeFailed  30s  helm-controller  Helm upgrade failed for release infra-cosign/policy-controller with chart policy-controller@0.8.1: values don't meet the specifications of the schema(s) in the following chart(s):
policy-controller:
- webhook.configData: Additional property no-match-policy is not allowed

Most likely this is caused by the upated helm values schema which is quite restrictive as it specifies the "additionalProperties": false, property. Not only on the configData object, but also on the securityContext, customLabels, env, extraArgs all specify this which prevent a user to specify custom properties.

Version
policy controller helm chart version 0.8.1

@steinwelberg steinwelberg added the bug Something isn't working label Jan 7, 2025
@rai69
Copy link

rai69 commented Jan 23, 2025

@shearn89 can you help with this? This bug is preventing us from upgrading to version 0.8.1 and higher.

@shearn89
Copy link
Contributor

I can try, I believe the schema was autogenerated via helm-schema so I may have done it wrong or it may be overly restrictive.

Best bet is probably for me to raise a PR to revert those additionalProperty changes.

@shearn89
Copy link
Contributor

Whilst I get a PR up - it looks like helm has an option to relax the schema validation: cert-manager/cert-manager#7334 (comment)

Does that help as a workaround in the short term?

@rai69
Copy link

rai69 commented Jan 23, 2025

We install multiple helm-charts with the help from ansible, so i don't know if this can help. The manual test i did, does confirm that --skip-schema-validation relaxes the schema checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants