flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Update dependencies to Kubernetes 1.30

Open relu opened this issue 9 months ago • 6 comments

Changes:

  • Update k8s.io/* packages to v0.30.0.
  • Update fmt and test-fmt in Makefile to replace use of gofmt.
  • Refactor code generation utility hack and replace deprecated k8s.io/code-generator codegen scripts.

relu avatar May 02 '24 09:05 relu

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 34.10%. Comparing base (e3a529e) to head (5e6815d). Report is 18 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1638       +/-   ##
===========================================
- Coverage   56.51%   34.10%   -22.42%     
===========================================
  Files          85      282      +197     
  Lines        8571    20557    +11986     
===========================================
+ Hits         4844     7011     +2167     
- Misses       3053    12616     +9563     
- Partials      674      930      +256     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 02 '24 10:05 codecov-commenter

Hey 👋 I believe this will trigger https://github.com/fluxcd/flagger/issues/1201 . We should warn somewhere that an upgrade will trigger a rollout of every canary.

As a solution for the previous issue could we change the hash function so that it doesn't change during a lib upgrade? Thanks

joaosilva15 avatar May 06 '24 08:05 joaosilva15

The serialisation seems to be same, otherwise the CI would fail in this PR.

stefanprodan avatar May 06 '24 08:05 stefanprodan

Can you point me to the test that is doing it for the deployment spec? I could not find it and doing local tests we did end up with differences using the lib for k8s 1.27 vs 1.30

joaosilva15 avatar May 06 '24 09:05 joaosilva15

There is one important addition from K8s 1.28 that could cause the above-mentioned issue: sidecar container support via the new .initContainers[].restartPolicy field. This is the reason that prompted me to submit the PR in the first place 😄

relu avatar May 06 '24 10:05 relu

I've updated the kind node version used in e2e tests. Pinned to v1.29.2 as that's the latest stable version available.

relu avatar May 06 '24 11:05 relu

@relu there is a new kind release that supports 1.30, please update the workflow to https://github.com/kubernetes-sigs/kind/releases/tag/v0.23.0

stefanprodan avatar May 14 '24 08:05 stefanprodan