Skip to content

Update kustomize to v5.7.0 and add regression test for multiple patch delete#1470

Merged
matheuscscp merged 2 commits intofluxcd:mainfrom
cappyzawa:update-kustomize-v5.7.0
Jun 29, 2025
Merged

Update kustomize to v5.7.0 and add regression test for multiple patch delete#1470
matheuscscp merged 2 commits intofluxcd:mainfrom
cappyzawa:update-kustomize-v5.7.0

Conversation

@cappyzawa
Copy link
Copy Markdown
Member

@cappyzawa cappyzawa commented Jun 29, 2025

Update kustomize dependency from v5.6.0 to v5.7.0 and add regression test for multiple $patch: delete directives in strategic merge patches.

Multiple $patch: delete strategic merge patches in a single patch file cause panic in kustomize v5.6.0. This has been fixed in v5.7.0.

The regression test is based on #1466.

Resolves #1306
Part of fluxcd/flux2#5430

The v5.7.0 release fixes panic issues that occur when using multiple
$patch: delete directives in a single strategic merge patch. This was
causing kustomize build to fail with nil pointer dereference errors.

This change updates:
- sigs.k8s.io/kustomize/api from v0.19.0 to v0.20.0
- sigs.k8s.io/kustomize/kyaml from v0.19.0 to v0.20.0
- sigs.k8s.io/yaml from v1.4.0 to v1.5.0 (dependency update)

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
This test ensures that the controller properly handles multiple
$patch: delete directives in strategic merge patches, which was
causing panic errors in kustomize v5.6.0 but is now fixed in v5.7.0.

The test includes two scenarios:
- Multiple delete directives in a single patch (the main fix)
- Multiple delete directives in separate patches (previously a workaround)

Signed-off-by: cappyzawa <cappyzawa@gmail.com>
Copy link
Copy Markdown
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

Thanks very much @cappyzawa!

@matheuscscp matheuscscp merged commit 8c1d87b into fluxcd:main Jun 29, 2025
5 of 6 checks passed
@cappyzawa cappyzawa deleted the update-kustomize-v5.7.0 branch June 30, 2025 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kustomization reconciliation fails on multiple $patch: delete uses in a single strategic merge patch

2 participants