renovate/lib/modules/manager/flux
Zodan Jodan e68419d546
feat: adding GitRepository resource support in flux (#18782)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-11-21 22:35:13 +00:00
..
__fixtures__ feat: adding GitRepository resource support in flux (#18782) 2022-11-21 22:35:13 +00:00
artifacts.spec.ts feat(manager/flux): support system manifest inside subdirectories (#18605) 2022-10-31 11:47:03 +00:00
artifacts.ts refactor(manager): pass through UpdateArtifact generic type (#18205) 2022-10-08 23:13:43 +02:00
common.ts feat(manager/flux): support system manifest inside subdirectories (#18605) 2022-10-31 11:47:03 +00:00
extract.spec.ts feat: adding GitRepository resource support in flux (#18782) 2022-11-21 22:35:13 +00:00
extract.ts feat: adding GitRepository resource support in flux (#18782) 2022-11-21 22:35:13 +00:00
index.ts feat: adding GitRepository resource support in flux (#18782) 2022-11-21 22:35:13 +00:00
readme.md feat: adding GitRepository resource support in flux (#18782) 2022-11-21 22:35:13 +00:00
types.ts feat: adding GitRepository resource support in flux (#18782) 2022-11-21 22:35:13 +00:00

This manager parses Flux YAML manifests and supports:

  1. HelmRelease resources
  2. 'GitRepository' resources
  3. Flux system manifests

HelmRelease support

Extracts helm dependencies from HelmRelease resources.

The flux manager only extracts helm dependencies for HelmRelease resources linked to HelmRepository or GitRepository sources. Renovate does not support OCI HelmRepository sources, those with type: oci.

In addition, for the flux manager to properly link HelmRelease and HelmRepository resources, both of the following conditions must be met:

  1. The HelmRelease resource must either have its metadata.namespace property set or its spec.chart.spec.sourceRef.namespace property set
  2. The referenced HelmRepository resource must have its metadata.namespace property set

Namespaces will not be inferred from the context (e.g. from the parent Kustomization).

Renovate updates HelmRelease resources coming from GitRepository by updating the GitRepository resource.

GitRepository support

Renovate can update git references from GitRepository resources.

The flux manager only updates GitRepository fields that have a tag or commit key.

Flux system manifests support

Support updating Flux system manifests generated during Flux installation.

Updating system manifests requires that either:

  1. The flux tool is pre-installed, or
  2. You run a Docker image based on containerbase, such as the official Renovate images, and have binarySource=install configured

Non-configured fileMatch

By default, the flux manager will only match flux-system/{.,**}/gotk-components.yaml (i.e. system manifest) files.

This is because there is no commonly accepted file/directory naming convention for Flux manifests and we don't want to check every single *.yaml file in repositories just in case some of them have Flux definitions.

If most .yaml files in your repository are Flux manifests, then you could add this to your config:

{
  "flux": {
    "fileMatch": ["\\.yaml$"]
  }
}

If instead you have all your Flux manifests inside a flux/ directory, you would add this:

{
  "flux": {
    "fileMatch": ["flux/.+\\.yaml$"]
  }
}

Versioning

If you need to change the versioning format, read the versioning documentation to learn more.