Skip to content

Network machineInventoryLabels not showing after machine is registered in the cluster #1737

@adrianharabula

Description

@adrianharabula

Hello! I have the following registration endpoint which specifies some $Network labels.

machineInventoryLabels:
  elemental.cattle.io/network-enp3s0-ip: ${Network/NICs/enp3s0/IPv4Address}
  elemental.cattle.io/network-ens160-ip: ${Network/NICs/ens160/IPv4Address}
  elemental.cattle.io/network-eth0-ip: ${Network/NICs/eth0/IPv4Address}
  elemental.cattle.io/network-internal-ip: ${Network/NICs/0/IPv4Address}
  elemental.cattle.io/network-secondary-ip: ${Network/NICs/1/IPv4Address}
  elemental.cattle.io/network-total-nics: ${Network/TotalNICs/}

What did you expect to happen:
Get new nodes with $Network labels. None of the labels are showing up after the machine is registered in the cluster. Example MachineInventory:

apiVersion: elemental.cattle.io/v1beta1
kind: MachineInventory
metadata:
  annotations:
    elemental.cattle.io/auth: emulated-tpm
    elemental.cattle.io/os.cpe-name: cpe:/o:suse:sl-micro:6.1
    elemental.cattle.io/os.id: sl-micro
    elemental.cattle.io/os.image: registry.suse.com/suse/sl-micro/6.1/baremetal-os-container:2.2.0-4.4
    elemental.cattle.io/os.name: SL-Micro
    elemental.cattle.io/os.pretty-name: SUSE Linux Micro 6.1
    elemental.cattle.io/os.version: '6.1'
    elemental.cattle.io/os.version-id: '6.1'
    elemental.cattle.io/reg-version: 1.7.1
    elemental.cattle.io/registration-ip: 192.168.122.209
  labels:
    elemental.cattle.io/baseboard-serial: unknown
    elemental.cattle.io/bios-vendor: EDK-II
    elemental.cattle.io/bios-version: edk2-20250523-16.fc42
    elemental.cattle.io/chassis-type: '1'
    elemental.cattle.io/cpu-total-cores: '2'
    elemental.cattle.io/cpu-total-threads: '2'
    elemental.cattle.io/disk0-controller: SCSI
    elemental.cattle.io/disk0-model: QEMU_HARDDISK
    elemental.cattle.io/disk0-size-bytes: '17179869184'
    elemental.cattle.io/memory-total-bytes: '4294967296'
    elemental.cattle.io/product-name: Standard-PC-i440FX-PIIX-1996
    elemental.cattle.io/product-serial-number: ''
    elemental.cattle.io/product-uuid: ac9c8bf5-474c-4b48-a175-efe5d87702a6
    elemental.cattle.io/product-version: pc-i440fx-9.2
    elemental.cattle.io/storage-total-disks: '2'

My use case for this is that I want to target machines in a pool by their IP.

Regards,
Adrian.

Environment:

  • Elemental release version (use cat /etc/os-release): registry.suse.com/suse/sl-micro/6.1/baremetal-os-container:2.2.0-4.4"
  • Rancher version: Rancher Manager v2.12.2 with Elemental 107.1.0+up1.7.3
  • Kubernetes version (use kubectl version): - not relevant
  • Cloud provider or hardware configuration: vmware&kvm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions