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

talos_machine_configuration_applyapplying configuration to endpoint instead of node (again) #23

Closed
rwunderer opened this issue Oct 20, 2022 · 2 comments

Comments

@rwunderer
Copy link
Contributor

Bug Report

This looks very similar to #17 though the resource has been reworked since.

Description

The following will apply the new configuration to the first control plane node instead of worker 1:

resource "talos_machine_configuration_apply" "worker_config_apply" {
  talos_config          = talos_client_configuration.talosconfig.talos_config
  machine_configuration = talos_machine_configuration_worker.machineconfig_worker.machine_config
  endpoint              = hcloud_server.cp[0].ipv4_address
  node                  = hcloud_server.worker[0].ipv4_address
}

The following works as expected:

resource "talos_machine_configuration_apply" "worker_config_apply" {
  talos_config          = talos_client_configuration.talosconfig.talos_config
  machine_configuration = talos_machine_configuration_worker.machineconfig_worker.machine_config
  endpoint              = hcloud_server.worker[0].ipv4_address
  node                  = hcloud_server.worker[0].ipv4_address
}

Background

In my clusters I have only the api server on the control plane nodes exposed to my management workstation so I always use the cluster endpoint for talosctl et.al.

Using talosctl this works (10.0.0.6 is the internal ip of the worker node):

talosctl -e endpoint.my-cluster.com -n 10.0.0.6 apply-config -f worker.yaml
  • endpoint.my-cluster.com points to the control plane nodes via round-robin dns. If I use that instead of cp[0] in terraform the config gets applied to a random control plane node.
  • Using the internal or external ip of the worker node in terraform does not make a difference. Where the config gets applied depends solely on the endpoint selected.

Environment

  • Provider version: 0.1.0-alpha.9
@smira
Copy link
Member

smira commented Oct 25, 2022

@frezbo can you please look into it?

@rwunderer
Copy link
Contributor Author

I cannot reproduce this anymore with the 0.1.0-alpha.10 version of the provider.

(Also part of the problem might have been that the cluster that I was applying to was still on talos v1.1.x at the time, not sure)

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

No branches or pull requests

2 participants