From 142810cf9a6673b7e1a54b8102cb2398bc8f33d9 Mon Sep 17 00:00:00 2001
From: Philipp Matthes
Date: Tue, 23 Dec 2025 13:29:10 +0100
Subject: [PATCH] [cortex] Rename cpuArch to arch in hv crd
---
api/v1/hypervisor_types.go | 5 ++++-
applyconfigurations/api/v1/capabilitiesstatus.go | 2 +-
.../openstack-hypervisor-operator/crds/hypervisor-crd.yaml | 2 +-
config/crd/bases/kvm.cloud.sap_hypervisors.yaml | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/api/v1/hypervisor_types.go b/api/v1/hypervisor_types.go
index e38a2e3..e0c9b4d 100644
--- a/api/v1/hypervisor_types.go
+++ b/api/v1/hypervisor_types.go
@@ -191,10 +191,13 @@ type OperatingSystemStatus struct {
}
// Current capabilities reported by libvirt.
+//
+// The keys provided here should correspond to the capabilities expected
+// by openstack's flavor extra specs, like 'capabilities:arch'.
type CapabilitiesStatus struct {
// +kubebuilder:default:=unknown
// The hosts CPU architecture (not the guests).
- HostCpuArch string `json:"cpuArch,omitempty"`
+ HostCpuArch string `json:"arch,omitempty"`
// Total host memory available as a sum of memory over all numa cells.
HostMemory resource.Quantity `json:"memory,omitempty"`
// Total host cpus available as a sum of cpus over all numa cells.
diff --git a/applyconfigurations/api/v1/capabilitiesstatus.go b/applyconfigurations/api/v1/capabilitiesstatus.go
index 0ab1ec7..bb282ef 100644
--- a/applyconfigurations/api/v1/capabilitiesstatus.go
+++ b/applyconfigurations/api/v1/capabilitiesstatus.go
@@ -9,7 +9,7 @@ import (
// CapabilitiesStatusApplyConfiguration represents a declarative configuration of the CapabilitiesStatus type for use
// with apply.
type CapabilitiesStatusApplyConfiguration struct {
- HostCpuArch *string `json:"cpuArch,omitempty"`
+ HostCpuArch *string `json:"arch,omitempty"`
HostMemory *resource.Quantity `json:"memory,omitempty"`
HostCpus *resource.Quantity `json:"cpus,omitempty"`
}
diff --git a/charts/openstack-hypervisor-operator/crds/hypervisor-crd.yaml b/charts/openstack-hypervisor-operator/crds/hypervisor-crd.yaml
index fe36d98..4539ff2 100644
--- a/charts/openstack-hypervisor-operator/crds/hypervisor-crd.yaml
+++ b/charts/openstack-hypervisor-operator/crds/hypervisor-crd.yaml
@@ -186,7 +186,7 @@ spec:
capabilities:
description: The capabilities of the hypervisors as reported by libvirt.
properties:
- cpuArch:
+ arch:
default: unknown
description: The hosts CPU architecture (not the guests).
type: string
diff --git a/config/crd/bases/kvm.cloud.sap_hypervisors.yaml b/config/crd/bases/kvm.cloud.sap_hypervisors.yaml
index 311ba15..681242b 100644
--- a/config/crd/bases/kvm.cloud.sap_hypervisors.yaml
+++ b/config/crd/bases/kvm.cloud.sap_hypervisors.yaml
@@ -187,7 +187,7 @@ spec:
capabilities:
description: The capabilities of the hypervisors as reported by libvirt.
properties:
- cpuArch:
+ arch:
default: unknown
description: The hosts CPU architecture (not the guests).
type: string