Talos operator for maintaining talos os
The operator includes a comprehensive reconciler for KubernetesCluster CRDs that:
- Watches KubernetesCluster resources and generates Machine manifests based on cluster topology
- Saves machine manifests as YAML files in
hack/results/{cluster-name}/for debugging and manual inspection - Applies Machine resources to Kubernetes with proper owner references for automatic cleanup
- Handles deletion by cleaning up associated machines and generated files
- Uses finalizers to ensure graceful resource cleanup
-
Deploy the operator:
make deploy IMG=ghcr.io/vitistack/talos-operator:latest
-
Create a KubernetesCluster:
kubectl apply -f examples/simple-kubernetescluster.yaml
-
Verify machines are created:
kubectl get machines -l cluster.vitistack.io/cluster-name=simple-cluster
-
Check generated files:
ls hack/results/simple-cluster/
See docs/kubernetescluster-reconciler.md for detailed documentation.
- Customize cluster-wide Talos settings through the ConfigMap manifest in
hack/manifests/tenant-configmap.yaml. The data underconfig.yamlmust be valid Talos machine/cluster YAML; the operator replaces#CLUSTERID#with the reconciledspec.cluster.clusterIdbefore applying it. Seedocs/tenant-config-overrides.mdfor a deeper walkthrough. - By default the operator looks for
talos-tenant-configin thedefaultnamespace and merges it into every node config (lists are replaced, map entries override defaults). Use environment variablesTENANT_CONFIGMAP_NAME,TENANT_CONFIGMAP_NAMESPACE, andTENANT_CONFIGMAP_DATA_KEYto change the lookup. - Apply or update the ConfigMap in the supervisor cluster (example kubeconfig from this repo):
kubectl --kubeconfig ~/kubeconfig/viti-super-test.config apply -f hack/manifests/tenant-configmap.yaml - Remove or comment settings you do not want to override; missing keys default back to the Talos operator's generated values.
Using https://kubebuilder.io and https://kubevirt.io/user-guide/
This project uses GitHub Actions for continuous integration and delivery:
- Build and Tests: Runs on each push and pull request to verify code integrity.
- Security Scan: Regular vulnerability scanning with govulncheck and CodeQL.
- Release Process: Tagged commits trigger automatic builds and publish to:
- Container images:
ghcr.io/vitistack/talos-operator - Helm charts:
oci://ghcr.io/vitistack/helm/talos-operator
- Container images:
- Dependabot: Automated dependency updates for GitHub Actions, Go modules, Docker, and Helm charts.
To create a new release:
- Tag the commit:
git tag -a v1.0.0 -m "Release v1.0.0" - Push the tag:
git push origin v1.0.0
The GitHub Actions workflow will automatically build and publish the container image and Helm chart.
Dependabot is configured to automatically open pull requests for:
- GitHub Actions workflow dependencies
- Go module dependencies
- Docker image dependencies
- Helm chart dependencies
Pull requests for minor and patch updates are automatically approved and merged. Major updates require manual review and approval.