budimanjojo/talhelper

filename does not contain clustername

Closed this issue · 6 comments

it looks like the clustername is missing in the config filenames?

➜  talos talhelper genconfig
generated config for master1 in ./clusterconfig/-master1.yaml
generated config for master2 in ./clusterconfig/-master2.yaml
generated config for master3 in ./clusterconfig/-master3.yaml
generated config for worker1 in ./clusterconfig/-worker1.yaml
generated client config in ./clusterconfig/talosconfig
generated .gitignore file in ./clusterconfig/.gitignore
➜  talos cat talconfig.yaml 
  clustername: mycluster
  talosVersion: v1.5.2
  endpoint: https://10.0.30.80:6443
  nodes:
    - hostname: master1
      ipAddress: 10.0.30.81
      installDisk: /dev/sda
      controlPlane: true
    - hostname: master2
      ipAddress: 10.0.30.82
      installDisk: /dev/sda
      controlPlane: true
    - hostname: master3
      ipAddress: 10.0.30.83
      installDisk: /dev/sda
      controlPlane: true
    - hostname: worker1
      ipAddress: 10.0.30.84
      installDisk: /dev/nvme1
      controlPlane: false
➜  talos  talhelper --version
talhelper version 1.12.0

Hello @runningman84. It's clusterName and not clustername :)

Also thanks for the issue because I just realized that the program should detect it and refuse to proceed. Looks like the library that unmarshal the yaml file doesn't work with wrong capital spelling. Will fix this soon.

Okay I have that from some docs…

Closing this, the new behavior should not allow a mistyped clusterName to continue. Thanks!

Okay I have found the source for the wrong config:

Workflow:
  Create talconfig.yaml file defining your nodes information like so:
  ----------------------------------------
  clustername: mycluster
  talosVersion: v1.0
  endpoint: https://192.168.200.10:6443
  nodes:
    - hostname: master1
      ipAddress: 192.168.200.11
      installDisk: /dev/sdb
      controlPlane: true
    - hostname: worker1
      ipAddress: 192.168.200.21
      installDisk: /dev/nvme1
      controlPlane: false
  ----------------------------------------

as you see the output of talhelper itself suggests a wrong config

Ah sorry about that, will be fixed in the next version. Thanks!