Skip to content

Add manual bootstrap manifests and Flux installation playbook#92

Merged
ExtraToast merged 2 commits intomainfrom
platform-linux-bootstrap
Apr 17, 2026
Merged

Add manual bootstrap manifests and Flux installation playbook#92
ExtraToast merged 2 commits intomainfrom
platform-linux-bootstrap

Conversation

@ExtraToast
Copy link
Copy Markdown
Owner

This pull request introduces a formalized, documented, and idempotent process for bootstrapping Flux onto a new Kubernetes cluster, ensuring compatibility with branch protection rules and improving maintainability. The main changes include adding a detailed Flux bootstrap playbook, restructuring Flux manifests, and removing duplicate namespace declarations to resolve resource conflicts.

Documentation and Playbooks

  • Added flux-bootstrap-playbook.md, a comprehensive guide for first-time Flux installation, secret rotation, and upgrades, tailored for repositories with branch protection.
  • Updated README.md to reference the new Flux bootstrap playbook and explain the one-off install process.

Flux Bootstrap Manifests and Structure

  • Added gotk-sync.yaml and kustomization.yaml to flux-system/, defining the GitRepository and Kustomization resources for Flux, and restructured the Flux manifests for clarity and maintainability. [1] [2]
  • Updated production/kustomization.yaml to include the new flux-system directory as a resource.

Namespace Declaration Cleanup

  • Removed the duplicate Namespace/flux-system resource from apps/core/namespace.yaml and its reference from apps/core/kustomization.yaml, ensuring the namespace is only managed by gotk-components.yaml to avoid kustomize build errors. [1] [2]

These changes make the Flux installation process reproducible, compatible with protected branches, and eliminate resource conflicts during cluster reconciliation.

Branch protection on main blocks 'flux bootstrap' from pushing its
controllers commit directly. Pre-generate what bootstrap would have
written so it can land through the normal PR flow instead:

- platform/cluster/flux/clusters/production/flux-system/gotk-components.yaml
  = output of 'flux install --export', the four controller deployments
  and all their RBAC/CRDs.
- platform/cluster/flux/clusters/production/flux-system/gotk-sync.yaml
  = GitRepository + Kustomization pointing Flux at
    github.com/ExtraToast/personal-stack @ main, syncing
    platform/cluster/flux/clusters/production.
- platform/cluster/flux/clusters/production/flux-system/kustomization.yaml
  = wires the two files above into the tree.

Also deduplicate the flux-system Namespace (gotk-components.yaml now
owns it) and include the new flux-system/ dir from the production
kustomization.

After merge:
  kubectl apply -k platform/cluster/flux/clusters/production/flux-system
  flux check
  flux get kustomizations -A
and Flux takes over reconciliation from main.
Document the one-off kubectl apply + flux create secret git sequence
that replaces 'flux bootstrap github' on this repo (main has branch
protection that rejects the direct push Flux wants to make). Covers:
- prerequisites (flux CLI, kubeconfig, read-only fine-grained PAT)
- the three commands to run once main has the flux-system manifests
- how to upgrade Flux later via a regular PR
- secret rotation and the reason apps/core no longer owns the
  flux-system namespace.

Link the new playbook from platform/cluster/bootstrap/README.md.
@ExtraToast ExtraToast self-assigned this Apr 17, 2026
@ExtraToast ExtraToast added the enhancement New feature or request label Apr 17, 2026
@ExtraToast ExtraToast merged commit 0401e9f into main Apr 17, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant