MachineOSConfig [machineconfiguration.openshift.io/v1]
Esc
Start typing to search...
On this page

MachineOSConfig [machineconfiguration.openshift.io/v1]

Description

MachineOSConfig describes the configuration for a build process managed by the MCO Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).

Type
`object`
Required
  • spec

Specification

PropertyTypeDescription
apiVersionstringAPIVersion 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
kindstringKind 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
metadataObjectMetaStandard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
specobjectspec describes the configuration of the machineosconfig
statusobjectstatus describes the status of the machineosconfig

.spec

Description

spec describes the configuration of the machineosconfig

Type
`object`
Required
  • imageBuilder
  • machineConfigPool
  • renderedImagePushSecret
  • renderedImagePushSpec
PropertyTypeDescription
baseImagePullSecretobjectbaseImagePullSecret is the secret used to pull the base image. Must live in the openshift-machine-config-operator namespace if provided. Defaults to using the cluster-wide pull secret if not specified. This is provided during install time of the cluster, and lives in the openshift-config namespace as a secret.
containerFilearraycontainerFile describes the custom data the user has specified to build into the image. This is also commonly called a Dockerfile and you can treat it as such. The content is the content of your Dockerfile. See https://github.com/containers/common/blob/main/docs/Containerfile.5.md for the spec reference. This is a list indexed by architecture name (e.g. AMD64), and allows specifying one containerFile per arch, up to 4.
containerFile[]objectMachineOSContainerfile contains all custom content the user wants built into the image
imageBuilderobjectimageBuilder describes which image builder will be used in each build triggered by this MachineOSConfig. Currently supported type(s): Job
machineConfigPoolobjectmachineConfigPool is the pool which the build is for. The Machine Config Operator will perform the build and roll out the built image to the specified pool.
renderedImagePushSecretobjectrenderedImagePushSecret is the secret used to connect to a user registry. The final image push and pull secrets should be separate and assume the principal of least privilege. The push secret with write privilege is only required to be present on the node hosting the MachineConfigController pod. The pull secret with read only privileges is required on all nodes. By separating the two secrets, the risk of write credentials becoming compromised is reduced.
renderedImagePushSpecstringrenderedImagePushSpec describes the location of the final image. The MachineOSConfig object will use the in cluster image registry configuration. If you wish to use a mirror or any other settings specific to registries.conf, please specify those in the cluster wide registries.conf via the cluster image.config, ImageContentSourcePolicies, ImageDigestMirrorSet, or ImageTagMirrorSet objects. The format of the image push spec is: host[:port][/namespace]/name:<tag> or svc_name.namespace.svc[:port]/repository/name:<tag>. The length of the push spec must be between 1 to 447 characters.

.spec.baseImagePullSecret

Description

baseImagePullSecret is the secret used to pull the base image. Must live in the openshift-machine-config-operator namespace if provided. Defaults to using the cluster-wide pull secret if not specified. This is provided during install time of the cluster, and lives in the openshift-config namespace as a secret.

Type
`object`
Required
  • name
PropertyTypeDescription
namestringname is the name of the secret used to push or pull this MachineOSConfig object. Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. This secret must be in the openshift-machine-config-operator namespace.

.spec.containerFile

Description

containerFile describes the custom data the user has specified to build into the image. This is also commonly called a Dockerfile and you can treat it as such. The content is the content of your Dockerfile. See https://github.com/containers/common/blob/main/docs/Containerfile.5.md for the spec reference. This is a list indexed by architecture name (e.g. AMD64), and allows specifying one containerFile per arch, up to 4.

Type
`array`

.spec.containerFile[]

Description

MachineOSContainerfile contains all custom content the user wants built into the image

Type
`object`
Required
  • content
PropertyTypeDescription
containerfileArchstringcontainerfileArch describes the architecture this containerfile is to be built for. This arch is optional. If the user does not specify an architecture, it is assumed that the content can be applied to all architectures, or in a single arch cluster: the only architecture.
contentstringcontent is an embedded Containerfile/Dockerfile that defines the contents to be built into your image. See https://github.com/containers/common/blob/main/docs/Containerfile.5.md for the spec reference. for example, this would add the tree package to your hosts: FROM configs AS final RUN rpm-ostree install tree && \ ostree container commit This is a required field and can have a maximum length of 4096 characters.

.spec.imageBuilder

Description

imageBuilder describes which image builder will be used in each build triggered by this MachineOSConfig. Currently supported type(s): Job

Type
`object`
Required
  • imageBuilderType
PropertyTypeDescription
imageBuilderTypestringimageBuilderType specifies the backend to be used to build the image. Valid options are: Job

.spec.machineConfigPool

Description

machineConfigPool is the pool which the build is for. The Machine Config Operator will perform the build and roll out the built image to the specified pool.

Type
`object`
Required
  • name
PropertyTypeDescription
namestringname of the MachineConfigPool object. This value should be at most 253 characters, and must contain only lowercase alphanumeric characters, hyphens and periods, and should start and end with an alphanumeric character.

.spec.renderedImagePushSecret

Description

renderedImagePushSecret is the secret used to connect to a user registry. The final image push and pull secrets should be separate and assume the principal of least privilege. The push secret with write privilege is only required to be present on the node hosting the MachineConfigController pod. The pull secret with read only privileges is required on all nodes. By separating the two secrets, the risk of write credentials becoming compromised is reduced.

Type
`object`
Required
  • name
PropertyTypeDescription
namestringname is the name of the secret used to push or pull this MachineOSConfig object. Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. This secret must be in the openshift-machine-config-operator namespace.

.status

Description

status describes the status of the machineosconfig

Type
`object`
PropertyTypeDescription
conditionsarrayconditions are state related conditions for the object.
conditions[]objectCondition contains details for one aspect of the current state of this API Resource.
currentImagePullSpecstringcurrentImagePullSpec is the fully qualified image pull spec used by the MCO to pull down the new OSImage. This includes the sha256 image digest. This is generated when the Machine Config Operator’s build controller successfully completes the build, and is populated from the corresponding MachineOSBuild object’s FinalImagePushSpec. This may change after completion in reaction to spec changes that would cause a new image build, but will not be removed. The format of the image pull spec is: host[:port][/namespace]/name@sha256:<digest>, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters.
machineOSBuildobjectmachineOSBuild is a reference to the MachineOSBuild object for this MachineOSConfig, which contains the status for the image build.
observedGenerationintegerobservedGeneration represents the generation of the MachineOSConfig object observed by the Machine Config Operator’s build controller.

.status.conditions

Description

conditions are state related conditions for the object.

Type
`array`

.status.conditions[]

Description

Condition contains details for one aspect of the current state of this API Resource.

Type
`object`
Required
  • lastTransitionTime
  • message
  • reason
  • status
  • type
PropertyTypeDescription
lastTransitionTimestringlastTransitionTime 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.
messagestringmessage is a human readable message indicating details about the transition. This may be an empty string.
observedGenerationintegerobservedGeneration 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.
reasonstringreason 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.
statusstringstatus of the condition, one of True, False, Unknown.
typestringtype of condition in CamelCase or in foo.example.com/CamelCase.

.status.machineOSBuild

Description

machineOSBuild is a reference to the MachineOSBuild object for this MachineOSConfig, which contains the status for the image build.

Type
`object`
Required
  • group
  • name
  • resource
PropertyTypeDescription
groupstringgroup of the referent. The name must contain only lowercase alphanumeric characters, '-' or '.' and start/end with an alphanumeric character. Example: "", "apps", "build.openshift.io", etc.
namestringname of the referent. The name must contain only lowercase alphanumeric characters, '-' or '.' and start/end with an alphanumeric character.
namespacestringnamespace of the referent. This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens, and should start and end with an alphanumeric character.
resourcestringresource of the referent. This value should consist of at most 63 characters, and of only lowercase alphanumeric characters and hyphens, and should start with an alphabetic character and end with an alphanumeric character. Example: "deployments", "deploymentconfigs", "pods", etc.

API endpoints

The following API endpoints are available:

  • /apis/machineconfiguration.openshift.io/v1/machineosconfigs
    • DELETE: delete collection of MachineOSConfig
    • GET: list objects of kind MachineOSConfig
    • POST: create a MachineOSConfig
  • /apis/machineconfiguration.openshift.io/v1/machineosconfigs/{name}
    • DELETE: delete a MachineOSConfig
    • GET: read the specified MachineOSConfig
    • PATCH: partially update the specified MachineOSConfig
    • PUT: replace the specified MachineOSConfig
  • /apis/machineconfiguration.openshift.io/v1/machineosconfigs/{name}/status
    • GET: read status of the specified MachineOSConfig
    • PATCH: partially update status of the specified MachineOSConfig
    • PUT: replace status of the specified MachineOSConfig

/apis/machineconfiguration.openshift.io/v1/machineosconfigs

HTTP method
`DELETE`
Description
delete collection of MachineOSConfig

HTTP responses

HTTP codeReponse body
200 - OKStatus schema
401 - UnauthorizedEmpty
HTTP method
`GET`
Description
list objects of kind MachineOSConfig

HTTP responses

HTTP codeReponse body
200 - OKMachineOSConfigList schema
401 - UnauthorizedEmpty
HTTP method
`POST`
Description
create a MachineOSConfig

Query parameters

ParameterTypeDescription
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.

Body parameters

ParameterTypeDescription
bodyMachineOSConfig schema

HTTP responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
201 - CreatedMachineOSConfig schema
202 - AcceptedMachineOSConfig schema
401 - UnauthorizedEmpty

/apis/machineconfiguration.openshift.io/v1/machineosconfigs/{name}

Global path parameters

ParameterTypeDescription
namestringname of the MachineOSConfig
HTTP method
`DELETE`
Description
delete a MachineOSConfig

Query parameters

ParameterTypeDescription
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 responses

HTTP codeReponse body
200 - OKStatus schema
202 - AcceptedStatus schema
401 - UnauthorizedEmpty
HTTP method
`GET`
Description
read the specified MachineOSConfig

HTTP responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
401 - UnauthorizedEmpty
HTTP method
`PATCH`
Description
partially update the specified MachineOSConfig

Query parameters

ParameterTypeDescription
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 responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
401 - UnauthorizedEmpty
HTTP method
`PUT`
Description
replace the specified MachineOSConfig

Query parameters

ParameterTypeDescription
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.

Body parameters

ParameterTypeDescription
bodyMachineOSConfig schema

HTTP responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
201 - CreatedMachineOSConfig schema
401 - UnauthorizedEmpty

/apis/machineconfiguration.openshift.io/v1/machineosconfigs/{name}/status

Global path parameters

ParameterTypeDescription
namestringname of the MachineOSConfig
HTTP method
`GET`
Description
read status of the specified MachineOSConfig

HTTP responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
401 - UnauthorizedEmpty
HTTP method
`PATCH`
Description
partially update status of the specified MachineOSConfig

Query parameters

ParameterTypeDescription
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 responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
401 - UnauthorizedEmpty
HTTP method
`PUT`
Description
replace status of the specified MachineOSConfig

Query parameters

ParameterTypeDescription
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.

Body parameters

ParameterTypeDescription
bodyMachineOSConfig schema

HTTP responses

HTTP codeReponse body
200 - OKMachineOSConfig schema
201 - CreatedMachineOSConfig schema
401 - UnauthorizedEmpty