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

guides/repository-structure.md: add information on kustomization.yaml and ignoring/excluding files #1668

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

johanneskastl
Copy link

Add a preface regarding the presence of a kustomization.yaml and the consequences, i.e. that files can be excluded/ignored by using a kustomization.yaml

I would also like to see this information in the Kustomization component page, see #1667

… the presence of a kustomization.yaml and the consequences, i.e. that files can be excluded/ignored by using a kustomization.yaml

Signed-off-by: Johannes Kastl <[email protected]>
@johanneskastl johanneskastl force-pushed the 20230921_clarify_kustomization_ignore_files_directories branch from 9ae23e1 to 6e7df33 Compare September 22, 2023 06:31
@stefanprodan
Copy link
Member

I don't think this techical detail should be in here. This doc is more high level, maybe this can be at the bottom with a link to the https://fluxcd.io/flux/components/kustomize/kustomizations/#generating-a-kustomizationyaml-file instead of duplicating the same info.

@johanneskastl
Copy link
Author

I don't think this techical detail should be in here. This doc is more high level, maybe this can be at the bottom with a link to the https://fluxcd.io/flux/components/kustomize/kustomizations/#generating-a-kustomizationyaml-file instead of duplicating the same info.

I dare to object. This details was causing me the most grief in my start with Flux2.
And yes, the repo documentation is high level, but also technical enough that this "detail" should be in it.

Proposal: Only mention the "if kustomization is present then files could be ignored" fact, and move the details to the end.

I would like to see this somewhere other than in the "Generating a kustomization" section, as this does not fit the use case.

@stefanprodan
Copy link
Member

Maybe we could have an info box that points at https://fluxcd.io/flux/faq/#can-i-use-repositories-with-plain-yamls

@johanneskastl
Copy link
Author

Maybe we could have an info box that points at https://fluxcd.io/flux/faq/#can-i-use-repositories-with-plain-yamls

That would be helpful, but also only tells have of the story. My main point is that be default the auto-generated kustomization.yaml contains all manifests, while you can select and exclude if you create one yourself.

@stefanprodan
Copy link
Member

You can exclude files using GitRepository spec.ignore, what's written in https://fluxcd.io/flux/faq/#can-i-use-repositories-with-plain-yamls

@johanneskastl
Copy link
Author

You can exclude files using GitRepository spec.ignore, what's written in https://fluxcd.io/flux/faq/#can-i-use-repositories-with-plain-yamls

Yes, I also found that. But I personally find the kustomization.yaml approach more appealing, because it means I find the root cause for a file exclusion where the excluded files are residing. Specifying that in the GitRepository means it is stored in another place, where it might not be obvious to look.

In the end I think it would not harm to have an infobox or similar on the page, just to make newcomers aware of this. There is more than one way to use Flux and this might be helpful for some.

@johanneskastl
Copy link
Author

@stefanprodan How to proceed? I would really like to see some mention of this in the docs, but of course it is up to you to decide which way you want it to be...

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.

2 participants