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

allow filtering for hardware by label selector #162

Merged

Conversation

tzneal
Copy link
Contributor

@tzneal tzneal commented Apr 29, 2022

Description

Allows filtering hardware by required and preferred hardware affinities.

Why is this needed

Previously hardware selection was performed by listing available hardware and choosing the first available. This change enables filtering by required and preferred labels on the hardware.

How Has This Been Tested?

Unit testing only

How are existing users impacted? What migration steps/scripts do we need?

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

api/v1beta1/tinkerbellmachine_types.go Outdated Show resolved Hide resolved
controllers/tinkerbellcluster_controller.go Outdated Show resolved Hide resolved
@tzneal tzneal force-pushed the allow-selecting-hardware-by-label-selector branch 3 times, most recently from db3ac93 to 8fe30f5 Compare April 30, 2022 18:33
@tzneal tzneal force-pushed the allow-selecting-hardware-by-label-selector branch from 8fe30f5 to c5a0bb2 Compare May 2, 2022 14:43
Copy link
Contributor

@micahhausler micahhausler left a comment

Choose a reason for hiding this comment

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

This is awesome! Looks like it just needs a rebase, and could you add a documented example?

@tzneal tzneal force-pushed the allow-selecting-hardware-by-label-selector branch from c5a0bb2 to e2dcb98 Compare May 2, 2022 16:09
- add LabelSelector to TinkerbellMachineSpec
- use the selector when querying for Hardware

Signed-off-by: Todd Neal <tnealt@amazon.com>
@tzneal tzneal force-pushed the allow-selecting-hardware-by-label-selector branch from e45d620 to 563487d Compare May 2, 2022 16:24
@micahhausler micahhausler added the ready-to-merge Signal to Mergify to merge the PR. label May 2, 2022
@mergify mergify bot merged commit 37bade5 into tinkerbell:main May 2, 2022
mergify bot added a commit that referenced this pull request May 2, 2022
Signed-off-by: Micah Hausler <mhausler@amazon.com>

## Description

Added quickstart docs example for #162
@tzneal tzneal deleted the allow-selecting-hardware-by-label-selector branch May 3, 2022 00:46
@displague displague added this to the v0.2 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Signal to Mergify to merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants