-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support generating single file for all nodes #344
Comments
overrideClientEndpoints
and per node ignoreHostname
Thanks to the suggestion from @onedr0p, the linked PR should fix this problem more beautifully. You can now have something like this instead: ---
clusterName: main
endpoint: https://1.1.1.10:6443
nodes:
- hostname: controlplane
ipAddress: 1.1.1.1, 1.1.1.2, 1.1.1.3
controlPlane: true
ignoreHostname: true
...
- hostname: worker
ipAddress: 1.1.1.4, 1.1.1.5, 1.1.1.6
controlPlane: false
ignoreHostname: true All the other
To get only the the specific command for the IP, use |
One additional thing that would be nice is when generating the context: main
contexts:
main:
endpoints: # Controlplane nodes
- 192.168.42.10
- 192.168.42.11
- 192.168.42.12
nodes: # Controlplane and worker nodes with control plane nodes listed first
- 192.168.42.10
- 192.168.42.11
- 192.168.42.12
- 192.168.42.13
- 192.168.42.14
- 192.168.42.15 I am not sure if there is any downsides to adding in the |
@onedr0p That seems to be unrelated to this issue, so I'll open another issue (or you want to open it instead?). But, adding nodes to the And funnily enough my own Also, why should the controlplane nodes be listed first? |
Probably for predictability, you'll always know the first node in the list is a controller. |
The order should be the same as the order of the |
Currently, IP address of
controlplane
node is being appended to the generatedtalosconfig
file.And
hostname
of each node is being used to set themachine.network.hostname
in the generated node config file.There's a use case where you want to have one config file for all your nodes. I.e you're using DHCP server to manage the hostname of your nodes, and using PXE boot to load Talos into your nodes.
With combination of all your nodes being identical hardware wise, this is something that has been done by @onedr0p (https://github.com/onedr0p/home-ops/tree/cd103c4543cd177ca6e0d6ba06d4a420cef42834/kubernetes/main/bootstrap)
To support this use case, I'm thinking about adding
overrideClientEndpoints
(default to empty slice to not break current behavior) so you can provide your ownendpoints
in the generatedtalosconfig
.And then also adding per node
ignoreHostname
(default tofalse
to not break current behavior) so there's no node specific key in the generated config file.This will allow you to do something like this:
1.1.1.1
-1.1.1.3
and 3 worker nodes with IP of1.1.1.4
-1.1.1.6
).Your
talconfig.yaml
file should looks something like this:This will create a structure like this in the current working directory:
The
talosconfig
will look something like this:And there will be no
machine.network.hostname
field in the generatedmain-controlplane.yaml
andmain-worker.yaml
.You can then do
talosctl apply-config
command to all your nodes.The text was updated successfully, but these errors were encountered: