flux2: Bootstrap fails the first time

Describe the bug

When running bootstrap on a github repository it seems to always fail the first time with:

installing components in "flux-system" namespace
Kustomization/flux-system/flux-system dry-run failed, error: no matches for kind "Kustomization" in version "kustomize.toolkit.fluxcd.io/v1beta2"

After running the exact same bootstrap command again it works as expected. The bootstrap command is flux bootstrap github --owner=*** --repository=*** --path=some/repo/path --personal

Any ideas what this might be about?

Steps to reproduce

N/A

Expected behavior

N/A

Screenshots and recordings

No response

OS / Distro

Windows 10

Flux version

0.25.3

Flux check

N/A

Git provider

github

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 30 (11 by maintainers)

Most upvoted comments

Great news! This was a hard bug to reproduce, thanks Weaveworks for providing me with a 64GB RAM MacBook πŸ˜ƒ) I had to run dozen Kind clusters in parallel to catch this.

@mibollma we have e2e tests for Azure AKS that are run daily, there are no failures so far.

@kingdonb @SomtochiAma can you please help me out with testing bootstrap on AKS?

@youwalther65 You can see the difference between terraform provider v0.10.2 and v0.10.1 here:

https://github.com/fluxcd/terraform-provider-flux/compare/v0.10.1...v0.10.2

(The change is in Flux 0.26.3, which was the version that was utilized in flux-terraform-provider v0.10.2 πŸ‘ )

fixed for me with version 0.26.2 πŸ˜•

Same here! Any workaround (other than running twice πŸ₯΄)? Trying to automatize in a Gitlab CI/CD Pipeline.

1st run:

$ flux bootstrap gitlab  --context=eks-cluster \ # collapsed multi-line command
β–Ί connecting to https://gitlab.com
β–Ί cloning branch "*****" from Git repository "https://gitlab.com/*****"
βœ” cloned repository
β–Ί generating component manifests
βœ” generated component manifests
βœ” component manifests are up to date
β–Ί installing components in "flux-system" namespace
βœ— Kustomization/flux-system/flux-system dry-run failed, error: no matches for kind "Kustomization" in version "kustomize.toolkit.fluxcd.io/v1beta2"

2nd run:

$ flux bootstrap gitlab  --context=eks-cluster \ # collapsed multi-line command
β–Ί connecting to https://gitlab.com
β–Ί cloning branch "*****" from Git repository "https://gitlab.com/*****"
βœ” cloned repository
β–Ί generating component manifests
βœ” generated component manifests
βœ” component manifests are up to date
β–Ί installing components in "flux-system" namespace
βœ” installed components
βœ” reconciled components
β–Ί determining if source secret "flux-system/flux-system" exists
β–Ί generating source secret
β–Ί applying source secret "flux-system/flux-system"
βœ” reconciled source secret
β–Ί generating sync manifests
βœ” generated sync manifests
βœ” sync manifests are up to date
β–Ί applying sync manifests
βœ” reconciled sync configuration
β—Ž waiting for Kustomization "flux-system/flux-system" to be reconciled
βœ” Kustomization reconciled successfully
β–Ί confirming components are healthy
βœ” helm-controller: deployment ready
βœ” kustomize-controller: deployment ready
βœ” notification-controller: deployment ready
βœ” source-controller: deployment ready
βœ” all components are healthy