Chapter 12. 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
-
12.1. Specification Copy linkLink copied to clipboard!
Property | Type | Description |
---|---|---|
|
| 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 |
|
| 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 |
| Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata | |
|
| spec describes the configuration of the machineosconfig |
|
| status describes the status of the machineosconfig |
12.1.1. .spec Copy linkLink copied to clipboard!
- Description
- spec describes the configuration of the machineosconfig
- Type
-
object
- Required
-
imageBuilder
-
machineConfigPool
-
renderedImagePushSecret
-
renderedImagePushSpec
-
Property | Type | 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. |
|
| 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. |
|
| MachineOSContainerfile contains all custom content the user wants built into the image |
|
| imageBuilder describes which image builder will be used in each build triggered by this MachineOSConfig. Currently supported type(s): Job |
|
| 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. |
|
| 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. |
|
| renderedImagePushSpec 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. |
12.1.2. .spec.baseImagePullSecret Copy linkLink copied to clipboard!
- 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
-
Property | Type | Description |
---|---|---|
|
| name 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. |
12.1.3. .spec.containerFile Copy linkLink copied to clipboard!
- 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
12.1.4. .spec.containerFile[] Copy linkLink copied to clipboard!
- Description
- MachineOSContainerfile contains all custom content the user wants built into the image
- Type
-
object
- Required
-
content
-
Property | Type | Description |
---|---|---|
|
| containerfileArch 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. |
|
| content 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. |
12.1.5. .spec.imageBuilder Copy linkLink copied to clipboard!
- 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
-
Property | Type | Description |
---|---|---|
|
| imageBuilderType specifies the backend to be used to build the image. Valid options are: Job |
12.1.6. .spec.machineConfigPool Copy linkLink copied to clipboard!
- 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
-
Property | Type | Description |
---|---|---|
|
| name 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. |
12.1.7. .spec.renderedImagePushSecret Copy linkLink copied to clipboard!
- 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
-
Property | Type | Description |
---|---|---|
|
| name 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. |
12.1.8. .status Copy linkLink copied to clipboard!
- Description
- status describes the status of the machineosconfig
- Type
-
object
Property | Type | Description |
---|---|---|
|
| conditions are state related conditions for the object. |
|
| Condition contains details for one aspect of the current state of this API Resource. |
|
| currentImagePullSpec 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. |
|
| machineOSBuild is a reference to the MachineOSBuild object for this MachineOSConfig, which contains the status for the image build. |
|
| observedGeneration represents the generation of the MachineOSConfig object observed by the Machine Config Operator’s build controller. |
12.1.9. .status.conditions Copy linkLink copied to clipboard!
- Description
- conditions are state related conditions for the object.
- Type
-
array
12.1.10. .status.conditions[] Copy linkLink copied to clipboard!
- Description
- Condition contains details for one aspect of the current state of this API Resource.
- Type
-
object
- Required
-
lastTransitionTime
-
message
-
reason
-
status
-
type
-
Property | Type | Description |
---|---|---|
|
| 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. |
|
| message is a human readable message indicating details about the transition. This may be an empty string. |
|
| 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. |
|
| 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. |
|
| status of the condition, one of True, False, Unknown. |
|
| type of condition in CamelCase or in foo.example.com/CamelCase. |
12.1.11. .status.machineOSBuild Copy linkLink copied to clipboard!
- 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
-
Property | Type | Description |
---|---|---|
|
| group 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. |
|
| name of the referent. The name must contain only lowercase alphanumeric characters, '-' or '.' and start/end with an alphanumeric character. |
|
| namespace 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. |
|
| resource 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. |
12.2. API endpoints Copy linkLink copied to clipboard!
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
-
12.2.1. /apis/machineconfiguration.openshift.io/v1/machineosconfigs Copy linkLink copied to clipboard!
- HTTP method
-
DELETE
- Description
- delete collection of MachineOSConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- list objects of kind MachineOSConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
POST
- Description
- create a MachineOSConfig
Parameter | Type | Description |
---|---|---|
|
| When 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 |
|
| fieldValidation 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. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
12.2.2. /apis/machineconfiguration.openshift.io/v1/machineosconfigs/{name} Copy linkLink copied to clipboard!
Parameter | Type | Description |
---|---|---|
|
| name of the MachineOSConfig |
- HTTP method
-
DELETE
- Description
- delete a MachineOSConfig
Parameter | Type | Description |
---|---|---|
|
| When 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 code | Reponse body |
---|---|
200 - OK |
|
202 - Accepted |
|
401 - Unauthorized | Empty |
- HTTP method
-
GET
- Description
- read the specified MachineOSConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update the specified MachineOSConfig
Parameter | Type | Description |
---|---|---|
|
| When 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 |
|
| fieldValidation 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 code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace the specified MachineOSConfig
Parameter | Type | Description |
---|---|---|
|
| When 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 |
|
| fieldValidation 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. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |
12.2.3. /apis/machineconfiguration.openshift.io/v1/machineosconfigs/{name}/status Copy linkLink copied to clipboard!
Parameter | Type | Description |
---|---|---|
|
| name of the MachineOSConfig |
- HTTP method
-
GET
- Description
- read status of the specified MachineOSConfig
HTTP code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PATCH
- Description
- partially update status of the specified MachineOSConfig
Parameter | Type | Description |
---|---|---|
|
| When 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 |
|
| fieldValidation 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 code | Reponse body |
---|---|
200 - OK |
|
401 - Unauthorized | Empty |
- HTTP method
-
PUT
- Description
- replace status of the specified MachineOSConfig
Parameter | Type | Description |
---|---|---|
|
| When 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 |
|
| fieldValidation 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. |
Parameter | Type | Description |
---|---|---|
|
|
HTTP code | Reponse body |
---|---|
200 - OK |
|
201 - Created |
|
401 - Unauthorized | Empty |