The Flux tutorial makes things very complicated. In essence, all Flux is is a tool that pulls a git repo, and does `kubectl apply -k`; there should be a much easier way to set it up.
## Install Flux
Export your GITEA_TOKEN:
```
export GITEA_TOKEN=THERE_IS_SOME_TOKEN_HERE
```
Bootstrap the repo:
```
❯ flux bootstrap gitea \
--token-auth=true \
--owner=charles \
--repository=flux-5pi5 \
--branch=main \
--path=./ \
--personal \
--hostname=git.tipsy.codes
```
This will create the repo in Gitea for you, and define a basic structure:
```
❯ tree
.
└── cluster
└── flux-system
├── gotk-components.yaml
├── gotk-sync.yaml
└── kustomization.yaml
```
From here, in the simplest way, you can just start deploying applications.
In the most simple form, Flux will pick up any kustomization in the path pointed to by '--path'. Since we set it to '.', adding something should be as simple as dropping it into that folder.
The first file (`nginx.yaml`) tells Flux to look into a specific folder, with an update interval and some other settings. The other files are the kustomization; check the Kubernetes docs for that.