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

Use the dynamic RESTMapper from controller-runtime v0.19 #1377

Merged
merged 3 commits into from
Feb 25, 2025

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Feb 25, 2025

This PR replaces the RESTMapper shipped in controller-runtime v0.20 for health check operations.

The Kubernetes Aggregated Discovery was enabled in controller-runtime#2901 and looks like this feature is buggy resulting in old API versions being returned as the preferred version randomly. While running the health checks, the controller would query old versions resulting in spurious logs about deprecated versions and in some cases, the health check would even fail.

This was observed on lots of cluster by Flux users, including on Kubernetes 1.32, 1.31 and OpenShift 4.16.

Depends on: fluxcd/pkg#873
Supersedes: #1374
Fixes: #1373

Test images:

  • ghcr.io/fluxcd/kustomize-controller:rc-8b6f4bc6
  • docker.io/fluxcd/kustomize-controller:rc-8b6f4bc6

@stefanprodan stefanprodan added the dependencies Pull requests that update a dependency label Feb 25, 2025
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan added the backport:release/v1.5.x To be backported to release/v1.5.x label Feb 25, 2025
@stefanprodan stefanprodan merged commit c353f1e into main Feb 25, 2025
6 checks passed
@stefanprodan stefanprodan deleted the lazy-restmapper branch February 25, 2025 13:50
@fluxcdbot
Copy link
Member

Successfully created backport PR for release/v1.5.x:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:release/v1.5.x To be backported to release/v1.5.x dependencies Pull requests that update a dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flux 2.5 seems to use old/deprecated versions of API
3 participants