Skip to content

feat: validate Flux bootstrap flags before creating the cluster#8771

Open
JesusZuluaga-M wants to merge 1 commit into
eksctl-io:mainfrom
JesusZuluaga-M:fix-issue-3664
Open

feat: validate Flux bootstrap flags before creating the cluster#8771
JesusZuluaga-M wants to merge 1 commit into
eksctl-io:mainfrom
JesusZuluaga-M:fix-issue-3664

Conversation

@JesusZuluaga-M

@JesusZuluaga-M JesusZuluaga-M commented Jun 22, 2026

Copy link
Copy Markdown

Description

Closes #3664

I think this may resolve this issue.

Currently eksctl create cluster only discovers invalid gitops.flux.flags when
it calls flux bootstrap at the very end of the process — after the cluster has
already taken ~25 minutes to provision. This PR validates those flags upfront,
before cluster creation starts.

Flux has no dry-run mode for bootstrap, so the validation uses the workaround
suggested in the issue: it builds the same args Bootstrap() would use and appends
a sentinel flag that Flux can never recognise (--eksctl-internal-validate-only).
Since Flux's flag parser (pflag) stops at the first unrecognised flag:

  • if the resulting error mentions the sentinel flag → all real flags were valid
  • if it mentions anything else → that's the real flag that's misconfigured

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@github-actions

Copy link
Copy Markdown
Contributor

Hello JesusZuluaga-M 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate Flux flags before running cluster create

1 participant