diff --git a/api/v1/hypervisor_types.go b/api/v1/hypervisor_types.go index 714c3105..5dc2462d 100644 --- a/api/v1/hypervisor_types.go +++ b/api/v1/hypervisor_types.go @@ -2,7 +2,7 @@ SPDX-FileCopyrightText: Copyright 2024 SAP SE or an SAP affiliate company and cobaltcore-dev contributors SPDX-License-Identifier: Apache-2.0 -Licensed under the Apache License, LibVirtVersion 2.0 (the "License"); +Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at @@ -288,6 +288,10 @@ type HypervisorStatus struct { // Represents the LibVirt version. LibVirtVersion string `json:"libVirtVersion,omitempty"` + // +kubebuilder:default:=unknown + // Represents the Hypervisor version + HypervisorVersion string `json:"hypervisorVersion,omitempty"` + // Represents the Operating System status. OperatingSystem OperatingSystemStatus `json:"operatingSystem,omitempty"` diff --git a/applyconfigurations/api/v1/hypervisorstatus.go b/applyconfigurations/api/v1/hypervisorstatus.go index 6dd500ab..45c24f55 100644 --- a/applyconfigurations/api/v1/hypervisorstatus.go +++ b/applyconfigurations/api/v1/hypervisorstatus.go @@ -11,6 +11,7 @@ import ( // with apply. type HypervisorStatusApplyConfiguration struct { LibVirtVersion *string `json:"libVirtVersion,omitempty"` + HypervisorVersion *string `json:"hypervisorVersion,omitempty"` OperatingSystem *OperatingSystemStatusApplyConfiguration `json:"operatingSystem,omitempty"` Update *HyperVisorUpdateStatusApplyConfiguration `json:"updateStatus,omitempty"` Instances []InstanceApplyConfiguration `json:"instances,omitempty"` @@ -44,6 +45,14 @@ func (b *HypervisorStatusApplyConfiguration) WithLibVirtVersion(value string) *H return b } +// WithHypervisorVersion sets the HypervisorVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the HypervisorVersion field is set to the value of the last call. +func (b *HypervisorStatusApplyConfiguration) WithHypervisorVersion(value string) *HypervisorStatusApplyConfiguration { + b.HypervisorVersion = &value + return b +} + // WithOperatingSystem sets the OperatingSystem field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the OperatingSystem field is set to the value of the last call. diff --git a/config/crd/bases/kvm.cloud.sap_hypervisors.yaml b/config/crd/bases/kvm.cloud.sap_hypervisors.yaml index dad29e56..c40ed67e 100644 --- a/config/crd/bases/kvm.cloud.sap_hypervisors.yaml +++ b/config/crd/bases/kvm.cloud.sap_hypervisors.yaml @@ -399,6 +399,10 @@ spec: description: HypervisorID is the unique identifier of the hypervisor in OpenStack. type: string + hypervisorVersion: + default: unknown + description: Represents the Hypervisor version. + type: string instances: description: Represents the Hypervisor hosted Virtual Machines items: