airshipit / airshipctl

A CLI for managing declarative infrastructure.
Apache License 2.0
43 stars 49 forks source link

Define labels to Hardware Classification Controller profiles #80

Open digambar15 opened 4 years ago

digambar15 commented 4 years ago

Problem description (if applicable) Add labels in baremetalhost CR based on the classification.

Proposed change We have to define standard labels for HCC controller so that it will be helpful for airship user to filter out hosts based on the profile labels.

Potential impacts None

digambar15 commented 4 years ago

Hardware-classification-controller profile is as below-

apiVersion: metal3.io.sigs.k8s.io/v1alpha1 kind: HardwareClassificationController metadata: name: Workload-NFV labels: app: Workload-NFV spec: namespace: metal3 expectedValidationConfiguration: customFilter: minimum namepace: metal3 CPU: count: 4 Disk: sizeBytesGB: 25 numberOfDisks: 2 NICS: numberOfNICS: 4 RAM: 8 systemVendor: name: Dell Inc. firmware: version: BIOS: 2.2.10 rules:

As you can see, we have profile name called MinimumHardware will be added as a label to Matching BM host CR. So BM Hosts CR looks like below after adding label -

apiVersion: metal3.io/v1alpha1 kind: BareMetalHost metadata: name: example-baremetalhost labels: HCCProfiles: