fix(fluxcd): use GA API versions in reconcile kind_map (v2 / v1)#6408
Open
ayoubil wants to merge 1 commit intokeephq:mainfrom
Open
fix(fluxcd): use GA API versions in reconcile kind_map (v2 / v1)#6408ayoubil wants to merge 1 commit intokeephq:mainfrom
ayoubil wants to merge 1 commit intokeephq:mainfrom
Conversation
The reconcile_resource path was hard-coded to old beta APIs (v2beta1 for HelmRelease, v1beta2 for the rest), which were removed when FluxCD migrated to GA APIs in v2.7. The corresponding list_* methods in this provider already query the GA versions; this aligns the reconcile path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5394 (partial — see scope note below).
The FluxCD provider's
reconcile_resourcepath uses a hard-codedkind_mapthat still points at pre-GA API versions:These APIs were removed in FluxCD 2.7, when the controllers promoted to GA:
helm.toolkit.fluxcd.io/v2,kustomize.toolkit.fluxcd.io/v1, andsource.toolkit.fluxcd.io/v1. On a 2.7+ cluster, any Reconcile button click from Keep currently fails with a 404 from the Kubernetes API.The corresponding
__list_helm_releases,__list_kustomizations,__list_git_repositories, etc. methods in the same file already query the GA versions, so this PR aligns the reconcile path with how the provider already lists these resources.Diff
Scope note (please read before merging)
This PR fixes one concrete consequence of the FluxCD 2.7 GA migration: the Reconcile button → 404 failure path. It does not fully address #5394, which is about HelmReleases not appearing on the topology map.
__list_helm_releasesalready usesv2so the listing should succeed; the remaining gap likely lives in the v2 schema-shape parsing inside__build_topology(e.g. thespec.chartvsspec.chartRefchange). I don't have a 2.7 cluster handy to verify that side.If you'd prefer to keep #5394 open for the topology-display work, please change the keyword to "Relates to #5394" (or just reopen the issue after merge) — happy either way.
Compatibility
For users on FluxCD < 2.7 the old beta APIs were already deprecated and removed in newer cluster versions. If a backwards-compatible reconcile is desired, the same probing pattern used elsewhere in the file (try
v2, fall back tov2beta2/v2beta1) could be added — let me know if that's preferred and I'll iterate.