From 6e7df33fcfbc4f77586035576ad5c7355ac295c1 Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Fri, 22 Sep 2023 08:29:22 +0200 Subject: [PATCH] content/en/flux/guides/repository-structure.md: add preface regarding 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 --- content/en/flux/guides/repository-structure.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/en/flux/guides/repository-structure.md b/content/en/flux/guides/repository-structure.md index 1c9c21fff..f10fc0da3 100644 --- a/content/en/flux/guides/repository-structure.md +++ b/content/en/flux/guides/repository-structure.md @@ -8,6 +8,21 @@ weight: 10 This guide walks you through several approaches of organizing repositories for a smooth GitOps experience with Flux. +## Preface + +Flux by default uses all manifests in a directory and its subdirectories, unless +it finds a `kustomization.yaml` file containing a Kubernetes kustomization +(`kustomize.config.k8s.io/v1beta1`, not the Flux2 kind). + +If there is no `kustomization.yaml`, one will be generated on-the-fly, using all +manifests found in the directory and its subdirectories. + +If there is a `kustomization.yaml` file, it is used directly. In this case, only +the manifests mentioned in the file are being used. + +This is a nice way to exclude files from being used, in case those files are to +be used by a second Flux Kustomization. + ## Monorepo In a monorepo approach you would store all your Kubernetes manifests in a single Git repository.