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

Bump controller-runtime to v0.14.x #420

Merged
merged 20 commits into from Apr 21, 2023

Conversation

birkland
Copy link
Contributor

@birkland birkland commented Feb 21, 2023

controller-runtime introduced breaking changes in the status API from v0.13.x -> v0.14.x. Unfortunately, upstream Istio is now aligned with v1.14.x, so bumping skv2 is a necessary prerequisite for repos that want to include istio.io/istio@v1.17.0 or newer.

This PR bumps the dependencies, updates API signatures, and updates codegen templates to comply. I don't know why codegen updated schema json files.
BOT NOTES:
resolves #419

@solo-changelog-bot
Copy link

Issues linked to changelog:
#419

@@ -0,0 +1,5 @@
changelog:
- type: BREAKING_CHANGE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also list the DEPENDENCY_BUMPS, particularly k8s.io/api and controller-runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, those seem reasonable. All were a consequence of pulling in controller-runtime.

@@ -129,10 +129,10 @@ type {{ $resource.Kind }}Writer interface {
type {{ $resource.Kind }}StatusWriter interface {
// Update updates the fields corresponding to the status subresource for the
// given {{ $resource.Kind }} object.
Update{{ $resource.Kind }}Status(ctx context.Context, obj *{{ $import_prefix }}{{ $resource.Kind }}, opts ...client.UpdateOption) error
Update{{ $resource.Kind }}Status(ctx context.Context, obj *{{ $import_prefix }}{{ $resource.Kind }}, opts ...client.SubResourceUpdateOption) error
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you know why these had to be renamed? as far as i can tell, UpdateOption and PatchOption both still exist in controller-runtime. do they behave differently in the newest controller-runtime (e.g., are they enforcing that we call the 'subresource' methods on statuses now)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From kubernetes-sigs/controller-runtime#2072

Use distinct options for subresource Update and Patch which makes this a breaking change

So I can't comment on why these API breakages had to happen other than link to the upstream pull request, but I can say that while UpdateOption and PatchOption` still exist, but now can only be applied to resources that aren't subresources.

@@ -8076,6 +8194,67 @@
"type": "null"
}
]
},
"schedulingGates": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like these and other schema.json updates came from new fields being added to the pod spec in the latest k8s api

jenshu
jenshu previously approved these changes Mar 14, 2023
@ashleywang1
Copy link
Contributor

The GME PR that uses this branch is here and has trouble compiling.

@t-edris
Copy link
Contributor

t-edris commented Apr 21, 2023

what lol
Changelog bot failed before the last commit because it was v0.30.0, so I moved it to v0.29.6, but now it's failing because it's not v0.30.0?

k8s.io/code-generator v0.26.4
k8s.io/klog/v2 v2.80.1
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448
sigs.k8s.io/controller-runtime v0.14.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/kubernetes-sigs/controller-runtime/blob/main/go.mod#L3
We should bump our go version to align with this dependency

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, will do. Is that something that would be called out in the Changelog as well?

@soloio-bulldozer soloio-bulldozer bot merged commit ff4b71e into master Apr 21, 2023
3 checks passed
@soloio-bulldozer soloio-bulldozer bot deleted the birkland/controller-runtime branch April 21, 2023 19:33
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

Successfully merging this pull request may close these issues.

Bump controller-runtime to 0.14.x
6 participants