diff --git a/features.md b/features.md
index 5abca789365..3eee8b2f65a 100644
--- a/features.md
+++ b/features.md
@@ -53,6 +53,7 @@
| KMSEncryptionProvider| | | Enabled | Enabled | Enabled | Enabled |
| MachineAPIMigration| | | Enabled | Enabled | Enabled | Enabled |
| ManagedBootImagesAzure| | | Enabled | Enabled | Enabled | Enabled |
+| ManagedBootImagesCPMS| | | Enabled | Enabled | Enabled | Enabled |
| ManagedBootImagesvSphere| | | Enabled | Enabled | Enabled | Enabled |
| MaxUnavailableStatefulSet| | | Enabled | Enabled | Enabled | Enabled |
| MinimumKubeletVersion| | | Enabled | Enabled | Enabled | Enabled |
diff --git a/features/features.go b/features/features.go
index 46d7179404d..411cece9c66 100644
--- a/features/features.go
+++ b/features/features.go
@@ -362,6 +362,14 @@ var (
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
+ FeatureGateManagedBootImagesCPMS = newFeatureGate("ManagedBootImagesCPMS").
+ reportProblemsToJiraComponent("MachineConfigOperator").
+ contactPerson("djoshy").
+ productScope(ocpSpecific).
+ enhancementPR("https://github.com/openshift/enhancements/pull/1818").
+ enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
+ mustRegister()
+
FeatureGateBootImageSkewEnforcement = newFeatureGate("BootImageSkewEnforcement").
reportProblemsToJiraComponent("MachineConfigOperator").
contactPerson("djoshy").
diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go
index b267d878aca..e7307464def 100644
--- a/openapi/generated_openapi/zz_generated.openapi.go
+++ b/openapi/generated_openapi/zz_generated.openapi.go
@@ -53673,7 +53673,7 @@ func schema_openshift_api_operator_v1_MachineManager(ref common.ReferenceCallbac
Properties: map[string]spec.Schema{
"resource": {
SchemaProps: spec.SchemaProps{
- Description: "resource is the machine management resource's type. The only current valid value is machinesets. machinesets means that the machine manager will only register resources of the kind MachineSet.",
+ Description: "resource is the machine management resource's type. Valid values are machinesets and controlplanemachinesets. machinesets means that the machine manager will only register resources of the kind MachineSet. controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.",
Default: "",
Type: []string{"string"},
Format: "",
@@ -53711,7 +53711,7 @@ func schema_openshift_api_operator_v1_MachineManagerSelector(ref common.Referenc
Properties: map[string]spec.Schema{
"mode": {
SchemaProps: spec.SchemaProps{
- Description: "mode determines how machine managers will be selected for updates. Valid values are All and Partial. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. None means that every resource matched by the machine manager will not be updated.",
+ Description: "mode determines how machine managers will be selected for updates. Valid values are All, Partial and None. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster. None means that every resource matched by the machine manager will not be updated.",
Default: "",
Type: []string{"string"},
Format: "",
diff --git a/openapi/openapi.json b/openapi/openapi.json
index d2bf4d75c32..5147798f453 100644
--- a/openapi/openapi.json
+++ b/openapi/openapi.json
@@ -31216,7 +31216,7 @@
"default": ""
},
"resource": {
- "description": "resource is the machine management resource's type. The only current valid value is machinesets. machinesets means that the machine manager will only register resources of the kind MachineSet.",
+ "description": "resource is the machine management resource's type. Valid values are machinesets and controlplanemachinesets. machinesets means that the machine manager will only register resources of the kind MachineSet. controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.",
"type": "string",
"default": ""
},
@@ -31234,7 +31234,7 @@
],
"properties": {
"mode": {
- "description": "mode determines how machine managers will be selected for updates. Valid values are All and Partial. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. None means that every resource matched by the machine manager will not be updated.",
+ "description": "mode determines how machine managers will be selected for updates. Valid values are All, Partial and None. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster. None means that every resource matched by the machine manager will not be updated.",
"type": "string",
"default": ""
},
diff --git a/operator/v1/tests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml b/operator/v1/tests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml
new file mode 100644
index 00000000000..d4631364dee
--- /dev/null
+++ b/operator/v1/tests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml
@@ -0,0 +1,111 @@
+apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
+name: "MachineConfiguration"
+crdName: machineconfigurations.operator.openshift.io
+featureGates:
+- ManagedBootImages
+- ManagedBootImagesCPMS
+tests:
+ onCreate:
+ - name: Should be able to create a minimal MachineConfiguration
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec: {} # No spec is required for a MachineConfiguration
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ - name: Should be able to create an empty ManagedBootImages configuration knob
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ managedBootImages:
+ machineManagers: []
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ managedBootImages:
+ machineManagers: []
+ - name: Should be able to create a ManagedBootImages configuration knob that opts in all ControlPlaneMachineSets
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ managedBootImages:
+ machineManagers:
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: All
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ managedBootImages:
+ machineManagers:
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: All
+ - name: Should be able to create a ManagedBootImages configuration knob that opts in no ControlPlaneMachineSets
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ managedBootImages:
+ machineManagers:
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: None
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ managedBootImages:
+ machineManagers:
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: None
+ - name: Should not be able to create a ManagedBootImages configuration knob that opts in ControlPlaneMachineSets in partial mode
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ managedBootImages:
+ machineManagers:
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: Partial
+ partial:
+ machineResourceSelector:
+ matchLabels: {}
+ expectedError: "Only All or None selection mode is permitted for ControlPlaneMachineSets"
+ - name: Only one unique pair of resource/apigroup is allowed in machineManagers
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ managedBootImages:
+ machineManagers:
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: None
+ - resource: controlplanemachinesets
+ apiGroup: machine.openshift.io
+ selection:
+ mode: All
+ expectedError: "spec.managedBootImages.machineManagers[1]: Duplicate value: map[string]interface {}{\"apiGroup\":\"machine.openshift.io\", \"resource\":\"controlplanemachinesets\"}"
diff --git a/operator/v1/types_machineconfiguration.go b/operator/v1/types_machineconfiguration.go
index 489887af726..c6bcd22bc0f 100644
--- a/operator/v1/types_machineconfiguration.go
+++ b/operator/v1/types_machineconfiguration.go
@@ -366,10 +366,12 @@ type ManagedBootImages struct {
// MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information
// such as the resource type and the API Group of the resource. It also provides granular control via the selection field.
+// +openshift:validation:FeatureGateAwareXValidation:requiredFeatureGate=ManagedBootImages;ManagedBootImagesCPMS,rule="self.resource != 'controlplanemachinesets' || self.selection.mode == 'All' || self.selection.mode == 'None'", message="Only All or None selection mode is permitted for ControlPlaneMachineSets"
type MachineManager struct {
// resource is the machine management resource's type.
- // The only current valid value is machinesets.
+ // Valid values are machinesets and controlplanemachinesets.
// machinesets means that the machine manager will only register resources of the kind MachineSet.
+ // controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
// +required
Resource MachineManagerMachineSetsResourceType `json:"resource"`
@@ -388,9 +390,10 @@ type MachineManager struct {
// +union
type MachineManagerSelector struct {
// mode determines how machine managers will be selected for updates.
- // Valid values are All and Partial.
+ // Valid values are All, Partial and None.
// All means that every resource matched by the machine manager will be updated.
// Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ // Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
// None means that every resource matched by the machine manager will not be updated.
// +unionDiscriminator
// +required
@@ -427,12 +430,15 @@ const (
// MachineManagerManagedResourceType is a string enum used in the MachineManager type to describe the resource
// type to be registered.
-// +kubebuilder:validation:Enum:="machinesets"
+// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=ManagedBootImages,enum=machinesets
+// +openshift:validation:FeatureGateAwareEnum:requiredFeatureGate=ManagedBootImages;ManagedBootImagesCPMS,enum=machinesets;controlplanemachinesets
type MachineManagerMachineSetsResourceType string
const (
// MachineSets represent the MachineSet resource type, which manage a group of machines and belong to the Openshift machine API group.
MachineSets MachineManagerMachineSetsResourceType = "machinesets"
+ // ControlPlaneMachineSets represent the ControlPlaneMachineSets resource type, which manage a group of control-plane machines and belong to the Openshift machine API group.
+ ControlPlaneMachineSets MachineManagerMachineSetsResourceType = "controlplanemachinesets"
)
// MachineManagerManagedAPIGroupType is a string enum used in in the MachineManager type to describe the APIGroup
@@ -442,7 +448,7 @@ type MachineManagerMachineSetsAPIGroupType string
const (
// MachineAPI represent the traditional MAPI Group that a machineset may belong to.
- // This feature only supports MAPI machinesets at this time.
+ // This feature only supports MAPI machinesets and controlplanemachinesets at this time.
MachineAPI MachineManagerMachineSetsAPIGroupType = "machine.openshift.io"
)
diff --git a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
index a4fe0264ea0..c165fca6bf5 100644
--- a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
+++ b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
@@ -228,10 +228,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -241,9 +243,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -320,6 +323,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
@@ -993,10 +1001,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -1006,9 +1016,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -1085,6 +1096,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
diff --git a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
index 7c8d9869282..3de28dcdf34 100644
--- a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
+++ b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
@@ -103,8 +103,9 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
type: string
@@ -116,9 +117,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -734,8 +736,9 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
type: string
@@ -747,9 +750,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
diff --git a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
index 5ef1733d145..544168f4154 100644
--- a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
+++ b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
@@ -228,10 +228,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -241,9 +243,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -320,6 +323,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
@@ -993,10 +1001,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -1006,9 +1016,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -1085,6 +1096,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
diff --git a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
index 390853a26b8..14a864201c2 100644
--- a/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
+++ b/operator/v1/zz_generated.crd-manifests/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
@@ -136,10 +136,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -149,9 +151,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -228,6 +231,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
@@ -767,10 +775,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -780,9 +790,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -859,6 +870,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
diff --git a/operator/v1/zz_generated.featuregated-crd-manifests.yaml b/operator/v1/zz_generated.featuregated-crd-manifests.yaml
index bfdce9cf5b0..ae6ee6caa35 100644
--- a/operator/v1/zz_generated.featuregated-crd-manifests.yaml
+++ b/operator/v1/zz_generated.featuregated-crd-manifests.yaml
@@ -308,6 +308,7 @@ machineconfigurations.operator.openshift.io:
- BootImageSkewEnforcement
- IrreconcilableMachineConfig
- ManagedBootImages
+ - ManagedBootImages+ManagedBootImagesCPMS
FilenameOperatorName: machine-config
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_80"
diff --git a/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml b/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml
new file mode 100644
index 00000000000..cff91c39a91
--- /dev/null
+++ b/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages+ManagedBootImagesCPMS.yaml
@@ -0,0 +1,1266 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/1453
+ api.openshift.io/filename-cvo-runlevel: "0000_80"
+ api.openshift.io/filename-operator: machine-config
+ api.openshift.io/filename-ordering: "01"
+ feature-gate.release.openshift.io/ManagedBootImages: "true"
+ feature-gate.release.openshift.io/ManagedBootImagesCPMS: "true"
+ name: machineconfigurations.operator.openshift.io
+spec:
+ group: operator.openshift.io
+ names:
+ kind: MachineConfiguration
+ listKind: MachineConfigurationList
+ plural: machineconfigurations
+ singular: machineconfiguration
+ scope: Cluster
+ versions:
+ - name: v1
+ schema:
+ openAPIV3Schema:
+ description: |-
+ MachineConfiguration provides information to configure an operator to manage Machine Configuration.
+
+ Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).
+ properties:
+ apiVersion:
+ 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
+ type: string
+ kind:
+ description: |-
+ 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
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec is the specification of the desired behavior of the
+ Machine Config Operator
+ properties:
+ failedRevisionLimit:
+ description: |-
+ failedRevisionLimit is the number of failed static pod installer revisions to keep on disk and in the api
+ -1 = unlimited, 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ forceRedeploymentReason:
+ description: |-
+ forceRedeploymentReason can be used to force the redeployment of the operand by providing a unique string.
+ This provides a mechanism to kick a previously failed deployment and provide a reason why you think it will work
+ this time instead of failing again on the same config.
+ type: string
+ logLevel:
+ default: Normal
+ description: |-
+ logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a
+ simple way to manage coarse grained logging choices that operators have to interpret for their operands.
+
+ Valid values are: "Normal", "Debug", "Trace", "TraceAll".
+ Defaults to "Normal".
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ managedBootImages:
+ description: |-
+ managedBootImages allows configuration for the management of boot images for machine
+ resources within the cluster. This configuration allows users to select resources that should
+ be updated to the latest boot images during cluster upgrades, ensuring that new machines
+ always boot with the current cluster version's boot image. When omitted, this means no opinion
+ and the platform is left to choose a reasonable default, which is subject to change over time.
+ The default for each machine manager mode is All for GCP and AWS platforms, and None for all
+ other platforms.
+ properties:
+ machineManagers:
+ description: |-
+ machineManagers can be used to register machine management resources for boot image updates. The Machine Config Operator
+ will watch for changes to this list. Only one entry is permitted per type of machine management resource.
+ items:
+ description: |-
+ MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information
+ such as the resource type and the API Group of the resource. It also provides granular control via the selection field.
+ properties:
+ apiGroup:
+ description: |-
+ apiGroup is name of the APIGroup that the machine management resource belongs to.
+ The only current valid value is machine.openshift.io.
+ machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group.
+ enum:
+ - machine.openshift.io
+ type: string
+ resource:
+ description: |-
+ resource is the machine management resource's type.
+ Valid values are machinesets and controlplanemachinesets.
+ machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
+ enum:
+ - machinesets
+ - controlplanemachinesets
+ type: string
+ selection:
+ description: selection allows granular control of the machine
+ management resources that will be registered for boot
+ image updates.
+ properties:
+ mode:
+ description: |-
+ mode determines how machine managers will be selected for updates.
+ Valid values are All, Partial and None.
+ All means that every resource matched by the machine manager will be updated.
+ Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
+ None means that every resource matched by the machine manager will not be updated.
+ enum:
+ - All
+ - Partial
+ - None
+ type: string
+ partial:
+ description: |-
+ partial provides label selector(s) that can be used to match machine management resources.
+ Only permitted when mode is set to "Partial".
+ properties:
+ machineResourceSelector:
+ description: machineResourceSelector is a label
+ selector that can be used to select machine resources
+ like MachineSets.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - machineResourceSelector
+ type: object
+ required:
+ - mode
+ type: object
+ x-kubernetes-validations:
+ - message: Partial is required when type is partial, and
+ forbidden otherwise
+ rule: 'has(self.mode) && self.mode == ''Partial'' ? has(self.partial)
+ : !has(self.partial)'
+ required:
+ - apiGroup
+ - resource
+ - selection
+ type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
+ maxItems: 5
+ type: array
+ x-kubernetes-list-map-keys:
+ - resource
+ - apiGroup
+ x-kubernetes-list-type: map
+ type: object
+ managementState:
+ description: managementState indicates whether and how the operator
+ should manage the component
+ pattern: ^(Managed|Unmanaged|Force|Removed)$
+ type: string
+ nodeDisruptionPolicy:
+ description: |-
+ nodeDisruptionPolicy allows an admin to set granular node disruption actions for
+ MachineConfig-based updates, such as drains, service reloads, etc. Specifying this will allow
+ for less downtime when doing small configuration updates to the cluster. This configuration
+ has no effect on cluster upgrades which will still incur node disruption where required.
+ properties:
+ files:
+ description: |-
+ files is a list of MachineConfig file definitions and actions to take to changes on those paths
+ This list supports a maximum of 50 entries.
+ items:
+ description: NodeDisruptionPolicySpecFile is a file entry and
+ corresponding actions to take and is used in the NodeDisruptionPolicyConfig
+ object
+ properties:
+ actions:
+ description: |-
+ actions represents the series of commands to be executed on changes to the file at
+ the corresponding file path. Actions will be applied in the order that
+ they are set in this list. If there are other incoming changes to other MachineConfig
+ entries in the same update that require a reboot, the reboot will supercede these actions.
+ Valid actions are Reboot, Drain, Reload, DaemonReload and None.
+ The Reboot action and the None action cannot be used in conjunction with any of the other actions.
+ This list supports a maximum of 10 entries.
+ items:
+ properties:
+ reload:
+ description: reload specifies the service to reload,
+ only valid if type is reload
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be reloaded
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME}
+ must be atleast 1 character long and can only
+ consist of alphabets, digits, ":", "-", "_",
+ ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ restart:
+ description: restart specifies the service to restart,
+ only valid if type is restart
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be restarted
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME}
+ must be atleast 1 character long and can only
+ consist of alphabets, digits, ":", "-", "_",
+ ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ type:
+ description: |-
+ type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed
+ Valid values are Reboot, Drain, Reload, Restart, DaemonReload and None.
+ reload/restart requires a corresponding service target specified in the reload/restart field.
+ Other values require no further configuration
+ enum:
+ - Reboot
+ - Drain
+ - Reload
+ - Restart
+ - DaemonReload
+ - None
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: reload is required when type is Reload, and
+ forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Reload'' ? has(self.reload)
+ : !has(self.reload)'
+ - message: restart is required when type is Restart, and
+ forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Restart'' ?
+ has(self.restart) : !has(self.restart)'
+ maxItems: 10
+ type: array
+ x-kubernetes-list-type: atomic
+ x-kubernetes-validations:
+ - message: Reboot action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''Reboot'') ? size(self)
+ == 1 : true'
+ - message: None action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''None'') ? size(self) ==
+ 1 : true'
+ path:
+ description: |-
+ path is the location of a file being managed through a MachineConfig.
+ The Actions in the policy will apply to changes to the file at this path.
+ type: string
+ required:
+ - actions
+ - path
+ type: object
+ maxItems: 50
+ type: array
+ x-kubernetes-list-map-keys:
+ - path
+ x-kubernetes-list-type: map
+ sshkey:
+ description: |-
+ sshkey maps to the ignition.sshkeys field in the MachineConfig object, definition an action for this
+ will apply to all sshkey changes in the cluster
+ properties:
+ actions:
+ description: |-
+ actions represents the series of commands to be executed on changes to the file at
+ the corresponding file path. Actions will be applied in the order that
+ they are set in this list. If there are other incoming changes to other MachineConfig
+ entries in the same update that require a reboot, the reboot will supercede these actions.
+ Valid actions are Reboot, Drain, Reload, DaemonReload and None.
+ The Reboot action and the None action cannot be used in conjunction with any of the other actions.
+ This list supports a maximum of 10 entries.
+ items:
+ properties:
+ reload:
+ description: reload specifies the service to reload,
+ only valid if type is reload
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be reloaded
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name.
+ Expected format is ${NAME}${SERVICETYPE}, where
+ ${SERVICETYPE} must be one of ".service", ".socket",
+ ".device", ".mount", ".automount", ".swap",
+ ".target", ".path", ".timer",".snapshot", ".slice"
+ or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME}
+ must be atleast 1 character long and can only
+ consist of alphabets, digits, ":", "-", "_",
+ ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ restart:
+ description: restart specifies the service to restart,
+ only valid if type is restart
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be restarted
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name.
+ Expected format is ${NAME}${SERVICETYPE}, where
+ ${SERVICETYPE} must be one of ".service", ".socket",
+ ".device", ".mount", ".automount", ".swap",
+ ".target", ".path", ".timer",".snapshot", ".slice"
+ or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME}
+ must be atleast 1 character long and can only
+ consist of alphabets, digits, ":", "-", "_",
+ ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ type:
+ description: |-
+ type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed
+ Valid values are Reboot, Drain, Reload, Restart, DaemonReload and None.
+ reload/restart requires a corresponding service target specified in the reload/restart field.
+ Other values require no further configuration
+ enum:
+ - Reboot
+ - Drain
+ - Reload
+ - Restart
+ - DaemonReload
+ - None
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: reload is required when type is Reload, and forbidden
+ otherwise
+ rule: 'has(self.type) && self.type == ''Reload'' ? has(self.reload)
+ : !has(self.reload)'
+ - message: restart is required when type is Restart, and
+ forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Restart'' ? has(self.restart)
+ : !has(self.restart)'
+ maxItems: 10
+ type: array
+ x-kubernetes-list-type: atomic
+ x-kubernetes-validations:
+ - message: Reboot action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''Reboot'') ? size(self) ==
+ 1 : true'
+ - message: None action can only be specified standalone, as
+ it will override any other actions
+ rule: 'self.exists(x, x.type==''None'') ? size(self) ==
+ 1 : true'
+ required:
+ - actions
+ type: object
+ units:
+ description: |-
+ units is a list MachineConfig unit definitions and actions to take on changes to those services
+ This list supports a maximum of 50 entries.
+ items:
+ description: NodeDisruptionPolicySpecUnit is a systemd unit
+ name and corresponding actions to take and is used in the
+ NodeDisruptionPolicyConfig object
+ properties:
+ actions:
+ description: |-
+ actions represents the series of commands to be executed on changes to the file at
+ the corresponding file path. Actions will be applied in the order that
+ they are set in this list. If there are other incoming changes to other MachineConfig
+ entries in the same update that require a reboot, the reboot will supercede these actions.
+ Valid actions are Reboot, Drain, Reload, DaemonReload and None.
+ The Reboot action and the None action cannot be used in conjunction with any of the other actions.
+ This list supports a maximum of 10 entries.
+ items:
+ properties:
+ reload:
+ description: reload specifies the service to reload,
+ only valid if type is reload
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be reloaded
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME}
+ must be atleast 1 character long and can only
+ consist of alphabets, digits, ":", "-", "_",
+ ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ restart:
+ description: restart specifies the service to restart,
+ only valid if type is restart
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be restarted
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME}
+ must be atleast 1 character long and can only
+ consist of alphabets, digits, ":", "-", "_",
+ ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ type:
+ description: |-
+ type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed
+ Valid values are Reboot, Drain, Reload, Restart, DaemonReload and None.
+ reload/restart requires a corresponding service target specified in the reload/restart field.
+ Other values require no further configuration
+ enum:
+ - Reboot
+ - Drain
+ - Reload
+ - Restart
+ - DaemonReload
+ - None
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: reload is required when type is Reload, and
+ forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Reload'' ? has(self.reload)
+ : !has(self.reload)'
+ - message: restart is required when type is Restart, and
+ forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Restart'' ?
+ has(self.restart) : !has(self.restart)'
+ maxItems: 10
+ type: array
+ x-kubernetes-list-type: atomic
+ x-kubernetes-validations:
+ - message: Reboot action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''Reboot'') ? size(self)
+ == 1 : true'
+ - message: None action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''None'') ? size(self) ==
+ 1 : true'
+ name:
+ description: |-
+ name represents the service name of a systemd service managed through a MachineConfig
+ Actions specified will be applied for changes to the named service.
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where ${SERVICETYPE}
+ must be one of ".service", ".socket", ".device", ".mount",
+ ".automount", ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected format
+ is ${NAME}${SERVICETYPE}, where {NAME} must be atleast
+ 1 character long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - actions
+ - name
+ type: object
+ maxItems: 50
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ type: object
+ observedConfig:
+ description: |-
+ observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because
+ it is an input to the level for the operator
+ nullable: true
+ type: object
+ x-kubernetes-preserve-unknown-fields: true
+ operatorLogLevel:
+ default: Normal
+ description: |-
+ operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a
+ simple way to manage coarse grained logging choices that operators have to interpret for themselves.
+
+ Valid values are: "Normal", "Debug", "Trace", "TraceAll".
+ Defaults to "Normal".
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ succeededRevisionLimit:
+ description: |-
+ succeededRevisionLimit is the number of successful static pod installer revisions to keep on disk and in the api
+ -1 = unlimited, 0 or unset = 5 (default)
+ format: int32
+ type: integer
+ unsupportedConfigOverrides:
+ description: |-
+ unsupportedConfigOverrides overrides the final configuration that was computed by the operator.
+ Red Hat does not support the use of this field.
+ Misuse of this field could lead to unexpected behavior or conflict with other configuration options.
+ Seek guidance from the Red Hat support before using this field.
+ Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster.
+ nullable: true
+ type: object
+ x-kubernetes-preserve-unknown-fields: true
+ type: object
+ status:
+ description: status is the most recently observed status of the Machine
+ Config Operator
+ properties:
+ conditions:
+ description: conditions is a list of conditions and their status
+ items:
+ description: Condition contains details for one aspect of the current
+ state of this API Resource.
+ properties:
+ lastTransitionTime:
+ 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.
+ format: date-time
+ type: string
+ message:
+ description: |-
+ message is a human readable message indicating details about the transition.
+ This may be an empty string.
+ maxLength: 32768
+ type: string
+ observedGeneration:
+ description: |-
+ 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.
+ format: int64
+ minimum: 0
+ type: integer
+ reason:
+ description: |-
+ 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.
+ maxLength: 1024
+ minLength: 1
+ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
+ type: string
+ status:
+ description: status of the condition, one of True, False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ type:
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
+ maxLength: 316
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ required:
+ - lastTransitionTime
+ - message
+ - reason
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ managedBootImagesStatus:
+ description: |-
+ managedBootImagesStatus reflects what the latest cluster-validated boot image configuration is
+ and will be used by Machine Config Controller while performing boot image updates.
+ properties:
+ machineManagers:
+ description: |-
+ machineManagers can be used to register machine management resources for boot image updates. The Machine Config Operator
+ will watch for changes to this list. Only one entry is permitted per type of machine management resource.
+ items:
+ description: |-
+ MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information
+ such as the resource type and the API Group of the resource. It also provides granular control via the selection field.
+ properties:
+ apiGroup:
+ description: |-
+ apiGroup is name of the APIGroup that the machine management resource belongs to.
+ The only current valid value is machine.openshift.io.
+ machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group.
+ enum:
+ - machine.openshift.io
+ type: string
+ resource:
+ description: |-
+ resource is the machine management resource's type.
+ Valid values are machinesets and controlplanemachinesets.
+ machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
+ enum:
+ - machinesets
+ - controlplanemachinesets
+ type: string
+ selection:
+ description: selection allows granular control of the machine
+ management resources that will be registered for boot
+ image updates.
+ properties:
+ mode:
+ description: |-
+ mode determines how machine managers will be selected for updates.
+ Valid values are All, Partial and None.
+ All means that every resource matched by the machine manager will be updated.
+ Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
+ None means that every resource matched by the machine manager will not be updated.
+ enum:
+ - All
+ - Partial
+ - None
+ type: string
+ partial:
+ description: |-
+ partial provides label selector(s) that can be used to match machine management resources.
+ Only permitted when mode is set to "Partial".
+ properties:
+ machineResourceSelector:
+ description: machineResourceSelector is a label
+ selector that can be used to select machine resources
+ like MachineSets.
+ properties:
+ matchExpressions:
+ description: matchExpressions is a list of label
+ selector requirements. The requirements are
+ ANDed.
+ items:
+ description: |-
+ A label selector requirement is a selector that contains values, a key, and an operator that
+ relates the key and values.
+ properties:
+ key:
+ description: key is the label key that
+ the selector applies to.
+ type: string
+ operator:
+ description: |-
+ operator represents a key's relationship to a set of values.
+ Valid operators are In, NotIn, Exists and DoesNotExist.
+ type: string
+ values:
+ description: |-
+ values is an array of string values. If the operator is In or NotIn,
+ the values array must be non-empty. If the operator is Exists or DoesNotExist,
+ the values array must be empty. This array is replaced during a strategic
+ merge patch.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ required:
+ - key
+ - operator
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ matchLabels:
+ additionalProperties:
+ type: string
+ description: |-
+ matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
+ map is equivalent to an element of matchExpressions, whose key field is "key", the
+ operator is "In", and the values array contains only "value". The requirements are ANDed.
+ type: object
+ type: object
+ x-kubernetes-map-type: atomic
+ required:
+ - machineResourceSelector
+ type: object
+ required:
+ - mode
+ type: object
+ x-kubernetes-validations:
+ - message: Partial is required when type is partial, and
+ forbidden otherwise
+ rule: 'has(self.mode) && self.mode == ''Partial'' ? has(self.partial)
+ : !has(self.partial)'
+ required:
+ - apiGroup
+ - resource
+ - selection
+ type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
+ maxItems: 5
+ type: array
+ x-kubernetes-list-map-keys:
+ - resource
+ - apiGroup
+ x-kubernetes-list-type: map
+ type: object
+ nodeDisruptionPolicyStatus:
+ description: |-
+ nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are,
+ and will be used by the Machine Config Daemon during future node updates.
+ properties:
+ clusterPolicies:
+ description: clusterPolicies is a merge of cluster default and
+ user provided node disruption policies.
+ properties:
+ files:
+ description: files is a list of MachineConfig file definitions
+ and actions to take to changes on those paths
+ items:
+ description: NodeDisruptionPolicyStatusFile is a file entry
+ and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus
+ object
+ properties:
+ actions:
+ description: |-
+ actions represents the series of commands to be executed on changes to the file at
+ the corresponding file path. Actions will be applied in the order that
+ they are set in this list. If there are other incoming changes to other MachineConfig
+ entries in the same update that require a reboot, the reboot will supercede these actions.
+ Valid actions are Reboot, Drain, Reload, DaemonReload and None.
+ The Reboot action and the None action cannot be used in conjunction with any of the other actions.
+ This list supports a maximum of 10 entries.
+ items:
+ properties:
+ reload:
+ description: reload specifies the service to reload,
+ only valid if type is reload
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be reloaded
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service
+ name. Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where {NAME} must be atleast 1 character
+ long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ restart:
+ description: restart specifies the service to
+ restart, only valid if type is restart
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be restarted
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service
+ name. Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where {NAME} must be atleast 1 character
+ long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ type:
+ description: |-
+ type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed
+ Valid values are Reboot, Drain, Reload, Restart, DaemonReload, None and Special.
+ reload/restart requires a corresponding service target specified in the reload/restart field.
+ Other values require no further configuration
+ enum:
+ - Reboot
+ - Drain
+ - Reload
+ - Restart
+ - DaemonReload
+ - None
+ - Special
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: reload is required when type is Reload,
+ and forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Reload''
+ ? has(self.reload) : !has(self.reload)'
+ - message: restart is required when type is Restart,
+ and forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Restart''
+ ? has(self.restart) : !has(self.restart)'
+ maxItems: 10
+ type: array
+ x-kubernetes-list-type: atomic
+ x-kubernetes-validations:
+ - message: Reboot action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''Reboot'') ? size(self)
+ == 1 : true'
+ - message: None action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''None'') ? size(self)
+ == 1 : true'
+ path:
+ description: |-
+ path is the location of a file being managed through a MachineConfig.
+ The Actions in the policy will apply to changes to the file at this path.
+ type: string
+ required:
+ - actions
+ - path
+ type: object
+ maxItems: 100
+ type: array
+ x-kubernetes-list-map-keys:
+ - path
+ x-kubernetes-list-type: map
+ sshkey:
+ description: sshkey is the overall sshkey MachineConfig definition
+ properties:
+ actions:
+ description: |-
+ actions represents the series of commands to be executed on changes to the file at
+ the corresponding file path. Actions will be applied in the order that
+ they are set in this list. If there are other incoming changes to other MachineConfig
+ entries in the same update that require a reboot, the reboot will supercede these actions.
+ Valid actions are Reboot, Drain, Reload, DaemonReload and None.
+ The Reboot action and the None action cannot be used in conjunction with any of the other actions.
+ This list supports a maximum of 10 entries.
+ items:
+ properties:
+ reload:
+ description: reload specifies the service to reload,
+ only valid if type is reload
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be reloaded
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service
+ name. Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where {NAME} must be atleast 1 character
+ long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ restart:
+ description: restart specifies the service to restart,
+ only valid if type is restart
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be restarted
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service
+ name. Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where {NAME} must be atleast 1 character
+ long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ type:
+ description: |-
+ type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed
+ Valid values are Reboot, Drain, Reload, Restart, DaemonReload, None and Special.
+ reload/restart requires a corresponding service target specified in the reload/restart field.
+ Other values require no further configuration
+ enum:
+ - Reboot
+ - Drain
+ - Reload
+ - Restart
+ - DaemonReload
+ - None
+ - Special
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: reload is required when type is Reload, and
+ forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Reload'' ?
+ has(self.reload) : !has(self.reload)'
+ - message: restart is required when type is Restart,
+ and forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Restart''
+ ? has(self.restart) : !has(self.restart)'
+ maxItems: 10
+ type: array
+ x-kubernetes-list-type: atomic
+ x-kubernetes-validations:
+ - message: Reboot action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''Reboot'') ? size(self)
+ == 1 : true'
+ - message: None action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''None'') ? size(self)
+ == 1 : true'
+ required:
+ - actions
+ type: object
+ units:
+ description: units is a list MachineConfig unit definitions
+ and actions to take on changes to those services
+ items:
+ description: NodeDisruptionPolicyStatusUnit is a systemd
+ unit name and corresponding actions to take and is used
+ in the NodeDisruptionPolicyClusterStatus object
+ properties:
+ actions:
+ description: |-
+ actions represents the series of commands to be executed on changes to the file at
+ the corresponding file path. Actions will be applied in the order that
+ they are set in this list. If there are other incoming changes to other MachineConfig
+ entries in the same update that require a reboot, the reboot will supercede these actions.
+ Valid actions are Reboot, Drain, Reload, DaemonReload and None.
+ The Reboot action and the None action cannot be used in conjunction with any of the other actions.
+ This list supports a maximum of 10 entries.
+ items:
+ properties:
+ reload:
+ description: reload specifies the service to reload,
+ only valid if type is reload
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be reloaded
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service
+ name. Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where {NAME} must be atleast 1 character
+ long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ restart:
+ description: restart specifies the service to
+ restart, only valid if type is restart
+ properties:
+ serviceName:
+ description: |-
+ serviceName is the full name (e.g. crio.service) of the service to be restarted
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service
+ name. Expected format is ${NAME}${SERVICETYPE},
+ where ${SERVICETYPE} must be one of ".service",
+ ".socket", ".device", ".mount", ".automount",
+ ".swap", ".target", ".path", ".timer",".snapshot",
+ ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name.
+ Expected format is ${NAME}${SERVICETYPE},
+ where {NAME} must be atleast 1 character
+ long and can only consist of alphabets,
+ digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - serviceName
+ type: object
+ type:
+ description: |-
+ type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed
+ Valid values are Reboot, Drain, Reload, Restart, DaemonReload, None and Special.
+ reload/restart requires a corresponding service target specified in the reload/restart field.
+ Other values require no further configuration
+ enum:
+ - Reboot
+ - Drain
+ - Reload
+ - Restart
+ - DaemonReload
+ - None
+ - Special
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: reload is required when type is Reload,
+ and forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Reload''
+ ? has(self.reload) : !has(self.reload)'
+ - message: restart is required when type is Restart,
+ and forbidden otherwise
+ rule: 'has(self.type) && self.type == ''Restart''
+ ? has(self.restart) : !has(self.restart)'
+ maxItems: 10
+ type: array
+ x-kubernetes-list-type: atomic
+ x-kubernetes-validations:
+ - message: Reboot action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''Reboot'') ? size(self)
+ == 1 : true'
+ - message: None action can only be specified standalone,
+ as it will override any other actions
+ rule: 'self.exists(x, x.type==''None'') ? size(self)
+ == 1 : true'
+ name:
+ description: |-
+ name represents the service name of a systemd service managed through a MachineConfig
+ Actions specified will be applied for changes to the named service.
+ Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long.
+ ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\".
+ ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope".
+ maxLength: 255
+ type: string
+ x-kubernetes-validations:
+ - message: Invalid ${SERVICETYPE} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where ${SERVICETYPE}
+ must be one of ".service", ".socket", ".device",
+ ".mount", ".automount", ".swap", ".target", ".path",
+ ".timer",".snapshot", ".slice" or ".scope".
+ rule: self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')
+ - message: Invalid ${NAME} in service name. Expected
+ format is ${NAME}${SERVICETYPE}, where {NAME} must
+ be atleast 1 character long and can only consist
+ of alphabets, digits, ":", "-", "_", ".", and "\"
+ rule: self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')
+ required:
+ - actions
+ - name
+ type: object
+ maxItems: 100
+ type: array
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
+ type: object
+ type: object
+ observedGeneration:
+ description: observedGeneration is the last generation change you've
+ dealt with
+ format: int64
+ type: integer
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml b/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml
index a6827e8f86c..36594dde245 100644
--- a/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml
+++ b/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/ManagedBootImages.yaml
@@ -103,8 +103,9 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
type: string
@@ -116,9 +117,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -734,8 +736,9 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
type: string
@@ -747,9 +750,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go
index be0185eda9b..55e9dd8d7bb 100644
--- a/operator/v1/zz_generated.swagger_doc_generated.go
+++ b/operator/v1/zz_generated.swagger_doc_generated.go
@@ -1476,7 +1476,7 @@ func (MachineConfigurationStatus) SwaggerDoc() map[string]string {
var map_MachineManager = map[string]string{
"": "MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information such as the resource type and the API Group of the resource. It also provides granular control via the selection field.",
- "resource": "resource is the machine management resource's type. The only current valid value is machinesets. machinesets means that the machine manager will only register resources of the kind MachineSet.",
+ "resource": "resource is the machine management resource's type. Valid values are machinesets and controlplanemachinesets. machinesets means that the machine manager will only register resources of the kind MachineSet. controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.",
"apiGroup": "apiGroup is name of the APIGroup that the machine management resource belongs to. The only current valid value is machine.openshift.io. machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group.",
"selection": "selection allows granular control of the machine management resources that will be registered for boot image updates.",
}
@@ -1486,7 +1486,7 @@ func (MachineManager) SwaggerDoc() map[string]string {
}
var map_MachineManagerSelector = map[string]string{
- "mode": "mode determines how machine managers will be selected for updates. Valid values are All and Partial. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. None means that every resource matched by the machine manager will not be updated.",
+ "mode": "mode determines how machine managers will be selected for updates. Valid values are All, Partial and None. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster. None means that every resource matched by the machine manager will not be updated.",
"partial": "partial provides label selector(s) that can be used to match machine management resources. Only permitted when mode is set to \"Partial\".",
}
diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
index a4fe0264ea0..c165fca6bf5 100644
--- a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-CustomNoUpgrade.crd.yaml
@@ -228,10 +228,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -241,9 +243,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -320,6 +323,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
@@ -993,10 +1001,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -1006,9 +1016,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -1085,6 +1096,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
index 7c8d9869282..3de28dcdf34 100644
--- a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
+++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-Default.crd.yaml
@@ -103,8 +103,9 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
type: string
@@ -116,9 +117,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -734,8 +736,9 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
type: string
@@ -747,9 +750,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
index 5ef1733d145..544168f4154 100644
--- a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-DevPreviewNoUpgrade.crd.yaml
@@ -228,10 +228,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -241,9 +243,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -320,6 +323,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
@@ -993,10 +1001,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -1006,9 +1016,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -1085,6 +1096,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
diff --git a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
index 390853a26b8..14a864201c2 100644
--- a/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_80_machine-config_01_machineconfigurations-TechPreviewNoUpgrade.crd.yaml
@@ -136,10 +136,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -149,9 +151,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -228,6 +231,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
@@ -767,10 +775,12 @@ spec:
resource:
description: |-
resource is the machine management resource's type.
- The only current valid value is machinesets.
+ Valid values are machinesets and controlplanemachinesets.
machinesets means that the machine manager will only register resources of the kind MachineSet.
+ controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.
enum:
- machinesets
+ - controlplanemachinesets
type: string
selection:
description: selection allows granular control of the machine
@@ -780,9 +790,10 @@ spec:
mode:
description: |-
mode determines how machine managers will be selected for updates.
- Valid values are All and Partial.
+ Valid values are All, Partial and None.
All means that every resource matched by the machine manager will be updated.
Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated.
+ Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster.
None means that every resource matched by the machine manager will not be updated.
enum:
- All
@@ -859,6 +870,11 @@ spec:
- resource
- selection
type: object
+ x-kubernetes-validations:
+ - message: Only All or None selection mode is permitted for
+ ControlPlaneMachineSets
+ rule: self.resource != 'controlplanemachinesets' || self.selection.mode
+ == 'All' || self.selection.mode == 'None'
maxItems: 5
type: array
x-kubernetes-list-map-keys:
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
index 0b322549491..9155add431d 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
@@ -145,6 +145,9 @@
{
"name": "ManagedBootImagesAzure"
},
+ {
+ "name": "ManagedBootImagesCPMS"
+ },
{
"name": "ManagedBootImagesvSphere"
},
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
index 8245bfc8e3a..19517208df8 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
@@ -227,6 +227,9 @@
{
"name": "ManagedBootImagesAzure"
},
+ {
+ "name": "ManagedBootImagesCPMS"
+ },
{
"name": "ManagedBootImagesvSphere"
},
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
index fad56abd0aa..f212e7c44a4 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
@@ -230,6 +230,9 @@
{
"name": "ManagedBootImagesAzure"
},
+ {
+ "name": "ManagedBootImagesCPMS"
+ },
{
"name": "ManagedBootImagesvSphere"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
index db9eb4b4e8e..c036492bd5a 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
@@ -148,6 +148,9 @@
{
"name": "ManagedBootImagesAzure"
},
+ {
+ "name": "ManagedBootImagesCPMS"
+ },
{
"name": "ManagedBootImagesvSphere"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
index 004214a1272..fa7af5f4499 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
@@ -209,6 +209,9 @@
{
"name": "ManagedBootImagesAzure"
},
+ {
+ "name": "ManagedBootImagesCPMS"
+ },
{
"name": "ManagedBootImagesvSphere"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
index eca53a933f8..3d797e8051c 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
@@ -212,6 +212,9 @@
{
"name": "ManagedBootImagesAzure"
},
+ {
+ "name": "ManagedBootImagesCPMS"
+ },
{
"name": "ManagedBootImagesvSphere"
},