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.2 #3991

Closed
5 tasks done
stefanprodan opened this issue Jun 20, 2023 · 5 comments
Closed
5 tasks done

Update Flux controllers to Kustomize v5.2 #3991

stefanprodan opened this issue Jun 20, 2023 · 5 comments
Labels
umbrella-issue Umbrella issue for tracking progress of a larger effort

Comments

@stefanprodan
Copy link
Member

stefanprodan commented Jun 20, 2023

We should update Flux from Kustomize v5.0.3 to v5.2.1 which comes with a major breaking change: Kustomize components are now applied after generators.

TODOs

Use kustomize/api@v0.15.0 and kustomize/kyaml@v0.15.0 in:

  • fluxcd/pkg
  • fluxcd/kustomize-controller
  • fluxcd/helm-controller
  • fluxcd/image-automation-controller
  • fluxcd/flux2

Blockers

ℹ️ Fixed by hard forking Kubernetes cli-utils under https://github.com/fluxcd/cli-utils

As with every Kustomize API minor release, we can't upgrade right away. This time, the issue is that Kustomize has switched to google/gnostic-models while Kubernetes and controller-runtime are using google/gnostic, which are incompatible and make Flux panic:

panic: proto: file "extensions/extension.proto" is already registered
        previously from: "github.com/google/gnostic-models/extensions"
        currently from:  "github.com/google/gnostic/extensions"
See https://protobuf.dev/reference/go/faq#namespace-conflict


goroutine 1 [running]:
google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x102cdd5a0?, 0xc000478050?}, {0x102cdd5a0?, 0xc000478090})
        /Users/stefanprodan/go/pkg/mod/google.golang.org/protobuf@v1.30.0/reflect/protoregistry/registry.go:56 +0x264
google.golang.org/protobuf/reflect/protoregistry.(*Files).RegisterFile(0xc0001b6450, {0x102cffca0?, 0xc0002d16c0?})
        /Users/stefanprodan/go/pkg/mod/google.golang.org/protobuf@v1.30.0/reflect/protoregistry/registry.go:130 +0x3d8
google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x1029c13a6, 0x24}, {0x1039cc580, 0x282, 0x282}, 0x0, 0x4, 0x0, 0x0, {0x102ce2718, ...}, ...})
        /Users/stefanprodan/go/pkg/mod/google.golang.org/protobuf@v1.30.0/internal/filedesc/build.go:112 +0x22c
google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x1029c13a6, 0x24}, {0x1039cc580, 0x282, 0x282}, 0x0, 0x4, 0x0, 0x0, {0x0, ...}, ...}, ...})
        /Users/stefanprodan/go/pkg/mod/google.golang.org/protobuf@v1.30.0/internal/filetype/build.go:138 +0x22c
github.com/google/gnostic/extensions.file_extensions_extension_proto_init()
        /Users/stefanprodan/go/pkg/mod/github.com/google/gnostic@v0.6.8/extensions/extension.pb.go:456 +0x1d8
github.com/google/gnostic/extensions.init.0()
        /Users/stefanprodan/go/pkg/mod/github.com/google/gnostic@v0.6.8/extensions/extension.pb.go:388 +0x24

Before we can update Kustomize, we need to wait for all our dependencies: Kubernetes, controller-runtime, Helm, Cosign, etc, to replace the usage of google/gnostic with google/gnostic-models. This will probably take many months 😢

Refs:

@stefanprodan stefanprodan added blocked/upstream Blocked by an upstream dependency or issue umbrella-issue Umbrella issue for tracking progress of a larger effort labels Jun 20, 2023
@stefanprodan stefanprodan pinned this issue Jun 20, 2023
@aryan9600
Copy link
Member

this should be unblocked by the release of Kubernetes v1.28.0

@stefanprodan
Copy link
Member Author

stefanprodan commented Aug 22, 2023

Kubernetes 1.28.0 is just one of many Flux dependencies that must move to gnostic-models.

Waiting on:

After cli-utils has been migrated to gnostic-models, we need to reach to Cosign to do the switch.

@Ph0tonic
Copy link

Hi, where are we with this issue ? It seems that #3284 may be link to this one as we would need to update to kubernetes 1.28.

@stefanprodan
Copy link
Member Author

@Ph0tonic see kubernetes/kubernetes#118340 (comment)

@stefanprodan stefanprodan changed the title Update Flux controllers to Kustomize v5.1 Update Flux controllers to Kustomize v5.2 Nov 20, 2023
@stefanprodan
Copy link
Member Author

stefanprodan commented Nov 20, 2023

We decided to hard fork sigs.k8s.io/cli-utils under https://github.com/fluxcd/cli-utils to unblock the Kubernetes v1.28 and Kustomize v5.2 update of the Flux controllers.

We'll ship Kustomize v5.2 with Flux v2.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
umbrella-issue Umbrella issue for tracking progress of a larger effort
Projects
None yet
Development

No branches or pull requests

3 participants