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

Fix a silently dropping Kustomization remote resources #708

Merged
merged 1 commit into from
Dec 18, 2023

Conversation

allenporter
Copy link
Contributor

@allenporter allenporter commented Dec 17, 2023

Fix an issue where kustomizations with remote resources are silently dropped from flux build ks. The behavior change appears to have been introduced in fluxcd/flux2#3763 and #528 when adding filters to ignore the source path. The behavior skips urls since they don't match file paths, but that had the side effect of not including them in the generated Kustomization. This PR reverts to the old behavor of ignoring remote urls and keeping them in the kustomization -- which is fine since source ignore paths are about paths in the source tree and not remote resources.

Fixes fluxcd/flux2#4146 which describes how to reproduce the issue. An example test is included that exercises the issue ensuring the remote resource is included in the filtered kustomization, though does not actually try to build a remote resource.

Signed-off-by: Allen Porter <allen.porter@gmail.com>
@allenporter allenporter force-pushed the flux-generator-remote branch from 524c620 to 99853c5 Compare December 17, 2023 02:56
@stefanprodan stefanprodan added bug Something isn't working area/kustomize Kustomize related issues and pull requests labels Dec 17, 2023
@stefanprodan stefanprodan requested a review from hiddeco December 17, 2023 09:57
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Thank you @allenporter 🙇

@hiddeco hiddeco merged commit acee675 into fluxcd:main Dec 18, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kustomize Kustomize related issues and pull requests bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flux cli build kustomization ignores remote resources
3 participants