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

SDK not compatible with controller-runtime v0.16.2 #6608

Closed
bodji opened this issue Oct 17, 2023 · 3 comments
Closed

SDK not compatible with controller-runtime v0.16.2 #6608

bodji opened this issue Oct 17, 2023 · 3 comments

Comments

@bodji
Copy link

bodji commented Oct 17, 2023

Bug Report

The SDK init generates code that is not working with controller-runtime v0.16.2

# command-line-arguments
cmd/main.go:71:3: unknown field MetricsBindAddress in struct literal of type manager.Options
cmd/main.go:72:3: unknown field Port in struct literal of type manager.Options

This commit removed MetricsBindAddress in manager.Options :
kubernetes-sigs/controller-runtime@e59161e

What did you do?

$ operator-sdk init --domain xxx.tld --repo xxx --plugins go/v4-alpha .

Then, I added an external CRD from Prometheus operator.

The prometheus operator has a dependency on controller-runtime v0.16.2 :
https://github.com/prometheus-operator/prometheus-operator/blob/main/go.mod#L44

Environment

  • Operator SDK version : operator-sdk version: "v1.32.0", commit: "4dcbbe343b29d325fd8a14cc60366335298b40a3", kubernetes version: "1.26.0", go version: "go1.19.13", GOOS: "darwin", GOARCH: "arm64"
  • Platform : Mac OS
  • Architecture : darwin-arm64
@everettraven
Copy link
Contributor

everettraven commented Oct 17, 2023

Hi @bodji - thanks for raising this issue! This is likely because we haven't yet upgraded the Operator-SDK to work with the kubernetes 1.28 libraries that controller-runtime v0.16.z looks to be based on. The work to enable Kubernetes 1.28 support is tracked in #6554

The appropriate workaround for now would be to manually update your dependencies and resolve any conflicts.

@bodji
Copy link
Author

bodji commented Oct 18, 2023

I see :)

Ok, I can remove MetricsBindAddress and Port from the generated code then :)

Thank you very much for your quick answer !

@varshaprasad96 varshaprasad96 modified the milestone: v1.33.0 Oct 30, 2023
@varshaprasad96
Copy link
Member

Closing this issue, since #6554 is tracking the required changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants