Table of Contents
-
About The Project
-
Getting Started
- Usage
- Roadmap
- Contributing
- License
- Acknowledgments
About The Project
The main reason of this tool is to help creating Talos cluster in GitOps way.
Inspired by a python script written by @bjw-s here.
This tool will:
- Read your
talconfig.yaml
- Read and decrypt your
talenv.yaml
with SOPS
- Do envsubst if needed
- Validate config file is good for talosctl
- Generate Talos cluster and config yaml files for you based on your
talconfig.yaml
- Generate
.gitignore
file so you don't commit your secret to the public
This tool is actually my first time programming something other than shell script.
Any input and suggestion will be highly appreciated.
(back to top)
Getting Started
- Create a
talconfig.yaml
, an example template is provided.
- Run
talhelper gensecret --patch-configfile > talenv.yaml
(--patch-configfile
will add inlinePatches inside your talconfig.yaml
)
- Encrypt the secret with SOPS:
sops -e -i talenv.yaml
- Run
talhelper genconfig
and the output files will be in ./clusterconfig
by default.
To get help, run talhelper <subcommand> --help
Installation
You can download the archives from release page.
Or you can install it using this one liner, using tool from jpillora:
curl https://i.jpillora.com/budimanjojo/talhelper! | sudo bash
(back to top)
Usage
Available Commands:
completion Generate the autocompletion script for the specified shell
genconfig Generate Talos cluster config YAML file
gensecret Generate Talos cluster secrets
help Help about any command
talhelper genconfig [flags]
Flags:
-c, --config-file string File containing configurations for nodes (default "talconfig.yaml")
-e, --env-file string File containing env variables for config file (default "talenv.yaml")
-h, --help help for genconfig
--no-gitignore Create/update gitignore file too
-o, --out-dir string Directory where to dump the generated files (default "./clusterconfig")
-m, --talos-mode string Talos runtime mode to validate generated config (default "metal")
Usage:
talhelper gensecret [flags]
Flags:
-c, --config-file string File containing configurations for talhelper (default "talconfig.yaml")
-h, --help help for gensecret
-p, --patch-configfile Whether to generate inline patches into config file
(back to top)
Roadmap
- Add tests
- Add release workflows
- More useful features
See the open issues for a full list of proposed features (and known issues).
(back to top)
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
)
- Commit your Changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the Branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
(back to top)
License
Distributed under the BSD-3 License. See LICENSE for more information.
(back to top)
Acknowledgments
(back to top)