MachineInventory [elemental.cattle.io/v1beta1]
MachineInventory 是物理主机的长期标识对象。它由 elemental-register 在主机从 seed ISO 启动后创建,并会在重新部署后继续存在——BaremetalMachine 仅在一个 Kubernetes 节点的生命周期内借用它。
裸金属提供程序会读取该资源的两个部分:
metadata.name— 必须出现在MachineInventoryPool.spec.inventoryNames条目中,主机才可分配。spec.observedNetwork— 这是 Alauda 分支独有的字段,在注册期间采集;提供程序会在每次重新部署时将其按 cloud-initnetwork-configv2 重新应用,因此主机会以与首次登记时相同的接口/bond/VLAN/IP 布局重新启动。
提供程序还会在清理/重新部署期间写入 metadata.annotations(baremetal.alauda.io/owner-*、baremetal.alauda.io/plan.type),并更新 status.plan / status.conditions。
- Type
object
Specification
.spec
- Type
object
.spec.ipAddressClaims
- Description
- IPAddressClaims is a map of IPAddressClaim associated to this machine. The map key is the ipAddressPool.name.
- Type
object
.spec.ipAddressPools
- Description
- IPAddressPools is a map of IPAddressPool objects associated to this machine.
- Type
object
.spec.network
- Description
- NetworkConfig is the final NetworkConfig.
- Type
object
.spec.network.ipAddresses
- Description
- IPAddresses contains a map of claimed IPAddresses
- Type
object
.spec.observedNetwork
- Description
- ObservedNetwork is a live-ISO-side snapshot of the host's actual network configuration uploaded by elemental-register during initial registration (Alauda fork). It is informational only and is intentionally kept separate from Network (the target/template network). Consumers such as baremetal providers can read this to know what the host looked like before install-time network reconfiguration.
- Type
object
.spec.observedNetwork.dnsServers
- Description
- DNSServers observed (typically from /etc/resolv.conf).
- Type
array
.spec.observedNetwork.dnsServers[]
- Type
string
.spec.observedNetwork.interfaces
- Description
- Interfaces observed on the host.
- Type
array
.spec.observedNetwork.interfaces[]
- Description
- ObservedInterface describes a single network interface on the host.
- Type
object- Required
name
.spec.observedNetwork.interfaces[].addresses
- Description
- Addresses assigned to the interface, in CIDR form (e.g. 10.0.0.5/24, fe80::1/64). Both IPv4 and IPv6 may appear.
- Type
array
.spec.observedNetwork.interfaces[].addresses[]
- Type
string
.spec.observedNetwork.routes
- Description
- Routes observed in the host's routing table.
- Type
array
.spec.observedNetwork.routes[]
- Description
- ObservedRoute describes a single routing table entry.
- Type
object- Required
destination
.spec.observedNetwork.searchDomains
- Description
- SearchDomains observed.
- Type
array
.spec.observedNetwork.searchDomains[]
- Type
string
.status
- Type
object
.status.conditions
- Description
- Conditions describe the state of the machine inventory object.
- Type
array
.status.conditions[]
- Description
- Condition contains details for one aspect of the current state of this API Resource.
- Type
object- Required
lastTransitionTimemessagereasonstatustype
.status.plan
- Description
- PlanStatus reflect the status of the plan owned by the machine inventory object.
- Type
object
.status.plan.secretRef
- Description
- PlanSecretRef a reference to the created plan secret.
- Type
object
API Endpoints
The following API endpoints are available:
/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineinventoriesDELETE: delete collection of MachineInventoryGET: list objects of kind MachineInventoryPOST: create a new MachineInventory
/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineinventories/{name}DELETE: delete the specified MachineInventoryGET: read the specified MachineInventoryPATCH: partially update the specified MachineInventoryPUT: replace the specified MachineInventory
/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineinventories/{name}/statusGET: read status of the specified MachineInventoryPATCH: partially update status of the specified MachineInventoryPUT: replace status of the specified MachineInventory
/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineinventories
- HTTP method
DELETE- Description
- delete collection of MachineInventory
- HTTP responses
- HTTP method
GET- Description
- list objects of kind MachineInventory
- HTTP responses
- HTTP method
POST- Description
- create a new MachineInventory
- Query parameters
- Body parameters
- HTTP responses
/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineinventories/{name}
- HTTP method
DELETE- Description
- delete the specified MachineInventory
- Query parameters
- HTTP responses
- HTTP method
GET- Description
- read the specified MachineInventory
- HTTP responses
- HTTP method
PATCH- Description
- partially update the specified MachineInventory
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace the specified MachineInventory
- Query parameters
- Body parameters
- HTTP responses
/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineinventories/{name}/status
- HTTP method
GET- Description
- read status of the specified MachineInventory
- HTTP responses
- HTTP method
PATCH- Description
- partially update status of the specified MachineInventory
- Query parameters
- HTTP responses
- HTTP method
PUT- Description
- replace status of the specified MachineInventory
- Query parameters
- Body parameters
- HTTP responses