fluxcd / flux2

Open and extensible continuous delivery solution for Kubernetes. Powered by GitOps Toolkit.
https://fluxcd.io
Apache License 2.0
6.19k stars 574 forks source link

Kustomization failure. HelmRepository dry-run failed: .spec.provider: field not declared in schema #4862

Open kamalverma1 opened 1 month ago

kamalverma1 commented 1 month ago

Describe the bug

Hi I am using fluxcd helmchart version 2.13.0 and recently tried to upgrade the api version of HelmRepository from v1beta1 to v1. After updating the API version, the kustomization fails with the below error:

HelmRepository/<namespace>/<helmrelease_name> dry-run failed: .spec.provider: field not declared in schema

As I checked the .spec.provider parameter is not present in crd version v1beta1 but is present in v1beta2 and v1.

Steps to reproduce

  1. Install flux helmchart version 2.13.0.
  2. Apply a helmRepository Resource with v1beta1 version and update the version to v1.

Expected behavior

The updgrading of the flux api version from v1beta1 to v1 should work without error.

Screenshots and recordings

No response

OS / Distro

Linux

Flux version

2.3.0

Flux check

K8s version 1.29.4

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

kamalverma1 commented 1 month ago

After removing the default value "generic" of provider in helmrepository crd, the error was gone. I am not sure why is it added as a required field. And even if it is added as default, it should not how the error.