Skip to content

Conversation

rdiazcam
Copy link
Contributor

@rdiazcam rdiazcam commented Sep 2, 2025

This change adds the ability to add additional metadata labels in the BareMetalHost CR.

For example, having an input like this:

cifmw_baremetal_hosts:
  compute-0:
    ...
    extra_labels:
      server: tigon23

will result in a CR like this (app and workload added by default):

apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
    labels:
        app: openstack
        workload: compute
        server: tigon23
...

which in turn will allow the compute to be bound with a specific server by adding the bmhLabelSelector attribute under spec/nodes in the OpenStackDataPlaneNodeSet CR [0]:

apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
  name: openstack-edpm
  namespace: openstack
spec:
...
  nodes:
    edpm-compute-0:
      hostName: compute-0
      bmhLabelSelector:
        server: tigon23

[0] https://issues.redhat.com/browse/OSPRH-13226?focusedId=26446283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-26446283

@rdiazcam rdiazcam requested a review from a team as a code owner September 2, 2025 15:36
Copy link
Contributor

openshift-ci bot commented Sep 2, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/9438fb5b8448492dbef171a094c57920

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 42m 57s
✔️ podified-multinode-edpm-deployment-crc SUCCESS in 1h 27m 19s
✔️ cifmw-crc-podified-edpm-baremetal SUCCESS in 1h 24m 51s
✔️ noop SUCCESS in 0s
✔️ cifmw-pod-ansible-test SUCCESS in 8m 49s
✔️ cifmw-pod-pre-commit SUCCESS in 8m 54s
✔️ build-push-container-cifmw-client SUCCESS in 18m 56s
cifmw-molecule-deploy_bmh FAILURE in 3m 14s

This change adds the ability to add additional metadata labels in the
BareMetalHost CR.

For example, having an input like this:

```
cifmw_baremetal_hosts:
  compute-0:
    ...
    extra_labels:
      server: tigon23
```

will result in a CR like this (`app` and `workload` added by default):
```
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
    labels:
        app: openstack
        workload: compute
        server: tigon23
...
```

which in turn will allow the compute to be bound with a specific
server by adding the `bmhLabelSelector` attribute under spec/nodes in
the OpenStackDataPlaneNodeSet CR [0]:
```
apiVersion: dataplane.openstack.org/v1beta1
kind: OpenStackDataPlaneNodeSet
metadata:
  name: openstack-edpm
  namespace: openstack
spec:
...
  nodes:
    edpm-compute-0:
      hostName: compute-0
      bmhLabelSelector:
        server: tigon23
```

[0] https://issues.redhat.com/browse/OSPRH-13226?focusedId=26446283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-26446283
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants