Add ROBOT_USE_LEGACY_PROVIDER_ID to use legacy provider ID#1142
Add ROBOT_USE_LEGACY_PROVIDER_ID to use legacy provider ID#1142guettli wants to merge 1 commit intohetznercloud:mainfrom
Conversation
For some clusters it might be challenging to
update the tool creating new nodes (like
Cluster API Provider Hetzner) and the CCM so that
both agree on the provider ID format.
If the env var ROBOT_USE_LEGACY_PROVIDER_ID is set
to a true value ("1", "t", "T", "true", "TRUE",
"True"), then the CCM will use the legacy format
("hcloud://bm-NNNN") when returning
InstanceMetadata.
This applies only, when the node is created. Once
a provider ID is set, it won't be changed again.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1142 +/- ##
==========================================
- Coverage 68.40% 64.76% -3.64%
==========================================
Files 23 23
Lines 2624 2634 +10
==========================================
- Hits 1795 1706 -89
- Misses 655 759 +104
+ Partials 174 169 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hey @guettli, what has changed since #1066 (comment)? |
|
@apricote Background: one caph controller (in mgt-cluster) controlls many workload-clusters. We need a way to differentiate between "wl-cluster wants new format" and "wl-cluster wants old-format". This is doable. We could extend HetznerBareMetalMachine and add a new field. But during an upgrade things are not well defined. The update could hang after the new ccm is active. Then old machineDeployments can't scale, because they would use a HetznerBareMetalMachineTemplate with the old format. Caph would use the old format, and ccm would use the new format. Capi would never see the new Node. We had a look at several other solutions. For example: CAPI can sync annotations from machine to node. But this happens after the node has a providerID. So currently this PR is the easiest solution: Old cluster use the old format (even if they get updated), and new clusters use the new format. Not nice, but better than having a undefined situation during an cluster update. It would be very nice, if you could accept the PR. |
For some clusters it might be challenging to
update the tool creating new nodes (like
Cluster API Provider Hetzner) and the CCM so that
both agree on the provider ID format.
If the env var ROBOT_USE_LEGACY_PROVIDER_ID is set to a true value ("1", "t", "T", "true", "TRUE",
"True"), then the CCM will use the legacy format
("hcloud://bm-NNNN") when returning
InstanceMetadata.
This applies only, when the node is created. Once
a provider ID is set, it won't be changed again.