siderolabs / talos

Talos Linux is a modern Linux distribution built for Kubernetes.
https://www.talos.dev
Mozilla Public License 2.0
6.47k stars 517 forks source link

Talos `1.7.5`: Invalid worker configuration generated by `talosctl gen config` #8985

Closed febus982 closed 2 months ago

febus982 commented 2 months ago

Bug Report

talos gen config produces a configuration that is invalid on workers.

Description

I am using this patch to generate the config:

machine:
  # Extra certificate subject alternative names for the machine's certificate.
  certSANs:
    - "<REDACTED>"
  network:
    interfaces:
      - interface: eth0
        dhcp: true
        vip:
          ip: <REDACTED>
cluster:
  apiServer:
    # Extra certificate subject alternative names for the API server's certificate.
    certSANs:
      - "<REDACTED>"

The VIP config makes workers fail validation when applied. I remember this not happening on 1.6.7 (not sure if the worker generated config did omit the VIP settings or it was the workers just ignoring it)

Logs

Environment

smira commented 2 months ago

talosctl gen config never generates VIP configuration, you can only add this manually via config patches.

From the --help output:

      --config-patch stringArray                 patch generated machineconfigs (applied to all node types), use @file to read a patch from file
      --config-patch-control-plane stringArray   patch generated machineconfigs (applied to 'init' and 'controlplane' types)
      --config-patch-worker stringArray          patch generated machineconfigs (applied to 'worker' type)

You're probably using --config-patch instead of --config-patch-control-plane.