This operator will keep all fields of k3OS's config.yaml files in sync. Specifically, it's written to:
- sync node labels
- sync node taints
- keep the
/var/lib/rancher/k3os/config.yamlon each node in sync
It runs as a DaemonSet on each node in the cluster.
It was written to address this part of the k3OS README:
The /var/lib/rancher/k3os/config.yaml or config.d/* files are intended to be used at runtime. These files can be manipulated manually, through scripting, or managed with the Kubernetes operator.
That Kubernetes operator doesn't exist. At least, it didn't until now. 🤠
- A k3OS cluster that's running nominally.
- A local clone of https://github.com/annismckenzie/picl-k3os-image-generator (my fork).
- The
configdirectory with YAML files as describes in https://github.com/sgielen/picl-k3os-image-generator#getting-started:
├── config
│ └── dc:a6:32:xx:xx:xx.yaml
│ └── dc:a6:32:xx:xx:xx.yaml
│ └── dc:a6:32:xx:xx:xx.yaml
- Your local
kubectlconfigured to push YAMLs to your k3OS cluster. - Execute
make update-k3osconfig-secretin your local checkout ofpicl-k3os-image-generatorto validate the YAML files in theconfigdirectory and to generate the secret for the operator. - Execute
make deploy-k3os-configin your local checkout ofpicl-k3os-image-generator. This will generate the configuration and push it into the cluster. - Continue on with the installation steps outlined below.
kubectl apply -f https://raw.githubusercontent.com/annismckenzie/k3os-config-operator/v0.3.2/deploy/operator.yaml- Create
release-vx.y.zbranch. Updateconfig/release/kustomization.yamlwith the new version, commit. - Tag locally with
vx.y.z. Make sure the working directory is clean. - Run
make render-static-manifests. This will build and push the new multi-arch image. - Update the installation path above with the new tag.
- Commit the updated
deploy/operator.yamland the update to the README. - Recreate the local tag, push the tag, then update the changelog with
make update-changelog. Commit and push. - Merge the release PR.