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

Update Flux controllers to Kustomize v5.0 #3564

Closed
5 tasks done
stefanprodan opened this issue Feb 6, 2023 · 6 comments
Closed
5 tasks done

Update Flux controllers to Kustomize v5.0 #3564

stefanprodan opened this issue Feb 6, 2023 · 6 comments
Labels
area/kustomization Kustomization related issues and pull requests blocked/upstream Blocked by an upstream dependency or issue umbrella-issue Umbrella issue for tracking progress of a larger effort

Comments

@stefanprodan
Copy link
Member

stefanprodan commented Feb 6, 2023

We should update Flux to Kustomize to v5.0.0 but this version comes with many breaking changes. One breaking change is the removal of the DoLegacyResourceSort which is used in Kubernetes cli-runtime. Given that the Flux controllers depend on k8s.io/cli-runtime, we are in stuck with Kustomize v4 until there is an official Kubernetes release that includes kustomize/api@v0.13.1 in cli-runtime.

Bumping sigs.k8s.io/kustomize/api to v0.13.1 in kustomize-controller results in:

# k8s.io/cli-runtime/pkg/resource
../../../../pkg/mod/k8s.io/cli-runtime@v0.26.1/pkg/resource/kustomizevisitor.go:41:8:
kOpts.DoLegacyResourceSort undefined (type *krusty.Options has no field or method DoLegacyResourceSort)

Use kustomize/api@v0.13.1 and kustomize/kyaml@v0.14.0 in:

  • fluxcd/pkg
  • fluxcd/kustomize-controller
  • fluxcd/helm-controller
  • fluxcd/image-automation-controller
  • fluxcd/flux2
@stefanprodan stefanprodan added area/kustomization Kustomization related issues and pull requests blocked/upstream Blocked by an upstream dependency or issue umbrella-issue Umbrella issue for tracking progress of a larger effort labels Feb 6, 2023
@stefanprodan
Copy link
Member Author

This has been fixed upstream, Kustomize v5 will be shipped in Kubernetes 1.27 next week. After the release we can look into updating Flux.

@siegenthalerroger
Copy link

Is this aimed to be included in the v2 GA or will this be updated in a later release?

@stefanprodan
Copy link
Member Author

stefanprodan commented Apr 13, 2023

Is this aimed to be included in the v2 GA or will this be updated in a later release?

We don't know yet. While Kubernetes cli-runtime was update, the Kubernetes cli-utils is still on the old Kustomize version https://github.com/kubernetes-sigs/cli-utils/blob/ed4ec48b3405206c6c2200adbbc9606ea46b4257/go.mod#L95

@stefanprodan stefanprodan pinned this issue Apr 14, 2023
@stefanprodan
Copy link
Member Author

We've started the upgrade, currently blocked by controller-runtime, ref: fluxcd/pkg#534

@stefanprodan
Copy link
Member Author

We are now waiting on kubernetes-sigs/controller-runtime#2297 that depends on Kubernetes 1.27.2 (scheduled for 17th May).

@stefanprodan
Copy link
Member Author

This is now done and will be part of Flux v2.0.0-rc.4 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kustomization Kustomization related issues and pull requests blocked/upstream Blocked by an upstream dependency or issue umbrella-issue Umbrella issue for tracking progress of a larger effort
Projects
None yet
Development

No branches or pull requests

2 participants