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

Display association status #49

Merged

Conversation

anmazzotti
Copy link
Collaborator

Closes #44

This adds more display information:

# kubectl get machines && kubectl get elementalmachines && kubectl get elementalhosts
NAME                                        CLUSTER                 NODENAME                                 PROVIDERID                                                   PHASE     AGE   VERSION
elemental-cluster-k3s-control-plane-6mw2p   elemental-cluster-k3s   m-d9e3bb70-3a82-4f01-8bcd-e5a6d6b5f67d   elemental://default/m-d9e3bb70-3a82-4f01-8bcd-e5a6d6b5f67d   Running   14m   v1.28.5+k3s1
NAME                                        CLUSTER                 MACHINE                                     PROVIDERID                                                   READY   AGE
elemental-cluster-k3s-control-plane-q2td6   elemental-cluster-k3s   elemental-cluster-k3s-control-plane-6mw2p   elemental://default/m-d9e3bb70-3a82-4f01-8bcd-e5a6d6b5f67d   True    14m
NAME                                     CLUSTER                 MACHINE                                     ELEMENTALMACHINE                            READY   AGE
m-d9e3bb70-3a82-4f01-8bcd-e5a6d6b5f67d   elemental-cluster-k3s   elemental-cluster-k3s-control-plane-6mw2p   elemental-cluster-k3s-control-plane-q2td6   True    13m

Note that there is a sneaky change too.
The machine-name label used on hosts now reflects the CAPI Machine name, and not the ElementalMachine name as previously.
Functionally this does not have any effect, the controller only checks whether the label exists when finding host candidates, the value does not matter.

Since the ElementalMachine is already referenced in the Host spec, I thought it would be nice to use the machine-name label to propagate the CAPI machine name instead.

Signed-off-by: Andrea Mazzotti <[email protected]>
Signed-off-by: Andrea Mazzotti <[email protected]>
@anmazzotti anmazzotti requested a review from a team as a code owner April 22, 2024 15:42
Signed-off-by: Andrea Mazzotti <[email protected]>
@anmazzotti anmazzotti self-assigned this Apr 22, 2024
Copy link
Collaborator

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@anmazzotti anmazzotti merged commit 135f68d into rancher-sandbox:main May 7, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

Display association status between ElementalMachine and ElementalHost
2 participants