|
|
|
@ -67,7 +67,7 @@ flux bootstrap <GIT-PROVIDER> \
|
|
|
|
|
and `--arch=arm64` for ARMv8 64-bit container images.
|
|
|
|
|
|
|
|
|
|
If you wish to install a specific version, use the Flux
|
|
|
|
|
[release tag](https://github.com/fluxcd/flux2/releases) e.g. `--version=v0.0.14`.
|
|
|
|
|
[release tag](https://github.com/fluxcd/flux2/releases) e.g. `--version=v0.2.0`.
|
|
|
|
|
|
|
|
|
|
With `--path` you can configure the directory which will be used to reconcile the target cluster.
|
|
|
|
|
To control multiple clusters from the same Git repository, you have to set a unique path per
|
|
|
|
@ -76,9 +76,9 @@ cluster e.g. `staging-cluster` and `production-cluster`:
|
|
|
|
|
```sh
|
|
|
|
|
├── staging-cluster # <- path=staging-cluster
|
|
|
|
|
│ └── flux-system # <- namespace dir generated by bootstrap
|
|
|
|
|
│ ├── toolkit-components.yaml
|
|
|
|
|
│ ├── toolkit-kustomization.yaml
|
|
|
|
|
│ └── toolkit-source.yaml
|
|
|
|
|
│ ├── gotk-components.yaml
|
|
|
|
|
│ ├── gotk-sync.yaml
|
|
|
|
|
│ └── kustomization.yaml
|
|
|
|
|
└── production-cluster # <- path=production-cluster
|
|
|
|
|
└── flux-system
|
|
|
|
|
```
|
|
|
|
@ -213,16 +213,16 @@ Generate the Flux manifests with:
|
|
|
|
|
```sh
|
|
|
|
|
flux install --version=latest \
|
|
|
|
|
--arch=amd64 \ # on ARM64/AARCH64 clusters use --arch=arm64
|
|
|
|
|
--export > ./my-cluster/flux-system/toolkit-components.yaml
|
|
|
|
|
--export > ./my-cluster/flux-system/gotk-components.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
If your cluster must pull images from a private container registry, first you should pull
|
|
|
|
|
the toolkit images from GitHub Container Registry and push them to your registry, for example:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
docker pull ghcr.io/fluxcd/source-controller:v0.0.14
|
|
|
|
|
docker tag ghcr.io/fluxcd/source-controller:v0.0.14 registry.internal/fluxcd/source-controller:v0.0.14
|
|
|
|
|
docker push registry.internal/fluxcd/source-controller:v0.0.14
|
|
|
|
|
docker pull ghcr.io/fluxcd/source-controller:v0.2.0
|
|
|
|
|
docker tag ghcr.io/fluxcd/source-controller:v0.2.0 registry.internal/fluxcd/source-controller:v0.2.0
|
|
|
|
|
docker push registry.internal/fluxcd/source-controller:v0.2.0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Create the pull secret in the `flux-system` namespace:
|
|
|
|
@ -241,19 +241,19 @@ Set your registry domain, and the pull secret when generating the manifests:
|
|
|
|
|
flux install --version=latest \
|
|
|
|
|
--registry=registry.internal/fluxcd \
|
|
|
|
|
--image-pull-secret=regcred \
|
|
|
|
|
--export > ./my-cluster/flux-system/toolkit-components.yaml
|
|
|
|
|
--export > ./my-cluster/flux-system/gotk-components.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Commit and push the manifest to the master branch:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git add -A && git commit -m "add toolkit manifests" && git push
|
|
|
|
|
git add -A && git commit -m "add components" && git push
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Apply the manifests on your cluster:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
kubectl apply -f ./my-cluster/flux-system/toolkit-components.yaml
|
|
|
|
|
kubectl apply -f ./my-cluster/flux-system/gotk-components.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Verify that the controllers have started:
|
|
|
|
@ -297,25 +297,27 @@ flux create kustomization flux-system \
|
|
|
|
|
--interval=10m
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Export both objects, commit and push the manifests to Git:
|
|
|
|
|
Export both objects, generate a `kustomization.yaml`, commit and push the manifests to Git:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
flux export source git flux-system \
|
|
|
|
|
> ./my-cluster/flux-system/toolkit-source.yaml
|
|
|
|
|
> ./my-cluster/flux-system/gotk-sync.yaml
|
|
|
|
|
|
|
|
|
|
flux export kustomization flux-system \
|
|
|
|
|
> ./my-cluster/flux-system/toolkit-kustomization.yaml
|
|
|
|
|
>> ./my-cluster/flux-system/gotk-sync.yaml
|
|
|
|
|
|
|
|
|
|
git add -A && git commit -m "add toolkit reconciliation" && git push
|
|
|
|
|
cd ./my-cluster/flux-system && kustomize create --autodetect
|
|
|
|
|
|
|
|
|
|
git add -A && git commit -m "add sync manifests" && git push
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
To upgrade the toolkit to a newer version, run the install command and commit the changes:
|
|
|
|
|
To upgrade the Flux components to a newer version, run the install command and commit the changes:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
flux install --version=latest \
|
|
|
|
|
--export > ./my-cluster/flux-system/toolkit-components.yaml
|
|
|
|
|
--export > ./my-cluster/flux-system/gotk-components.yaml
|
|
|
|
|
|
|
|
|
|
git add -A && git commit -m "update toolkit" && git push
|
|
|
|
|
git add -A && git commit -m "update flux" && git push
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The source-controller will pull the changes on the cluster, then the kustomize-controller
|
|
|
|
|