diff --git a/charts/flux2-sync/Chart.yaml b/charts/flux2-sync/Chart.yaml index f6c280d..ee39921 100644 --- a/charts/flux2-sync/Chart.yaml +++ b/charts/flux2-sync/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: flux2-sync type: application -version: 1.14.1 +version: 1.14.2 appVersion: 2.7.5 description: A Helm chart for flux2 GitRepository to sync with sources: @@ -9,3 +9,4 @@ sources: annotations: artifacthub.io/changes: | - "[Chore]: Update App Version to upstream 2.7.5" + - "[feat]: flux2-sync: Add support for sparseCheckout in GitRepository" diff --git a/charts/flux2-sync/README.md b/charts/flux2-sync/README.md index 18396d6..5a96f48 100644 --- a/charts/flux2-sync/README.md +++ b/charts/flux2-sync/README.md @@ -29,6 +29,7 @@ This helm chart is maintained and released by the fluxcd-community on a best eff | gitRepository.spec.recurseSubmodules | bool | `false` | _Optional_ When enabled, after the clone is created, initializes all submodules within, using their default settings. This option is available only when using the ‘go-git’ GitImplementation. | | gitRepository.spec.ref | object | `{"branch":"master"}` | _Optional_ The Git reference to checkout and monitor for changes, defaults to master branch. | | gitRepository.spec.secretRef | object | `{}` | _Optional_ The secret name containing the Git credentials. For HTTPS repositories the secret must contain username and password fields. For SSH repositories the secret must contain identity, identity.pub and known_hosts fields. For GitHub App authentication the secret must contain githubAppID, githubAppInstallationID and githubAppPrivateKey fields. If a secret.create is set, it will point to that one. | +| gitRepository.spec.sparseCheckout | list | `[]` | _Optional_ A list of directories to checkout when cloning the repository | | gitRepository.spec.suspend | string | `""` | _Optional_ This flag tells the controller to suspend the reconciliation of this source. | | gitRepository.spec.timeout | string | `""` | _Optional_ The timeout for remote Git operations like cloning, defaults to 20s. | | gitRepository.spec.url | string | `""` | The repository URL, can be an HTTP/S or SSH address. | diff --git a/charts/flux2-sync/templates/flux-gitrepository.yaml b/charts/flux2-sync/templates/flux-gitrepository.yaml index 840b6d9..65950ba 100644 --- a/charts/flux2-sync/templates/flux-gitrepository.yaml +++ b/charts/flux2-sync/templates/flux-gitrepository.yaml @@ -50,3 +50,7 @@ spec: {{- with .Values.gitRepository.spec.include }} include: {{ toYaml . | nindent 4 }} {{- end }} + {{- with .Values.gitRepository.spec.sparseCheckout }} + sparseCheckout: + {{ toYaml . | nindent 4 }} + {{- end }} diff --git a/charts/flux2-sync/values.yaml b/charts/flux2-sync/values.yaml index bf80682..524aa83 100644 --- a/charts/flux2-sync/values.yaml +++ b/charts/flux2-sync/values.yaml @@ -68,6 +68,9 @@ gitRepository: # -- _Optional_ Extra git repositories to map into the repository include: [] + # -- _Optional_ List of directories to checkout when cloning the repository + sparseCheckout: [] + kustomization: labels: {}