fluxcd / flux

Successor: https://github.com/fluxcd/flux2
https://fluxcd.io
Apache License 2.0
6.9k stars 1.08k forks source link

Potential race condition during flux bootstrap #3560

Closed valeriano-manassero closed 2 years ago

valeriano-manassero commented 2 years ago

Describe the bug

A flux bootstrap will fail if the repository already exists and contains:

This results in:

✗ SealedSecret/postgres/postgresql-configs dry-run failed, error: no matches for kind "SealedSecret" in version "bitnami.com/v1alpha1"

This is because the first round of Kustomize apply cannot complete since the CRD is missing but the CRD will be there only after SealedSecret HelmRelease is applied. This will prevent Kustomize to reconcile.

Steps to reproduce

Doing a flux bootstrap on a repository already containing the SealedSecret HelmRelease and another HelmRelease using a SealedSecret CRD.

Expected behavior

Kustomize during bootstrap should proceed even if dry-run fails to enable Helm controller to deploy helm releases.

Kubernetes version / Distro / Cloud provider

1.21.1

Flux version

flux: v0.19.0 helm-controller: v0.12.1 kustomize-controller: v0.16.0 notification-controller: v0.18.0 source-controller: v0.16.0

Git provider

No response

Container Registry provider

No response

Additional context

No response

Maintenance Acknowledgement

Code of Conduct

valeriano-manassero commented 2 years ago

Sorry, I selected wrong repo, opened a new bug on Flux2.