talhelper

command module
v1.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

README

Talhelper

GitHub release (release name instead of tag name) GitHub issues GitHub

A helper tool to help creating Talos cluster in your GitOps repository.
· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. 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

  1. Create a talconfig.yaml, an example template is provided.
  2. Run talhelper gensecret --patch-configfile > talenv.yaml (--patch-configfile will add inlinePatches inside your talconfig.yaml)
  3. Encrypt the secret with SOPS: sops -e -i talenv.yaml
  4. 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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the BSD-3 License. See LICENSE for more information.

(back to top)

Acknowledgments

  • bjw-s <- The guy who inspired this tool
  • k8s@home <- Best community of people running Kubernetes at home
  • Best-README-Template <- Where this README is built off from

(back to top)

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL