Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify applying the generated configuration #214

Closed
mirceanton opened this issue Nov 18, 2023 · 0 comments · Fixed by #213
Closed

Simplify applying the generated configuration #214

mirceanton opened this issue Nov 18, 2023 · 0 comments · Fixed by #213

Comments

@mirceanton
Copy link
Collaborator

mirceanton commented Nov 18, 2023

Currently, the workflow to bootstrap a Talos cluster using talhelper is to generate the per-node configuration files using talhlper genconfig and then manually writing the talosctl apply commands, pointing it to the right config file and the right node.

Given that the talconfig.yaml already contains all the required information in order to apply the config as well, I think that talhelper should have a subcommand which simplifies this process.

This could either be a command that runs the talosctl apply under the hood or a command that generates the talosctl apply command so we can pipe it into bash.

Based on the discussions in issue #211 and in the k8s@home discord, we decided that if this is to be implemented, it will most likely be the 2nd option, allowing us to pipe said output.

Expected workflow:

With the following talconfig.yaml:

---
clusterName: home-cluster
talosVersion: v1.5.5
kubernetesVersion: v1.28.2
nodes:
  - hostname: cp-01.dev.k8s.mirceanton.com
    controlPlane: true
    ipAddress: 10.0.10

I should be able to do something along the lines of:

root@devbox:/workspace# talhelper gencommand --apply
talosctl apply-config --talosconfig ./clusterconfig/talosconfig --nodes 10.0.10.195 --file ./clusterconfig/home-cluster-cp-01.dev.k8s.mirceanton.com.yaml --insecure;

Thus allowing me to do something like this to bootstrap my cluster:

talhelper genconfig;
talhelper gencommand --apply | bash

For a single node this may seem trivial, but for clusters with multiple nodes, it easily becomes a quality of life improvement!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant