From f89ab0d435411853284d708455b013bc3e97911f Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Mon, 6 May 2024 02:57:22 +0200 Subject: [PATCH] Update README.md --- README.md | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2344164..0a6859b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Talm -Just like Helm, but for Talos Linux +Manage Talos the GitOps Way! + +Talm is just like Helm, but for Talos Linux ## Installation @@ -30,6 +32,7 @@ talm -n 1.2.3.4 -e 1.2.3.4 template -t templates/controlplane.yaml -i > nodes/no Edit `templates/node1.yaml` file: ```yaml +# talm: nodes=["1.2.3.4"], endpoints=["1.2.3.4"], templates=["templates/controlplane.yaml"] machine: network: # -- Discovered interfaces: @@ -81,3 +84,45 @@ Apply config: ```bash talm apply -f nodes/node1.yaml -i ``` + +Upgrade node: +```bash +talm upgrade -f nodes/node1.yaml +``` + +Show diff: +```bash +talm apply -f nodes/node1.yaml --dry-run +``` + +Template config and update in place: +``` +talm template -f nodes/node1.yaml -I +``` + +## Customization + +You're free to edit template files in `./templates` directory. + +All the [Helm](https://helm.sh/docs/chart_template_guide/functions_and_pipelines/) and [Sprig](https://masterminds.github.io/sprig/) functions are supported, including lookup for talos resources! + +Lookup example: + +```helm +{{ lookup "nodeaddresses" "network" "default" }} +``` + +\- is equiualent to: + +```bash +talosctl get nodeaddresses --namespace=network default +``` + + +Querying disks map example: + +```helm +{{ range .Disks }}{{ if .system_disk }}{{ .device_name }}{{ end }}{{ end }} +``` + +\- will return the system disk device name