diff --git a/config/v1/feature_gates.go b/config/v1/feature_gates.go
index 79ab5c63157..d7f0b65939c 100644
--- a/config/v1/feature_gates.go
+++ b/config/v1/feature_gates.go
@@ -553,4 +553,11 @@ var (
productScope(ocpSpecific).
enableIn(TechPreviewNoUpgrade).
mustRegister()
+
+ FeatureGateNodeDisruptionPolicy = newFeatureGate("NodeDisruptionPolicy").
+ reportProblemsToJiraComponent("MachineConfigOperator").
+ contactPerson("jerzhang").
+ productScope(ocpSpecific).
+ enableIn(TechPreviewNoUpgrade).
+ mustRegister()
)
diff --git a/features.md b/features.md
index 006c93d3e17..3f99a8a6eff 100644
--- a/features.md
+++ b/features.md
@@ -24,6 +24,7 @@
| MetricsServer| | | | Enabled | Enabled | Enabled |
| MixedCPUsAllocation| | | | Enabled | Enabled | Enabled |
| NewOLM| | | | Enabled | Enabled | Enabled |
+| NodeDisruptionPolicy| | | | Enabled | Enabled | Enabled |
| NodeSwap| | | | Enabled | Enabled | Enabled |
| OnClusterBuild| | | | Enabled | Enabled | Enabled |
| PinnedImages| | | | Enabled | Enabled | Enabled |
diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go
index 33efff5c013..29baf4c29e9 100644
--- a/openapi/generated_openapi/zz_generated.openapi.go
+++ b/openapi/generated_openapi/zz_generated.openapi.go
@@ -975,6 +975,17 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/openshift/api/operator/v1.NetworkMigration": schema_openshift_api_operator_v1_NetworkMigration(ref),
"github.com/openshift/api/operator/v1.NetworkSpec": schema_openshift_api_operator_v1_NetworkSpec(ref),
"github.com/openshift/api/operator/v1.NetworkStatus": schema_openshift_api_operator_v1_NetworkStatus(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyClusterStatus": schema_openshift_api_operator_v1_NodeDisruptionPolicyClusterStatus(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyConfig": schema_openshift_api_operator_v1_NodeDisruptionPolicyConfig(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction": schema_openshift_api_operator_v1_NodeDisruptionPolicySpecAction(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecFile": schema_openshift_api_operator_v1_NodeDisruptionPolicySpecFile(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecSSHKey": schema_openshift_api_operator_v1_NodeDisruptionPolicySpecSSHKey(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecUnit": schema_openshift_api_operator_v1_NodeDisruptionPolicySpecUnit(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatus": schema_openshift_api_operator_v1_NodeDisruptionPolicyStatus(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction": schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusAction(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusFile": schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusFile(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusSSHKey": schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusSSHKey(ref),
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusUnit": schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusUnit(ref),
"github.com/openshift/api/operator/v1.NodePlacement": schema_openshift_api_operator_v1_NodePlacement(ref),
"github.com/openshift/api/operator/v1.NodePortStrategy": schema_openshift_api_operator_v1_NodePortStrategy(ref),
"github.com/openshift/api/operator/v1.NodeStatus": schema_openshift_api_operator_v1_NodeStatus(ref),
@@ -1002,7 +1013,9 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/openshift/api/operator/v1.ProviderLoadBalancerParameters": schema_openshift_api_operator_v1_ProviderLoadBalancerParameters(ref),
"github.com/openshift/api/operator/v1.ProxyConfig": schema_openshift_api_operator_v1_ProxyConfig(ref),
"github.com/openshift/api/operator/v1.QuickStarts": schema_openshift_api_operator_v1_QuickStarts(ref),
+ "github.com/openshift/api/operator/v1.ReloadService": schema_openshift_api_operator_v1_ReloadService(ref),
"github.com/openshift/api/operator/v1.ResourceAttributesAccessReview": schema_openshift_api_operator_v1_ResourceAttributesAccessReview(ref),
+ "github.com/openshift/api/operator/v1.RestartService": schema_openshift_api_operator_v1_RestartService(ref),
"github.com/openshift/api/operator/v1.RouteAdmissionPolicy": schema_openshift_api_operator_v1_RouteAdmissionPolicy(ref),
"github.com/openshift/api/operator/v1.SFlowConfig": schema_openshift_api_operator_v1_SFlowConfig(ref),
"github.com/openshift/api/operator/v1.Server": schema_openshift_api_operator_v1_Server(ref),
@@ -49210,12 +49223,19 @@ func schema_openshift_api_operator_v1_MachineConfigurationSpec(ref common.Refere
Ref: ref("github.com/openshift/api/operator/v1.ManagedBootImages"),
},
},
+ "nodeDisruptionPolicy": {
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyConfig"),
+ },
+ },
},
Required: []string{"managementState", "forceRedeploymentReason"},
},
},
Dependencies: []string{
- "github.com/openshift/api/operator/v1.ManagedBootImages", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
+ "github.com/openshift/api/operator/v1.ManagedBootImages", "github.com/openshift/api/operator/v1.NodeDisruptionPolicyConfig", "k8s.io/apimachinery/pkg/runtime.RawExtension"},
}
}
@@ -49324,12 +49344,19 @@ func schema_openshift_api_operator_v1_MachineConfigurationStatus(ref common.Refe
},
},
},
+ "nodeDisruptionPolicyStatus": {
+ SchemaProps: spec.SchemaProps{
+ Description: "nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are, and will be used by the Machine Config Daemon during future node updates.",
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatus"),
+ },
+ },
},
Required: []string{"readyReplicas"},
},
},
Dependencies: []string{
- "github.com/openshift/api/operator/v1.GenerationStatus", "github.com/openshift/api/operator/v1.NodeStatus", "github.com/openshift/api/operator/v1.OperatorCondition"},
+ "github.com/openshift/api/operator/v1.GenerationStatus", "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatus", "github.com/openshift/api/operator/v1.NodeStatus", "github.com/openshift/api/operator/v1.OperatorCondition"},
}
}
@@ -50023,6 +50050,497 @@ func schema_openshift_api_operator_v1_NetworkStatus(ref common.ReferenceCallback
}
}
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyClusterStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a merge of cluster defaults and user provided policies",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "files": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "path",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "files is a list of MachineConfig file definitions and actions to take to changes on those paths",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusFile"),
+ },
+ },
+ },
+ },
+ },
+ "units": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "name",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "units is a list MachineConfig unit definitions and actions to take on changes to those services",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusUnit"),
+ },
+ },
+ },
+ },
+ },
+ "sshkey": {
+ SchemaProps: spec.SchemaProps{
+ Description: "sshkey is the overall sshkey MachineConfig definition",
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusSSHKey"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusFile", "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusSSHKey", "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusUnit"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyConfig(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "files": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "path",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecFile"),
+ },
+ },
+ },
+ },
+ },
+ "units": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-map-keys": []interface{}{
+ "name",
+ },
+ "x-kubernetes-list-type": "map",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecUnit"),
+ },
+ },
+ },
+ },
+ },
+ "sshkey": {
+ SchemaProps: spec.SchemaProps{
+ 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",
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecSSHKey"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecFile", "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecSSHKey", "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecUnit"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicySpecAction(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "type": {
+ SchemaProps: spec.SchemaProps{
+ Description: "type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed Valid value 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",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "reload": {
+ SchemaProps: spec.SchemaProps{
+ Description: "reload specifies the service to reload, only valid if type is reload",
+ Ref: ref("github.com/openshift/api/operator/v1.ReloadService"),
+ },
+ },
+ "restart": {
+ SchemaProps: spec.SchemaProps{
+ Description: "restart specifies the service to restart, only valid if type is restart",
+ Ref: ref("github.com/openshift/api/operator/v1.RestartService"),
+ },
+ },
+ },
+ Required: []string{"type"},
+ },
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-unions": []interface{}{
+ map[string]interface{}{
+ "discriminator": "type",
+ "fields-to-discriminateBy": map[string]interface{}{
+ "reload": "Reload",
+ "restart": "Restart",
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.ReloadService", "github.com/openshift/api/operator/v1.RestartService"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicySpecFile(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "path": {
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "actions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"path", "actions"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicySpecSSHKey(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "actions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"actions"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicySpecUnit(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ 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\".",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "actions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"name", "actions"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicySpecAction"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "clusterPolicies": {
+ SchemaProps: spec.SchemaProps{
+ Description: "clusterPolicies is a merge of cluster default and user provided node disruption policies.",
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyClusterStatus"),
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyClusterStatus"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusAction(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "type": {
+ SchemaProps: spec.SchemaProps{
+ Description: "type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed Valid value 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",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "reload": {
+ SchemaProps: spec.SchemaProps{
+ Description: "reload specifies the service to reload, only valid if type is reload",
+ Ref: ref("github.com/openshift/api/operator/v1.ReloadService"),
+ },
+ },
+ "restart": {
+ SchemaProps: spec.SchemaProps{
+ Description: "restart specifies the service to restart, only valid if type is restart",
+ Ref: ref("github.com/openshift/api/operator/v1.RestartService"),
+ },
+ },
+ },
+ Required: []string{"type"},
+ },
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-unions": []interface{}{
+ map[string]interface{}{
+ "discriminator": "type",
+ "fields-to-discriminateBy": map[string]interface{}{
+ "reload": "Reload",
+ "restart": "Restart",
+ },
+ },
+ },
+ },
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.ReloadService", "github.com/openshift/api/operator/v1.RestartService"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusFile(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "path": {
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "actions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"path", "actions"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusSSHKey(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "actions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"actions"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction"},
+ }
+}
+
+func schema_openshift_api_operator_v1_NodeDisruptionPolicyStatusUnit(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "name": {
+ SchemaProps: spec.SchemaProps{
+ 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\".",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "actions": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ 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.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: map[string]interface{}{},
+ Ref: ref("github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction"),
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"name", "actions"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/operator/v1.NodeDisruptionPolicyStatusAction"},
+ }
+}
+
func schema_openshift_api_operator_v1_NodePlacement(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -51335,6 +51853,28 @@ func schema_openshift_api_operator_v1_QuickStarts(ref common.ReferenceCallback)
}
}
+func schema_openshift_api_operator_v1_ReloadService(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "ReloadService allows the user to specify the services to be reloaded",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "serviceName": {
+ SchemaProps: spec.SchemaProps{
+ 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\".",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"serviceName"},
+ },
+ },
+ }
+}
+
func schema_openshift_api_operator_v1_ResourceAttributesAccessReview(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -51378,6 +51918,28 @@ func schema_openshift_api_operator_v1_ResourceAttributesAccessReview(ref common.
}
}
+func schema_openshift_api_operator_v1_RestartService(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "RestartService allows the user to specify the services to be restarted",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "serviceName": {
+ SchemaProps: spec.SchemaProps{
+ 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\".",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ Required: []string{"serviceName"},
+ },
+ },
+ }
+}
+
func schema_openshift_api_operator_v1_RouteAdmissionPolicy(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
diff --git a/openapi/openapi.json b/openapi/openapi.json
index 9d885c38910..c84af06cc88 100644
--- a/openapi/openapi.json
+++ b/openapi/openapi.json
@@ -28734,6 +28734,11 @@
"type": "string",
"default": ""
},
+ "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.",
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyConfig"
+ },
"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",
"default": {},
@@ -28791,6 +28796,11 @@
"description": "latestAvailableRevisionReason describe the detailed reason for the most recent deployment",
"type": "string"
},
+ "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.",
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatus"
+ },
"nodeStatuses": {
"description": "nodeStatuses track the deployment values and errors across individual nodes",
"type": "array",
@@ -29226,6 +29236,278 @@
}
}
},
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyClusterStatus": {
+ "description": "NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a merge of cluster defaults and user provided policies",
+ "type": "object",
+ "properties": {
+ "files": {
+ "description": "files is a list of MachineConfig file definitions and actions to take to changes on those paths",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusFile"
+ },
+ "x-kubernetes-list-map-keys": [
+ "path"
+ ],
+ "x-kubernetes-list-type": "map"
+ },
+ "sshkey": {
+ "description": "sshkey is the overall sshkey MachineConfig definition",
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusSSHKey"
+ },
+ "units": {
+ "description": "units is a list MachineConfig unit definitions and actions to take on changes to those services",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusUnit"
+ },
+ "x-kubernetes-list-map-keys": [
+ "name"
+ ],
+ "x-kubernetes-list-type": "map"
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyConfig": {
+ "description": "NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys",
+ "type": "object",
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecFile"
+ },
+ "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",
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecSSHKey"
+ },
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecUnit"
+ },
+ "x-kubernetes-list-map-keys": [
+ "name"
+ ],
+ "x-kubernetes-list-type": "map"
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction": {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "reload": {
+ "description": "reload specifies the service to reload, only valid if type is reload",
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.ReloadService"
+ },
+ "restart": {
+ "description": "restart specifies the service to restart, only valid if type is restart",
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.RestartService"
+ },
+ "type": {
+ "description": "type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed Valid value 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",
+ "type": "string",
+ "default": ""
+ }
+ },
+ "x-kubernetes-unions": [
+ {
+ "discriminator": "type",
+ "fields-to-discriminateBy": {
+ "reload": "Reload",
+ "restart": "Restart"
+ }
+ }
+ ]
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecFile": {
+ "description": "NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object",
+ "type": "object",
+ "required": [
+ "path",
+ "actions"
+ ],
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "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",
+ "default": ""
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecSSHKey": {
+ "description": "NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object",
+ "type": "object",
+ "required": [
+ "actions"
+ ],
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecUnit": {
+ "description": "NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object",
+ "type": "object",
+ "required": [
+ "name",
+ "actions"
+ ],
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "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\".",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatus": {
+ "type": "object",
+ "properties": {
+ "clusterPolicies": {
+ "description": "clusterPolicies is a merge of cluster default and user provided node disruption policies.",
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyClusterStatus"
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction": {
+ "type": "object",
+ "required": [
+ "type"
+ ],
+ "properties": {
+ "reload": {
+ "description": "reload specifies the service to reload, only valid if type is reload",
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.ReloadService"
+ },
+ "restart": {
+ "description": "restart specifies the service to restart, only valid if type is restart",
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.RestartService"
+ },
+ "type": {
+ "description": "type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed Valid value 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",
+ "type": "string",
+ "default": ""
+ }
+ },
+ "x-kubernetes-unions": [
+ {
+ "discriminator": "type",
+ "fields-to-discriminateBy": {
+ "reload": "Reload",
+ "restart": "Restart"
+ }
+ }
+ ]
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusFile": {
+ "description": "NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object",
+ "type": "object",
+ "required": [
+ "path",
+ "actions"
+ ],
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "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",
+ "default": ""
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusSSHKey": {
+ "description": "NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object",
+ "type": "object",
+ "required": [
+ "actions"
+ ],
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction"
+ },
+ "x-kubernetes-list-type": "atomic"
+ }
+ }
+ },
+ "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusUnit": {
+ "description": "NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object",
+ "type": "object",
+ "required": [
+ "name",
+ "actions"
+ ],
+ "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.",
+ "type": "array",
+ "items": {
+ "default": {},
+ "$ref": "#/definitions/com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction"
+ },
+ "x-kubernetes-list-type": "atomic"
+ },
+ "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\".",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
"com.github.openshift.api.operator.v1.NodePlacement": {
"description": "NodePlacement describes node scheduling configuration for an ingress controller.",
"type": "object",
@@ -30004,6 +30286,20 @@
}
}
},
+ "com.github.openshift.api.operator.v1.ReloadService": {
+ "description": "ReloadService allows the user to specify the services to be reloaded",
+ "type": "object",
+ "required": [
+ "serviceName"
+ ],
+ "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\".",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
"com.github.openshift.api.operator.v1.ResourceAttributesAccessReview": {
"description": "ResourceAttributesAccessReview defines the visibility of the perspective depending on the access review checks. `required` and `missing` can work together esp. in the case where the cluster admin wants to show another perspective to users without specific permissions. Out of `required` and `missing` atleast one property should be non-empty.",
"type": "object",
@@ -30026,6 +30322,20 @@
}
}
},
+ "com.github.openshift.api.operator.v1.RestartService": {
+ "description": "RestartService allows the user to specify the services to be restarted",
+ "type": "object",
+ "required": [
+ "serviceName"
+ ],
+ "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\".",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
"com.github.openshift.api.operator.v1.RouteAdmissionPolicy": {
"description": "RouteAdmissionPolicy is an admission policy for allowing new route claims.",
"type": "object",
diff --git a/operator/v1/techpreview.machineconfiguration.testsuite.yaml b/operator/v1/techpreview.machineconfiguration.testsuite.yaml
index 99ef43c90fa..38dcbcf3485 100644
--- a/operator/v1/techpreview.machineconfiguration.testsuite.yaml
+++ b/operator/v1/techpreview.machineconfiguration.testsuite.yaml
@@ -115,3 +115,212 @@ tests:
selection:
mode: All
expectedError: "spec.managedBootImages.machineManagers[1]: Duplicate value: map[string]interface {}{\"apiGroup\":\"machine.openshift.io\", \"resource\":\"machinesets\"}"
+ - name: Should be able to create a valid node disruption policy
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: my.service
+ units:
+ - name: "my.service"
+ actions:
+ - type: Restart
+ restart:
+ serviceName: my-other.service
+ sshkey:
+ actions:
+ - type: None
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: my.service
+ units:
+ - name: "my.service"
+ actions:
+ - type: Restart
+ restart:
+ serviceName: my-other.service
+ sshkey:
+ actions:
+ - type: None
+ - name: Should be able to define a node disruption policy with multiple entries of the same type
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: my.service
+ - path: "/etc/my-other-file"
+ actions:
+ - type: Drain
+ - type: Restart
+ restart:
+ serviceName: my.service
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: my.service
+ - path: "/etc/my-other-file"
+ actions:
+ - type: Drain
+ - type: Restart
+ restart:
+ serviceName: my.service
+ - name: Node disruption policies with duplicate file entries should fail
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: my.service
+ - path: "/etc/my-file"
+ actions:
+ - type: Drain
+ - type: Reload
+ reload:
+ serviceName: my.service
+ expectedError: "spec.nodeDisruptionPolicy.files[1]: Duplicate value: map[string]interface {}{\"path\":\"/etc/my-file\"}"
+ - name: Node disruption policies that specify a reload action should fail if you don't specify the reload field
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ expectedError: "reload is required when type is Reload, and forbidden otherwise"
+ - name: Node disruption policies that specify a reboot action should not allow other actions in the list
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: Reboot
+ - type: DaemonReload
+ expectedError: "Reboot action can only be specified standalone, as it will override any other actions"
+ - name: Node disruption policies should use service name(s) which have a valid name prefix.
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: .service
+ expectedError: "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 \"\\\""
+ - name: Node disruption policies should use service name(s) which have a valid name suffix.
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: service
+ expectedError: "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\"."
+ - name: Node disruption policies should use service name(s) which have a valid name suffix.
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: serv.ice
+ expectedError: "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\"."
+ - name: Should be able to define a node disruption policy that has a service name which has multiple permitted special characters
+ initial: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: a:b_c-d\.e.swap
+ - path: "/etc/my-other-file"
+ actions:
+ - type: Drain
+ - type: Restart
+ restart:
+ serviceName: a.b.c.d.e.snapshot
+ expected: |
+ apiVersion: operator.openshift.io/v1
+ kind: MachineConfiguration
+ spec:
+ logLevel: Normal
+ operatorLogLevel: Normal
+ nodeDisruptionPolicy:
+ files:
+ - path: "/etc/my-file"
+ actions:
+ - type: DaemonReload
+ - type: Reload
+ reload:
+ serviceName: a:b_c-d\.e.swap
+ - path: "/etc/my-other-file"
+ actions:
+ - type: Drain
+ - type: Restart
+ restart:
+ serviceName: a.b.c.d.e.snapshot
diff --git a/operator/v1/types_machineconfiguration.go b/operator/v1/types_machineconfiguration.go
index 2487fc1beb2..5afc154dcd9 100644
--- a/operator/v1/types_machineconfiguration.go
+++ b/operator/v1/types_machineconfiguration.go
@@ -46,12 +46,25 @@ type MachineConfigurationSpec struct {
// +openshift:enable:FeatureGate=ManagedBootImages
// +optional
ManagedBootImages ManagedBootImages `json:"managedBootImages"`
+
+ // 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.
+ // +openshift:enable:FeatureGate=NodeDisruptionPolicy
+ // +optional
+ NodeDisruptionPolicy NodeDisruptionPolicyConfig `json:"nodeDisruptionPolicy"`
}
type MachineConfigurationStatus struct {
+ // TODO tombstone this field
StaticPodOperatorStatus `json:",inline"`
- // TODO(jkyros): This is where we can put additional bespoke status fields
+ // nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are,
+ // and will be used by the Machine Config Daemon during future node updates.
+ // +openshift:enable:FeatureGate=NodeDisruptionPolicy
+ // +optional
+ NodeDisruptionPolicyStatus NodeDisruptionPolicyStatus `json:"nodeDisruptionPolicyStatus"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@@ -158,3 +171,295 @@ const (
// This feature only supports MAPI machinesets at this time.
MachineAPI MachineManagerMachineSetsAPIGroupType = "machine.openshift.io"
)
+
+type NodeDisruptionPolicyStatus struct {
+ // clusterPolicies is a merge of cluster default and user provided node disruption policies.
+ // +optional
+ ClusterPolicies NodeDisruptionPolicyClusterStatus `json:"clusterPolicies"`
+}
+
+// NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys
+type NodeDisruptionPolicyConfig struct {
+ // 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.
+ // +optional
+ // +listType=map
+ // +listMapKey=path
+ // +kubebuilder:validation:MaxItems=50
+ Files []NodeDisruptionPolicySpecFile `json:"files"`
+ // units is a list MachineConfig unit definitions and actions to take on changes to those services
+ // This list supports a maximum of 50 entries.
+ // +optional
+ // +listType=map
+ // +listMapKey=name
+ // +kubebuilder:validation:MaxItems=50
+ Units []NodeDisruptionPolicySpecUnit `json:"units"`
+ // 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
+ // +optional
+ SSHKey NodeDisruptionPolicySpecSSHKey `json:"sshkey"`
+}
+
+// NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a
+// merge of cluster defaults and user provided policies
+type NodeDisruptionPolicyClusterStatus struct {
+ // files is a list of MachineConfig file definitions and actions to take to changes on those paths
+ // +optional
+ // +listType=map
+ // +listMapKey=path
+ // +kubebuilder:validation:MaxItems=100
+ Files []NodeDisruptionPolicyStatusFile `json:"files,omitempty"`
+ // units is a list MachineConfig unit definitions and actions to take on changes to those services
+ // +optional
+ // +listType=map
+ // +listMapKey=name
+ // +kubebuilder:validation:MaxItems=100
+ Units []NodeDisruptionPolicyStatusUnit `json:"units,omitempty"`
+ // sshkey is the overall sshkey MachineConfig definition
+ // +optional
+ SSHKey NodeDisruptionPolicyStatusSSHKey `json:"sshkey,omitempty"`
+}
+
+// NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object
+type NodeDisruptionPolicySpecFile struct {
+ // 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.
+ // +kubebuilder:validation:Required
+ Path string `json:"path"`
+ // 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.
+ // +kubebuilder:validation:Required
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions"
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions"
+ Actions []NodeDisruptionPolicySpecAction `json:"actions"`
+}
+
+// NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object
+type NodeDisruptionPolicyStatusFile struct {
+ // 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.
+ // +kubebuilder:validation:Required
+ Path string `json:"path"`
+ // 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.
+ // +kubebuilder:validation:Required
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions"
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions"
+ Actions []NodeDisruptionPolicyStatusAction `json:"actions"`
+}
+
+// NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object
+type NodeDisruptionPolicySpecUnit struct {
+ // 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".
+ // +kubebuilder:validation:Required
+ Name NodeDisruptionPolicyServiceName `json:"name"`
+
+ // 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.
+ // +kubebuilder:validation:Required
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions"
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions"
+ Actions []NodeDisruptionPolicySpecAction `json:"actions"`
+}
+
+// NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object
+type NodeDisruptionPolicyStatusUnit struct {
+ // 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".
+ // +kubebuilder:validation:Required
+ Name NodeDisruptionPolicyServiceName `json:"name"`
+
+ // 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.
+ // +kubebuilder:validation:Required
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions"
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions"
+ Actions []NodeDisruptionPolicyStatusAction `json:"actions"`
+}
+
+// NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object
+type NodeDisruptionPolicySpecSSHKey struct {
+ // 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.
+ // +kubebuilder:validation:Required
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions"
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions"
+ Actions []NodeDisruptionPolicySpecAction `json:"actions"`
+}
+
+// NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object
+type NodeDisruptionPolicyStatusSSHKey struct {
+ // 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.
+ // +kubebuilder:validation:Required
+ // +listType=atomic
+ // +kubebuilder:validation:MaxItems=10
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions"
+ // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions"
+ Actions []NodeDisruptionPolicyStatusAction `json:"actions"`
+}
+
+// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Reload' ? has(self.reload) : !has(self.reload)",message="reload is required when type is Reload, and forbidden otherwise"
+// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Restart' ? has(self.restart) : !has(self.restart)",message="restart is required when type is Restart, and forbidden otherwise"
+// +union
+type NodeDisruptionPolicySpecAction struct {
+ // type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed
+ // Valid value 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
+ // +unionDiscriminator
+ // +kubebuilder:validation:Required
+ Type NodeDisruptionPolicySpecActionType `json:"type"`
+ // reload specifies the service to reload, only valid if type is reload
+ // +optional
+ Reload *ReloadService `json:"reload,omitempty"`
+ // restart specifies the service to restart, only valid if type is restart
+ // +optional
+ Restart *RestartService `json:"restart,omitempty"`
+}
+
+// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Reload' ? has(self.reload) : !has(self.reload)",message="reload is required when type is Reload, and forbidden otherwise"
+// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Restart' ? has(self.restart) : !has(self.restart)",message="restart is required when type is Restart, and forbidden otherwise"
+// +union
+type NodeDisruptionPolicyStatusAction struct {
+ // type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed
+ // Valid value 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
+ // +unionDiscriminator
+ // +kubebuilder:validation:Required
+ Type NodeDisruptionPolicyStatusActionType `json:"type"`
+ // reload specifies the service to reload, only valid if type is reload
+ // +optional
+ Reload *ReloadService `json:"reload,omitempty"`
+ // restart specifies the service to restart, only valid if type is restart
+ // +optional
+ Restart *RestartService `json:"restart,omitempty"`
+}
+
+// ReloadService allows the user to specify the services to be reloaded
+type ReloadService struct {
+ // 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".
+ // +kubebuilder:validation:Required
+ ServiceName NodeDisruptionPolicyServiceName `json:"serviceName"`
+}
+
+// RestartService allows the user to specify the services to be restarted
+type RestartService struct {
+ // 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".
+ // +kubebuilder:validation:Required
+ ServiceName NodeDisruptionPolicyServiceName `json:"serviceName"`
+}
+
+// NodeDisruptionPolicySpecActionType is a string enum used in a NodeDisruptionPolicySpecAction object. They describe an action to be performed.
+// +kubebuilder:validation:Enum:="Reboot";"Drain";"Reload";"Restart";"DaemonReload";"None"
+type NodeDisruptionPolicySpecActionType string
+
+// +kubebuilder:validation:XValidation:rule=`self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')`, 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\"."
+// +kubebuilder:validation:XValidation:rule=`self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')`, 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 \"\\\""
+// +kubebuilder:validation:MaxLength=255
+type NodeDisruptionPolicyServiceName string
+
+const (
+ // Reboot represents an action that will cause nodes to be rebooted. This is the default action by the MCO
+ // if a reboot policy is not found for a change/update being performed by the MCO.
+ RebootSpecAction NodeDisruptionPolicySpecActionType = "Reboot"
+
+ // Drain represents an action that will cause nodes to be drained of their workloads.
+ DrainSpecAction NodeDisruptionPolicySpecActionType = "Drain"
+
+ // Reload represents an action that will cause nodes to reload the service described by the Target field.
+ ReloadSpecAction NodeDisruptionPolicySpecActionType = "Reload"
+
+ // Restart represents an action that will cause nodes to restart the service described by the Target field.
+ RestartSpecAction NodeDisruptionPolicySpecActionType = "Restart"
+
+ // DaemonReload represents an action that TBD
+ DaemonReloadSpecAction NodeDisruptionPolicySpecActionType = "DaemonReload"
+
+ // None represents an action that no handling is required by the MCO.
+ NoneSpecAction NodeDisruptionPolicySpecActionType = "None"
+)
+
+// NodeDisruptionPolicyStatusActionType is a string enum used in a NodeDisruptionPolicyStatusAction object. They describe an action to be performed.
+// The key difference of this object from NodeDisruptionPolicySpecActionType is that there is a additional SpecialStatusAction value in this enum. This will only be
+// used by the MCO's controller to indicate some internal actions. They are not part of the NodeDisruptionPolicyConfig object and cannot be set by the user.
+// +kubebuilder:validation:Enum:="Reboot";"Drain";"Reload";"Restart";"DaemonReload";"None";"Special"
+type NodeDisruptionPolicyStatusActionType string
+
+const (
+ // Reboot represents an action that will cause nodes to be rebooted. This is the default action by the MCO
+ // if a reboot policy is not found for a change/update being performed by the MCO.
+ RebootStatusAction NodeDisruptionPolicyStatusActionType = "Reboot"
+
+ // Drain represents an action that will cause nodes to be drained of their workloads.
+ DrainStatusAction NodeDisruptionPolicyStatusActionType = "Drain"
+
+ // Reload represents an action that will cause nodes to reload the service described by the Target field.
+ ReloadStatusAction NodeDisruptionPolicyStatusActionType = "Reload"
+
+ // Restart represents an action that will cause nodes to restart the service described by the Target field.
+ RestartStatusAction NodeDisruptionPolicyStatusActionType = "Restart"
+
+ // DaemonReload represents an action that TBD
+ DaemonReloadStatusAction NodeDisruptionPolicyStatusActionType = "DaemonReload"
+
+ // None represents an action that no handling is required by the MCO.
+ NoneStatusAction NodeDisruptionPolicyStatusActionType = "None"
+
+ // Special represents an action that is internal to the MCO, and is not allowed in user defined NodeDisruption policies.
+ SpecialStatusAction NodeDisruptionPolicyStatusActionType = "Special"
+)
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 c493e302c8d..3a2d46d3036 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
@@ -208,6 +208,452 @@ spec:
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 value 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
+ 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 value 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
+ 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 value 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
+ 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
@@ -316,6 +762,459 @@ spec:
description: latestAvailableRevisionReason describe the detailed reason
for the most recent deployment
type: string
+ 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 value 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 value 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 value 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
nodeStatuses:
description: nodeStatuses track the deployment values and errors across
individual nodes
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 af978be9510..c030d3c82bb 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
@@ -208,6 +208,452 @@ spec:
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 value 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
+ 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 value 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
+ 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 value 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
+ 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
@@ -316,6 +762,459 @@ spec:
description: latestAvailableRevisionReason describe the detailed reason
for the most recent deployment
type: string
+ 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 value 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 value 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 value 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
nodeStatuses:
description: nodeStatuses track the deployment values and errors across
individual nodes
diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go
index aa05f328d62..c98770feecf 100644
--- a/operator/v1/zz_generated.deepcopy.go
+++ b/operator/v1/zz_generated.deepcopy.go
@@ -2936,6 +2936,7 @@ func (in *MachineConfigurationSpec) DeepCopyInto(out *MachineConfigurationSpec)
*out = *in
in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec)
in.ManagedBootImages.DeepCopyInto(&out.ManagedBootImages)
+ in.NodeDisruptionPolicy.DeepCopyInto(&out.NodeDisruptionPolicy)
return
}
@@ -2953,6 +2954,7 @@ func (in *MachineConfigurationSpec) DeepCopy() *MachineConfigurationSpec {
func (in *MachineConfigurationStatus) DeepCopyInto(out *MachineConfigurationStatus) {
*out = *in
in.StaticPodOperatorStatus.DeepCopyInto(&out.StaticPodOperatorStatus)
+ in.NodeDisruptionPolicyStatus.DeepCopyInto(&out.NodeDisruptionPolicyStatus)
return
}
@@ -3271,6 +3273,275 @@ func (in *NetworkStatus) DeepCopy() *NetworkStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyClusterStatus) DeepCopyInto(out *NodeDisruptionPolicyClusterStatus) {
+ *out = *in
+ if in.Files != nil {
+ in, out := &in.Files, &out.Files
+ *out = make([]NodeDisruptionPolicyStatusFile, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Units != nil {
+ in, out := &in.Units, &out.Units
+ *out = make([]NodeDisruptionPolicyStatusUnit, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.SSHKey.DeepCopyInto(&out.SSHKey)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyClusterStatus.
+func (in *NodeDisruptionPolicyClusterStatus) DeepCopy() *NodeDisruptionPolicyClusterStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyClusterStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyConfig) DeepCopyInto(out *NodeDisruptionPolicyConfig) {
+ *out = *in
+ if in.Files != nil {
+ in, out := &in.Files, &out.Files
+ *out = make([]NodeDisruptionPolicySpecFile, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ if in.Units != nil {
+ in, out := &in.Units, &out.Units
+ *out = make([]NodeDisruptionPolicySpecUnit, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ in.SSHKey.DeepCopyInto(&out.SSHKey)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyConfig.
+func (in *NodeDisruptionPolicyConfig) DeepCopy() *NodeDisruptionPolicyConfig {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyConfig)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicySpecAction) DeepCopyInto(out *NodeDisruptionPolicySpecAction) {
+ *out = *in
+ if in.Reload != nil {
+ in, out := &in.Reload, &out.Reload
+ *out = new(ReloadService)
+ **out = **in
+ }
+ if in.Restart != nil {
+ in, out := &in.Restart, &out.Restart
+ *out = new(RestartService)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecAction.
+func (in *NodeDisruptionPolicySpecAction) DeepCopy() *NodeDisruptionPolicySpecAction {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicySpecAction)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicySpecFile) DeepCopyInto(out *NodeDisruptionPolicySpecFile) {
+ *out = *in
+ if in.Actions != nil {
+ in, out := &in.Actions, &out.Actions
+ *out = make([]NodeDisruptionPolicySpecAction, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecFile.
+func (in *NodeDisruptionPolicySpecFile) DeepCopy() *NodeDisruptionPolicySpecFile {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicySpecFile)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicySpecSSHKey) DeepCopyInto(out *NodeDisruptionPolicySpecSSHKey) {
+ *out = *in
+ if in.Actions != nil {
+ in, out := &in.Actions, &out.Actions
+ *out = make([]NodeDisruptionPolicySpecAction, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecSSHKey.
+func (in *NodeDisruptionPolicySpecSSHKey) DeepCopy() *NodeDisruptionPolicySpecSSHKey {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicySpecSSHKey)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicySpecUnit) DeepCopyInto(out *NodeDisruptionPolicySpecUnit) {
+ *out = *in
+ if in.Actions != nil {
+ in, out := &in.Actions, &out.Actions
+ *out = make([]NodeDisruptionPolicySpecAction, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecUnit.
+func (in *NodeDisruptionPolicySpecUnit) DeepCopy() *NodeDisruptionPolicySpecUnit {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicySpecUnit)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyStatus) DeepCopyInto(out *NodeDisruptionPolicyStatus) {
+ *out = *in
+ in.ClusterPolicies.DeepCopyInto(&out.ClusterPolicies)
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatus.
+func (in *NodeDisruptionPolicyStatus) DeepCopy() *NodeDisruptionPolicyStatus {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyStatus)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyStatusAction) DeepCopyInto(out *NodeDisruptionPolicyStatusAction) {
+ *out = *in
+ if in.Reload != nil {
+ in, out := &in.Reload, &out.Reload
+ *out = new(ReloadService)
+ **out = **in
+ }
+ if in.Restart != nil {
+ in, out := &in.Restart, &out.Restart
+ *out = new(RestartService)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusAction.
+func (in *NodeDisruptionPolicyStatusAction) DeepCopy() *NodeDisruptionPolicyStatusAction {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyStatusAction)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyStatusFile) DeepCopyInto(out *NodeDisruptionPolicyStatusFile) {
+ *out = *in
+ if in.Actions != nil {
+ in, out := &in.Actions, &out.Actions
+ *out = make([]NodeDisruptionPolicyStatusAction, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusFile.
+func (in *NodeDisruptionPolicyStatusFile) DeepCopy() *NodeDisruptionPolicyStatusFile {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyStatusFile)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyStatusSSHKey) DeepCopyInto(out *NodeDisruptionPolicyStatusSSHKey) {
+ *out = *in
+ if in.Actions != nil {
+ in, out := &in.Actions, &out.Actions
+ *out = make([]NodeDisruptionPolicyStatusAction, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusSSHKey.
+func (in *NodeDisruptionPolicyStatusSSHKey) DeepCopy() *NodeDisruptionPolicyStatusSSHKey {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyStatusSSHKey)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *NodeDisruptionPolicyStatusUnit) DeepCopyInto(out *NodeDisruptionPolicyStatusUnit) {
+ *out = *in
+ if in.Actions != nil {
+ in, out := &in.Actions, &out.Actions
+ *out = make([]NodeDisruptionPolicyStatusAction, len(*in))
+ for i := range *in {
+ (*in)[i].DeepCopyInto(&(*out)[i])
+ }
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusUnit.
+func (in *NodeDisruptionPolicyStatusUnit) DeepCopy() *NodeDisruptionPolicyStatusUnit {
+ if in == nil {
+ return nil
+ }
+ out := new(NodeDisruptionPolicyStatusUnit)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NodePlacement) DeepCopyInto(out *NodePlacement) {
*out = *in
@@ -3947,6 +4218,22 @@ func (in *QuickStarts) DeepCopy() *QuickStarts {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *ReloadService) DeepCopyInto(out *ReloadService) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReloadService.
+func (in *ReloadService) DeepCopy() *ReloadService {
+ if in == nil {
+ return nil
+ }
+ out := new(ReloadService)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceAttributesAccessReview) DeepCopyInto(out *ResourceAttributesAccessReview) {
*out = *in
@@ -3973,6 +4260,22 @@ func (in *ResourceAttributesAccessReview) DeepCopy() *ResourceAttributesAccessRe
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *RestartService) DeepCopyInto(out *RestartService) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestartService.
+func (in *RestartService) DeepCopy() *RestartService {
+ if in == nil {
+ return nil
+ }
+ out := new(RestartService)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RouteAdmissionPolicy) DeepCopyInto(out *RouteAdmissionPolicy) {
*out = *in
diff --git a/operator/v1/zz_generated.featuregated-crd-manifests.yaml b/operator/v1/zz_generated.featuregated-crd-manifests.yaml
index 80a248a022c..c1181638754 100644
--- a/operator/v1/zz_generated.featuregated-crd-manifests.yaml
+++ b/operator/v1/zz_generated.featuregated-crd-manifests.yaml
@@ -303,6 +303,7 @@ machineconfigurations.operator.openshift.io:
Category: ""
FeatureGates:
- ManagedBootImages
+ - NodeDisruptionPolicy
FilenameOperatorName: machine-config
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_80"
diff --git a/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/NodeDisruptionPolicy.yaml b/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/NodeDisruptionPolicy.yaml
new file mode 100644
index 00000000000..8ed2e5180c1
--- /dev/null
+++ b/operator/v1/zz_generated.featuregated-crd-manifests/machineconfigurations.operator.openshift.io/NodeDisruptionPolicy.yaml
@@ -0,0 +1,1159 @@
+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/NodeDisruptionPolicy: "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. \n 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. \n Valid values are: \"Normal\", \"Debug\",
+ \"Trace\", \"TraceAll\". Defaults to \"Normal\"."
+ enum:
+ - ""
+ - Normal
+ - Debug
+ - Trace
+ - TraceAll
+ type: string
+ 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 value 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
+ 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 value 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
+ 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 value 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
+ 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. \n 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: OperatorCondition is just the standard condition fields.
+ properties:
+ lastTransitionTime:
+ format: date-time
+ type: string
+ message:
+ type: string
+ reason:
+ type: string
+ status:
+ type: string
+ type:
+ type: string
+ required:
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ generations:
+ description: generations are used to determine when an item needs
+ to be reconciled or has changed in a way that needs a reaction.
+ items:
+ description: GenerationStatus keeps track of the generation for
+ a given resource so that decisions about forced updates can be
+ made.
+ properties:
+ group:
+ description: group is the group of the thing you're tracking
+ type: string
+ hash:
+ description: hash is an optional field set for resources without
+ generation that are content sensitive like secrets and configmaps
+ type: string
+ lastGeneration:
+ description: lastGeneration is the last generation of the workload
+ controller involved
+ format: int64
+ type: integer
+ name:
+ description: name is the name of the thing you're tracking
+ type: string
+ namespace:
+ description: namespace is where the thing you're tracking is
+ type: string
+ resource:
+ description: resource is the resource type of the thing you're
+ tracking
+ type: string
+ type: object
+ type: array
+ x-kubernetes-list-type: atomic
+ latestAvailableRevision:
+ description: latestAvailableRevision is the deploymentID of the most
+ recent deployment
+ format: int32
+ type: integer
+ latestAvailableRevisionReason:
+ description: latestAvailableRevisionReason describe the detailed reason
+ for the most recent deployment
+ type: string
+ 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 value 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 value 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 value 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
+ nodeStatuses:
+ description: nodeStatuses track the deployment values and errors across
+ individual nodes
+ items:
+ description: NodeStatus provides information about the current state
+ of a particular node managed by this operator.
+ properties:
+ currentRevision:
+ description: currentRevision is the generation of the most recently
+ successful deployment
+ format: int32
+ type: integer
+ lastFailedCount:
+ description: lastFailedCount is how often the installer pod
+ of the last failed revision failed.
+ type: integer
+ lastFailedReason:
+ description: lastFailedReason is a machine readable failure
+ reason string.
+ type: string
+ lastFailedRevision:
+ description: lastFailedRevision is the generation of the deployment
+ we tried and failed to deploy.
+ format: int32
+ type: integer
+ lastFailedRevisionErrors:
+ description: lastFailedRevisionErrors is a list of human readable
+ errors during the failed deployment referenced in lastFailedRevision.
+ items:
+ type: string
+ type: array
+ x-kubernetes-list-type: atomic
+ lastFailedTime:
+ description: lastFailedTime is the time the last failed revision
+ failed the last time.
+ format: date-time
+ type: string
+ lastFallbackCount:
+ description: lastFallbackCount is how often a fallback to a
+ previous revision happened.
+ type: integer
+ nodeName:
+ description: nodeName is the name of the node
+ type: string
+ targetRevision:
+ description: targetRevision is the generation of the deployment
+ we're trying to apply
+ format: int32
+ type: integer
+ required:
+ - nodeName
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - nodeName
+ x-kubernetes-list-type: map
+ observedGeneration:
+ description: observedGeneration is the last generation change you've
+ dealt with
+ format: int64
+ type: integer
+ readyReplicas:
+ description: readyReplicas indicates how many replicas are ready and
+ at the desired state
+ format: int32
+ type: integer
+ version:
+ description: version is the level this availability applies to
+ type: string
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go
index 1ff3042672d..6d9197407d3 100644
--- a/operator/v1/zz_generated.swagger_doc_generated.go
+++ b/operator/v1/zz_generated.swagger_doc_generated.go
@@ -1275,13 +1275,22 @@ func (MachineConfigurationList) SwaggerDoc() map[string]string {
}
var map_MachineConfigurationSpec = map[string]string{
- "managedBootImages": "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, no boot images will be updated.",
+ "managedBootImages": "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, no boot images will be updated.",
+ "nodeDisruptionPolicy": "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.",
}
func (MachineConfigurationSpec) SwaggerDoc() map[string]string {
return map_MachineConfigurationSpec
}
+var map_MachineConfigurationStatus = map[string]string{
+ "nodeDisruptionPolicyStatus": "nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are, and will be used by the Machine Config Daemon during future node updates.",
+}
+
+func (MachineConfigurationStatus) SwaggerDoc() map[string]string {
+ return map_MachineConfigurationStatus
+}
+
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.",
@@ -1310,6 +1319,114 @@ func (ManagedBootImages) SwaggerDoc() map[string]string {
return map_ManagedBootImages
}
+var map_NodeDisruptionPolicyClusterStatus = map[string]string{
+ "": "NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a merge of cluster defaults and user provided policies",
+ "files": "files is a list of MachineConfig file definitions and actions to take to changes on those paths",
+ "units": "units is a list MachineConfig unit definitions and actions to take on changes to those services",
+ "sshkey": "sshkey is the overall sshkey MachineConfig definition",
+}
+
+func (NodeDisruptionPolicyClusterStatus) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyClusterStatus
+}
+
+var map_NodeDisruptionPolicyConfig = map[string]string{
+ "": "NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys",
+ "files": "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.",
+ "units": "units is a list MachineConfig unit definitions and actions to take on changes to those services This list supports a maximum of 50 entries.",
+ "sshkey": "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",
+}
+
+func (NodeDisruptionPolicyConfig) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyConfig
+}
+
+var map_NodeDisruptionPolicySpecAction = map[string]string{
+ "type": "type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed Valid value 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",
+ "reload": "reload specifies the service to reload, only valid if type is reload",
+ "restart": "restart specifies the service to restart, only valid if type is restart",
+}
+
+func (NodeDisruptionPolicySpecAction) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicySpecAction
+}
+
+var map_NodeDisruptionPolicySpecFile = map[string]string{
+ "": "NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object",
+ "path": "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.",
+ "actions": "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.",
+}
+
+func (NodeDisruptionPolicySpecFile) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicySpecFile
+}
+
+var map_NodeDisruptionPolicySpecSSHKey = map[string]string{
+ "": "NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object",
+ "actions": "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.",
+}
+
+func (NodeDisruptionPolicySpecSSHKey) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicySpecSSHKey
+}
+
+var map_NodeDisruptionPolicySpecUnit = map[string]string{
+ "": "NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object",
+ "name": "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\".",
+ "actions": "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.",
+}
+
+func (NodeDisruptionPolicySpecUnit) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicySpecUnit
+}
+
+var map_NodeDisruptionPolicyStatus = map[string]string{
+ "clusterPolicies": "clusterPolicies is a merge of cluster default and user provided node disruption policies.",
+}
+
+func (NodeDisruptionPolicyStatus) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyStatus
+}
+
+var map_NodeDisruptionPolicyStatusAction = map[string]string{
+ "type": "type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed Valid value 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",
+ "reload": "reload specifies the service to reload, only valid if type is reload",
+ "restart": "restart specifies the service to restart, only valid if type is restart",
+}
+
+func (NodeDisruptionPolicyStatusAction) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyStatusAction
+}
+
+var map_NodeDisruptionPolicyStatusFile = map[string]string{
+ "": "NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object",
+ "path": "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.",
+ "actions": "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.",
+}
+
+func (NodeDisruptionPolicyStatusFile) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyStatusFile
+}
+
+var map_NodeDisruptionPolicyStatusSSHKey = map[string]string{
+ "": "NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object",
+ "actions": "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.",
+}
+
+func (NodeDisruptionPolicyStatusSSHKey) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyStatusSSHKey
+}
+
+var map_NodeDisruptionPolicyStatusUnit = map[string]string{
+ "": "NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object",
+ "name": "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\".",
+ "actions": "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.",
+}
+
+func (NodeDisruptionPolicyStatusUnit) SwaggerDoc() map[string]string {
+ return map_NodeDisruptionPolicyStatusUnit
+}
+
var map_PartialSelector = map[string]string{
"": "PartialSelector provides label selector(s) that can be used to match machine management resources.",
"machineResourceSelector": "machineResourceSelector is a label selector that can be used to select machine resources like MachineSets.",
@@ -1319,6 +1436,24 @@ func (PartialSelector) SwaggerDoc() map[string]string {
return map_PartialSelector
}
+var map_ReloadService = map[string]string{
+ "": "ReloadService allows the user to specify the services to be reloaded",
+ "serviceName": "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\".",
+}
+
+func (ReloadService) SwaggerDoc() map[string]string {
+ return map_ReloadService
+}
+
+var map_RestartService = map[string]string{
+ "": "RestartService allows the user to specify the services to be restarted",
+ "serviceName": "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\".",
+}
+
+func (RestartService) SwaggerDoc() map[string]string {
+ return map_RestartService
+}
+
var map_AdditionalNetworkDefinition = map[string]string{
"": "AdditionalNetworkDefinition configures an extra network that is available but not created by default. Instead, pods must request them by name. type must be specified, along with exactly one \"Config\" that matches the type.",
"type": "type is the type of network The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan",
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
index 1e7b228c6fb..a005066a1dc 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
@@ -97,6 +97,9 @@
{
"name": "NewOLM"
},
+ {
+ "name": "NodeDisruptionPolicy"
+ },
{
"name": "NodeSwap"
},
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
index eedf12380a6..705d608b7b1 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
@@ -137,6 +137,9 @@
{
"name": "NewOLM"
},
+ {
+ "name": "NodeDisruptionPolicy"
+ },
{
"name": "NodeSwap"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
index b8fdf28c03e..369ca438568 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
@@ -100,6 +100,9 @@
{
"name": "NewOLM"
},
+ {
+ "name": "NodeDisruptionPolicy"
+ },
{
"name": "NodeSwap"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
index c1c4afa6bb9..e7df8417327 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
@@ -137,6 +137,9 @@
{
"name": "NewOLM"
},
+ {
+ "name": "NodeDisruptionPolicy"
+ },
{
"name": "NodeSwap"
},
diff --git a/payload-manifests/featuregates/featureGate-SingleNode-Default.yaml b/payload-manifests/featuregates/featureGate-SingleNode-Default.yaml
index 1442955bb0b..d4e9a7b4bff 100644
--- a/payload-manifests/featuregates/featureGate-SingleNode-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-SingleNode-Default.yaml
@@ -100,6 +100,9 @@
{
"name": "NewOLM"
},
+ {
+ "name": "NodeDisruptionPolicy"
+ },
{
"name": "NodeSwap"
},
diff --git a/payload-manifests/featuregates/featureGate-SingleNode-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-SingleNode-TechPreviewNoUpgrade.yaml
index b0d41f8caeb..9ed8e788141 100644
--- a/payload-manifests/featuregates/featureGate-SingleNode-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-SingleNode-TechPreviewNoUpgrade.yaml
@@ -137,6 +137,9 @@
{
"name": "NewOLM"
},
+ {
+ "name": "NodeDisruptionPolicy"
+ },
{
"name": "NodeSwap"
},