mirror of
https://github.com/fluxcd/flux2.git
synced 2026-05-23 09:55:55 +00:00
detectFileUpgrades hard-coded the kind: lookup at apiVersion line+1, so manifests with any other field (metadata:, comments, annotations) or reversed field order silently returned "no migration needed" even when apiVersion was deprecated (#5839). Search within the current YAML document boundaries: scan backwards to the previous '---' separator or start-of-file, then forwards to the next '---' separator. First kind: line wins. The order is backwards-then-forwards so that for a conventional apiVersion/kind ordering we only scan the single line + the document boundary; the forward fallback covers the reversed-order case. Adds a regression fixture with three documents covering: - apiVersion first, kind after metadata: - kind first, apiVersion after metadata: - kind first, apiVersion last Fixes #5839 Signed-off-by: SAY-5 <SAY-5@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| build-kustomization | ||
| check | ||
| cluster_info | ||
| create_hr | ||
| create_secret | ||
| create_source_chart | ||
| create_source_git | ||
| create_source_helm | ||
| create_tenant | ||
| debug_helmrelease | ||
| debug_kustomization | ||
| diff-artifact | ||
| diff-kustomization | ||
| envsubst | ||
| export | ||
| get | ||
| helmrelease | ||
| image | ||
| kustomization | ||
| logs | ||
| migrate/file-system | ||
| oci | ||
| trace | ||
| tree | ||