Skip to content

k8s: Add support for 1.31.0#34463

Merged
aanm merged 3 commits intocilium:mainfrom
christarazi:pr/christarazi/k8s-1.31
Sep 9, 2024
Merged

k8s: Add support for 1.31.0#34463
aanm merged 3 commits intocilium:mainfrom
christarazi:pr/christarazi/k8s-1.31

Conversation

@christarazi
Copy link
Copy Markdown
Member

@christarazi christarazi commented Aug 20, 2024

  • go.mod: Bump controller-tools to v0.16.1
  • docs: Update kindest/node instructions for K8s upgrade
  • k8s: Add support for 1.31.0

@christarazi christarazi added area/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. labels Aug 20, 2024
@christarazi christarazi changed the title pr/christarazi/k8s 1.31 k8s: Add support for 1.31.0 Aug 20, 2024
@christarazi
Copy link
Copy Markdown
Member Author

/test

@christarazi christarazi marked this pull request as ready for review August 20, 2024 06:42
@christarazi christarazi requested review from a team as code owners August 20, 2024 06:42
@christarazi christarazi enabled auto-merge August 20, 2024 06:42
Copy link
Copy Markdown
Contributor

@learnitall learnitall left a comment

Choose a reason for hiding this comment

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

Docs changes look good, thanks!

Copy link
Copy Markdown
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

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

The "Build commits" workflow failure looks legitimate. Probably the commits need to be reordered/squashed?

Otherwise LGTM, thanks!

@christarazi christarazi force-pushed the pr/christarazi/k8s-1.31 branch 3 times, most recently from 94b3d66 to 90d6e04 Compare August 23, 2024 02:18
@christarazi
Copy link
Copy Markdown
Member Author

CI should be fixed now. There was a breaking change in the K8s code generation dependencies that was tricky to nail down. See first commit msg for more details.

@christarazi
Copy link
Copy Markdown
Member Author

/test

@sayboras sayboras force-pushed the pr/christarazi/k8s-1.31 branch from 3d465ec to 94f11e9 Compare September 8, 2024 10:09
@sayboras
Copy link
Copy Markdown
Member

sayboras commented Sep 8, 2024

/test

@sayboras sayboras marked this pull request as ready for review September 8, 2024 12:04
@sayboras sayboras requested a review from a team as a code owner September 8, 2024 12:04
@sayboras sayboras requested a review from dlapcevic September 8, 2024 12:04
@sayboras
Copy link
Copy Markdown
Member

sayboras commented Sep 8, 2024

Force pushed to fix the related CI failures + rebase with main branch.

All CI jobs seem green now, marking this ready for review if you don't mind.

To support the upgrade to Kubernetes v1.31, controller-tools needs to be
bumped. See
kubernetes-sigs/controller-tools#1017 for more
background.

This commit partially bumps additionally dependencies for Kubernetes
v1.31 as controller-tools v0.16.1 relies on the former. Therefore, this
commit adjusts Cilium code to the new APIs from the v1.31 dependencies.
A subsequent commit will add the remaining support for v1.31.

Additionally, add the `groupName` directive to core API group slim
files. Due to the change in
kubernetes/code-generator@3d2e34f,
this causes the `make generate-k8s-api` to generate code with the wrong
API path for objects under core/v1. This causes all watchers for core/v1
objects in Cilium to break.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
The kind node images have moved to a new location, so update the
instructions accordingly.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
Bump the remaining dependencies of Kubernetes from the previous commit
and update CI to the this Kubernetes version. Remove v1.27 from the
testing matrix.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
@aanm aanm force-pushed the pr/christarazi/k8s-1.31 branch from 94f11e9 to 0a52987 Compare September 9, 2024 08:28
@aanm aanm enabled auto-merge September 9, 2024 08:28
@sayboras
Copy link
Copy Markdown
Member

sayboras commented Sep 9, 2024

/test

@aanm aanm added this pull request to the merge queue Sep 9, 2024
Merged via the queue into cilium:main with commit cdf1011 Sep 9, 2024
@julianwiedmann
Copy link
Copy Markdown
Member

Given that this touches CI - should it have been tested from a cilium/cilium branch, instead of a forked repo?

@mhofstetter
Copy link
Copy Markdown
Member

mhofstetter commented Sep 9, 2024

Given that this touches CI - should it have been tested from a cilium/cilium branch, instead of a forked repo?

Probably yes. It seems as /ci-ginkgo workflows are failing on PRs for k8s v1.27 after removing the mapping k8s v1.27 to kind image

Error: cannot pull image quay.io/lvh-images/kind:: invalid reference format

Trying to fix it over here: #34773

@christarazi christarazi deleted the pr/christarazi/k8s-1.31 branch September 9, 2024 17:04
@christarazi
Copy link
Copy Markdown
Member Author

christarazi commented Sep 9, 2024

Given that this touches CI - should it have been tested from a cilium/cilium branch, instead of a forked repo?

Hm, that's something I didn't think about. I'll update the docs to explicitly mention this detail so we can avoid this situation on the next K8s bump.

Edit: #34791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.