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
✨ bump controller-runtime to v0.15.0 #3421
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kkkkun The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @kkkkun. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into that.
Following some considerations:
-
You need to update your branch with the master. See that when you run make generate, it made updates on the samples reverting changes addressed. It will fail in the CI
-
I recommend you pull the PR ⚠️ (go/v4): upgrade controller runtime from 0.14 to 0.15 #3394 and continue the work since it fixed many issues. We have breaking changes to address regards webhooks and their templates. Either these changes will affect the hack scripts that generate the docs samples.
The above PR shows fix the issues, but we are still facing a problem in the e2e tests that need to be fixed
- We either need to bump a commit of the declarative plugin where it is using go 1.20, controller-runtime latest release + k8s 1.27
See: https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/declarative/v1/api.go#L35 (we usually contribute with the project to ensure that all is bumped to use the latest k8s version)
… in breaking changes
1a0f948
to
2f1601f
Compare
Thanks. I cherry-pick #3394 and update controller-runtime to v0.15.0-beta.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ok-to-test
cronjoblog.Info("validate create", "name", r.Name) | ||
|
||
return r.validateCronJob() | ||
return nil, r.validateCronJob() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to check if that would be the best approach but I think we can either to do in a follow up.
See the CI results. However, the e2e should be passing. It should only fail in the pull-kubebuilder-test because of the above. So, your PR will be good when it has been passing in ALL tests less |
Should we wait PR kubernetes-sigs/kubebuilder-declarative-pattern#335 merge firstly ? |
You can comment the test for the declarative here: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/testdata/test.sh#L36 Then, ALL tests should be passing less APIDiff CI check. |
2f1601f
to
0fff6b1
Compare
build/.goreleaser.yml
Outdated
release: | ||
github: | ||
owner: kubernetes-sigs | ||
name: kubebuilder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kkkkun can you revert ?
0fff6b1
to
9df9d78
Compare
|
I don't know those failed reason. |
Hi @kkkkun, You first need to sort out the breaking changes: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_kubebuilder/3421/pull-kubebuilder-test/1659791412230623232 See that we need to change the scaffolds to address the changes on the controller-runtime Then, regards:
See that we create a pod with a curl image so that we can test the metrics config and been exported with prometheus enabled. In this case, the error is here : kubebuilder/test/e2e/v4/plugin_cluster_test.go Lines 305 to 317 in a6fca17
You can try add either running by replacing |
In my env, it's normal. I would check again.
|
Hi @kkkkun, See that we still unable to bump. We need to address the breaking changes; https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_kubebuilder/3421/pull-kubebuilder-test/1660213955664023552 |
The break changes caused that
Here we just need to upgrade |
Signed-off-by: kkkkun <scuzk373x@gmail.com>
a3b70b2
to
6a32a3d
Compare
Hi @kkkkun, That is great. We have only one small issue to solve now in the tests, see:
It is failing to connect in to pod to get the metrics. |
The overall updates looks good to me. Nits: current updates seems NOT passed by
Looks like, update_webhook requires update. Check on other steps might also necessary. |
@camilamacedo86 @kkkkun Passing the config file options, err = options.AndFrom(ctrl.ConfigFile().AtPath(configFile)) I tried running the controller locally, where the error came:
This is possibly because controller-runtime@0.15.0 is deprecating Guess the following PR brings the breaking change: One possible hotfix maybe to change the code by referencing here: However, since such feature is deprecating, I'm wondering if we'd keep the support for it still? Would it be too earlier or good to remove the scaffolding/project of component-config ? |
I test my local passed.
|
The @kkkkun, The above failures are in the e2e tests. Those are that one that we need to solve. That #3421 (comment) is great work. So, we need to change our scaffold to do as suggested. |
@Kavinjsir I found a work around for the issue you are seeing, just don't register the custom config type with the scheme. It doesn't seem to be necessary. |
@Kavinjsir @kkkkun @camilamacedo86 @hsyed-dojo @everettraven I just took a look at the code base and the changes made in controller-runtime. When dug deeper, the error looks like:
This means when This aside, based on the deprecation mentioned in controller-runtime, it looks like the correct method to pass the config would be in
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), manager.Options{
Scheme: scheme,
Controller: config.Controller{
NeedLeaderElection: pointer.Bool(true),
MaxConcurrentReconciles: 2,
},
})
I would vote for (2) as of now, since the decision on removing the component config is not final yet in controller-runtime. If there are folks ready to maintain the code in controller-runtime, then we can support the same here. Till then we can deprecate and mention in our docs stating that component config option is deprecated from KB, is not tested or officially supported. The decision on whether to remove it entirely, will be based on controller-runtime and would not block this PR. |
I vote for 2 as well. I switched our operators away from component config today. What I'd really like from the controller runtime is a prescribed solution for watching and reacting to a specific/singleton custom resource under the supervision of the manager. Kubebuilder could then just document how to do "custom component config" without any templating changes needed. |
Since there is majority on Option (2), @kkkkun would it be possible for you to deprecate the component config related code and tests in this PR for moving forward with this. If needed, I can help in creating a PR against your branch, to move things faster. (Having a separate PR would be a duplicate since we need c-r 0.15.0 for deprecation). Feel free to let us know. Thanks for working on this! |
That's OK. Thanks for your help. |
HI @kkkkun,
Can you do that?
a) Create an issue in controller-runtime with:
b) Create a WARNING note and link this issue to explain for our users that from the next release 3.11.0 we can no longer ensure that it is working due this issue + it is deprecated due CONTROLLER RUNTIME decide to deprecate it and we should link either: kubernetes-sigs/controller-runtime#895. Therefore, due controller runtime be unable to ensure the backwords compatibilities when it was deprecate and its release 0.15.0 we are no longer able to ensure this feature and it should be removed in the future. c/c @varshaprasad96 @Kavinjsir @everettraven ^ |
Signed-off-by: kkkkun <scuzk373x@gmail.com>
1f5fcb6
to
52bac91
Compare
@kkkkun: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Thanks you. Continue to bump in #3394. I would close this. |
bump controller-runtime to v0.15.0-beta.0
Partial : #3376