brew install fluxcd/tap/flux
Bootstrap can be run with a GitHub fine-grained personal access token, for repositories that are created ahead of time by an organization admin.
The fine-grained PAT must be generated with the following permissions:
Administration -> Access: Read-only
Contents -> Access: Read and write
Metadata -> Access: Read-only
Note that Administration should be set to Access: Read and write when using bootstrap github --token-auth=false.
export GITHUB_TOKEN= export GITHUB_USER=
Use moby
flux check --pre
flux bootstrap github --token-auth \
--owner=$GITHUB_USER \
--repository=fluxtest \
--branch=main \
--path=./clusters/maccluster \
--personal
flux create source git podinfo \
--url=https://github.com/stefanprodan/podinfo \
--branch=master \
--interval=1m \
--export > ./clusters/maccluster/podinfo-source.yaml
flux create kustomization podinfo \
--target-namespace=default \
--source=podinfo \
--path="./kustomize" \
--prune=true \
--wait=true \
--interval=30m \
--retry-interval=2m \
--health-check-timeout=3m \
--export > ./clusters/maccluster/podinfo-kustomization.yaml
flux bootstrap github
--token-auth
--components-extra=image-reflector-controller,image-automation-controller
--owner=$GITHUB_USER
--repository=fluxtest
--branch=addcomponents
--path=clusters/maccluster
--read-write-key
--personal