MachineRegistration [elemental.cattle.io/v1beta1]

MachineRegistrationelemental-operator 拥有,并且在每个业务集群中仅创建一次。裸金属 provider 不会修改它,但 operator 必须编写它,因为其 config 块会被烘焙到 registration ISO 中,并在首次启动时由 elemental-register 回放——它包含 registration URL、MachineInventoryLabels,以及将一台刚刷写镜像的主机转换为可用 MachineInventory 的 cloud-init。

类型
object

规格

属性类型描述
apiVersionstring

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kindstring

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadataObjectMeta

ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

specobject
statusobject

.spec

类型
object
属性类型描述
configobject

Config the cloud config that will be used to provision the node.

machineInventoryAnnotationsobject

MachineInventoryAnnotations annotations to be added to the created MachineInventory object.

machineInventoryLabelsobject

MachineInventoryLabels label to be added to the created MachineInventory object.

machineNamestring

.spec.config

描述
Config the cloud config that will be used to provision the node.
类型
object
属性类型描述
cloud-config
elementalobject
networkobject

NetworkTemplate contains a map of IPAddressPools and a schemaless network config template.

.spec.config.elemental

类型
object
属性类型描述
installobject
registrationobject
resetobject
system-agentobject

.spec.config.elemental.install

类型
object
属性类型描述
config-dirstring
config-urlsarray
debugboolean
devicestring
device-selectorarray
disable-boot-entryboolean
eject-cdboolean
firmwarestring
isostring
no-formatboolean
poweroffboolean
rebootboolean
snapshotterobject
system-uristring
ttystring

.spec.config.elemental.install.config-urls

类型
array

.spec.config.elemental.install.config-urls[]

类型
string

.spec.config.elemental.install.device-selector

类型
array

.spec.config.elemental.install.device-selector[]

类型
object
必填
keyoperator
属性类型描述
keystring
operatorstring
valuesarray

.spec.config.elemental.install.device-selector[].values

类型
array

.spec.config.elemental.install.device-selector[].values[]

类型
string

.spec.config.elemental.install.snapshotter

类型
object
属性类型描述
maxSnapsinteger

MaxSnaps sets the maximum amount of snapshots to keep

typestring

Type sets the snapshotter type for a new installation, available options are 'loopdevice' and 'btrfs'

.spec.config.elemental.registration

类型
object
属性类型描述
authstring
ca-certstring
emulate-tpmboolean
emulated-tpm-seedinteger
no-smbiosboolean
no-toolkitboolean
urlstring

.spec.config.elemental.reset

类型
object
属性类型描述
config-urlsarray
debugboolean
disable-boot-entryboolean
enabledboolean
poweroffboolean
rebootboolean
reset-oemboolean
reset-persistentboolean
system-uristring

.spec.config.elemental.reset.config-urls

类型
array

.spec.config.elemental.reset.config-urls[]

类型
string

.spec.config.elemental.system-agent

类型
object
属性类型描述
secret-namestring
secret-namespacestring
strictTLSModeboolean
tokenstring
urlstring

.spec.config.network

描述
NetworkTemplate contains a map of IPAddressPools and a schemaless network config template.
类型
object
属性类型描述
config

Config contains the network config template (nmc, nmstate, or nmconnections formats)

configuratorstring

Configurator

ipAddressesobject

IPAddresses contains a map of IPPools references

.spec.config.network.ipAddresses

描述
IPAddresses contains a map of IPPools references
类型
object

.spec.machineInventoryAnnotations

描述
MachineInventoryAnnotations annotations to be added to the created MachineInventory object.
类型
object

.spec.machineInventoryLabels

描述
MachineInventoryLabels label to be added to the created MachineInventory object.
类型
object

.status

类型
object
属性类型描述
conditionsarray

Conditions describe the state of the machine registration object.

registrationTokenstring

RegistrationToken a token for registering a machine.

registrationURLstring

RegistrationURL is the URL for registering a new machine.

serviceAccountRefobject

ServiceAccountRef a reference to the service account created by the machine registration.

.status.conditions

描述
Conditions describe the state of the machine registration object.
类型
array

.status.conditions[]

描述
Condition contains details for one aspect of the current state of this API Resource.
类型
object
必填
lastTransitionTimemessagereasonstatustype
属性类型描述
lastTransitionTimestring

lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.

messagestring

message is a human readable message indicating details about the transition. This may be an empty string.

observedGenerationinteger

observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.

reasonstring

reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.

statusstring

status of the condition, one of True, False, Unknown.

typestring

type of condition in CamelCase or in foo.example.com/CamelCase.

.status.serviceAccountRef

描述
ServiceAccountRef a reference to the service account created by the machine registration.
类型
object
属性类型描述
apiVersionstring

API version of the referent.

fieldPathstring

If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.

kindstring

Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

namestring

Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names

namespacestring

Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/

resourceVersionstring

Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency

uidstring

UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids

API 端点

可用的 API 端点如下:

  • /apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineregistrations
    • DELETE: delete collection of MachineRegistration
    • GET: list objects of kind MachineRegistration
    • POST: create a new MachineRegistration
  • /apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineregistrations/{name}
    • DELETE: delete the specified MachineRegistration
    • GET: read the specified MachineRegistration
    • PATCH: partially update the specified MachineRegistration
    • PUT: replace the specified MachineRegistration
  • /apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineregistrations/{name}/status
    • GET: read status of the specified MachineRegistration
    • PATCH: partially update status of the specified MachineRegistration
    • PUT: replace status of the specified MachineRegistration

/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineregistrations

HTTP 方法
DELETE
描述
delete collection of MachineRegistration
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
list objects of kind MachineRegistration
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistrationList schema
401 - UnauthorizedEmpty
HTTP 方法
POST
描述
create a new MachineRegistration
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyMachineRegistration schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
201 - CreatedMachineRegistration schema
202 - AcceptedMachineRegistration schema
401 - UnauthorizedEmpty

/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineregistrations/{name}

HTTP 方法
DELETE
描述
delete the specified MachineRegistration
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
HTTP 响应
HTTP 状态码响应体
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP 方法
GET
描述
read the specified MachineRegistration
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update the specified MachineRegistration
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace the specified MachineRegistration
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyMachineRegistration schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
201 - CreatedMachineRegistration schema
401 - UnauthorizedEmpty

/apis/elemental.cattle.io/v1beta1/namespaces/{namespace}/machineregistrations/{name}/status

HTTP 方法
GET
描述
read status of the specified MachineRegistration
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
401 - UnauthorizedEmpty
HTTP 方法
PATCH
描述
partially update status of the specified MachineRegistration
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
401 - UnauthorizedEmpty
HTTP 方法
PUT
描述
replace status of the specified MachineRegistration
查询参数
参数类型描述
dryRunstringWhen present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed
fieldValidationstringfieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.
请求体参数
参数类型描述
bodyMachineRegistration schemaapplication/json formatted
HTTP 响应
HTTP 状态码响应体
200 - OKMachineRegistration schema
201 - CreatedMachineRegistration schema
401 - UnauthorizedEmpty