diff --git a/config/v1/0000_10_config-operator_01_node.crd.yaml b/config/v1/0000_10_config-operator_01_node-Default.crd.yaml similarity index 98% rename from config/v1/0000_10_config-operator_01_node.crd.yaml rename to config/v1/0000_10_config-operator_01_node-Default.crd.yaml index a4ef368c2c2..1cfb4982ba4 100644 --- a/config/v1/0000_10_config-operator_01_node.crd.yaml +++ b/config/v1/0000_10_config-operator_01_node-Default.crd.yaml @@ -6,6 +6,7 @@ metadata: include.release.openshift.io/ibm-cloud-managed: "true" include.release.openshift.io/self-managed-high-availability: "true" include.release.openshift.io/single-node-developer: "true" + release.openshift.io/feature-set: Default name: nodes.config.openshift.io spec: group: config.openshift.io diff --git a/config/v1/0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml b/config/v1/0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..984730147ce --- /dev/null +++ b/config/v1/0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,67 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1107 + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + name: nodes.config.openshift.io +spec: + group: config.openshift.io + names: + kind: Node + listKind: NodeList + plural: nodes + singular: node + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: "Node holds cluster-wide information about node specific features. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." + type: object + required: + - spec + 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 holds user settable values for configuration + type: object + properties: + cgroupMode: + description: CgroupMode determines the cgroups version on the node + type: string + enum: + - v1 + - v2 + - "" + eventedPleg: + description: 'eventedPleg enables the event based PLEG between the kubelet and CRI-O Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md Valid values are `Enabled`, `Disabled` and "" By default, the evented pleg feature is not enabled in the cluster' + type: string + enum: + - Enabled + - Disabled + - "" + workerLatencyProfile: + description: WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster + type: string + enum: + - Default + - MediumUpdateAverageReaction + - LowUpdateSlowReaction + status: + description: status holds observed values. + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/v1/stable.node.testsuite.yaml b/config/v1/stable.node.testsuite.yaml index d6502600bc8..5a705aabf2c 100644 --- a/config/v1/stable.node.testsuite.yaml +++ b/config/v1/stable.node.testsuite.yaml @@ -1,6 +1,6 @@ apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this name: "[Stable] Node" -crd: 0000_10_config-operator_01_node.crd.yaml +crd: 0000_10_config-operator_01_node-Default.crd.yaml tests: onCreate: - name: Should be able to create a minimal Node diff --git a/config/v1/techpreview.node.testsuite.yaml b/config/v1/techpreview.node.testsuite.yaml new file mode 100644 index 00000000000..fe2c10b97a3 --- /dev/null +++ b/config/v1/techpreview.node.testsuite.yaml @@ -0,0 +1,14 @@ +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this +name: "[TechPreviewNoUpgrade] Node" +crd: 0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml +tests: + onCreate: + - name: Should be able to create a minimal Node + initial: | + apiVersion: config.openshift.io/v1 + kind: Node + spec: {} # No spec is required for a Node + expected: | + apiVersion: config.openshift.io/v1 + kind: Node + spec: {} diff --git a/config/v1/types_feature.go b/config/v1/types_feature.go index 56df7ae8269..9cecc6c8136 100644 --- a/config/v1/types_feature.go +++ b/config/v1/types_feature.go @@ -173,7 +173,7 @@ var FeatureSets = map[FeatureSet]*FeatureGateEnabledDisabled{ with(dynamicResourceAllocation). with(gateGatewayAPI). with(maxUnavailableStatefulSet). - without(eventedPleg). + with(eventedPleg). with(sigstoreImageVerification). with(gcpLabelsTags). with(gcpClusterHostedDNS). @@ -215,6 +215,7 @@ var defaultFeatures = &FeatureGateEnabledDisabled{ privateHostedZoneAWS, buildCSIVolumes, kmsv1, + eventedPleg, }, Disabled: []FeatureGateDescription{ disableKubeletCloudCredentialProviders, // We do not currently ship the correct config to use the external credentials provider. diff --git a/config/v1/types_node.go b/config/v1/types_node.go index 233c89d9cc2..10024f1ed2a 100644 --- a/config/v1/types_node.go +++ b/config/v1/types_node.go @@ -42,6 +42,14 @@ type NodeSpec struct { // the status and corresponding reaction of the cluster // +optional WorkerLatencyProfile WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` + + // eventedPleg enables the event based PLEG between the kubelet and CRI-O + // Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md + // Valid values are `Enabled`, `Disabled` and "" + // By default, the evented pleg feature is not enabled in the cluster + // +openshift:enable:FeatureSets=TechPreviewNoUpgrade + // +optional + EventedPleg EventedPLEG `json:"eventedPleg"` } type NodeStatus struct{} @@ -70,6 +78,17 @@ const ( DefaultUpdateDefaultReaction WorkerLatencyProfileType = "Default" ) +// +kubebuilder:validation:Enum=Enabled;Disabled;"" +type EventedPLEG string + +const ( + // Enabled enables the event based pleg between the kubelet and the cri-o + Enabled EventedPLEG = "Enabled" + + // Disabled disables the event based pleg between the kubelet and the cri-o + Disabled EventedPLEG = "Disabled" +) + const ( // DefaultNodeStatusUpdateFrequency refers to the "--node-status-update-frequency" of the kubelet in case of DefaultUpdateDefaultReaction WorkerLatencyProfile type DefaultNodeStatusUpdateFrequency = 10 * time.Second diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index 270fa0acf9b..372008ed397 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -2056,6 +2056,7 @@ func (NodeList) SwaggerDoc() map[string]string { var map_NodeSpec = map[string]string{ "cgroupMode": "CgroupMode determines the cgroups version on the node", "workerLatencyProfile": "WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", + "eventedPleg": "eventedPleg enables the event based PLEG between the kubelet and CRI-O Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md Valid values are `Enabled`, `Disabled` and \"\" By default, the evented pleg feature is not enabled in the cluster", } func (NodeSpec) SwaggerDoc() map[string]string { diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go index b42c27c454d..c34b22fa4ec 100644 --- a/openapi/generated_openapi/zz_generated.openapi.go +++ b/openapi/generated_openapi/zz_generated.openapi.go @@ -15304,6 +15304,14 @@ func schema_openshift_api_config_v1_NodeSpec(ref common.ReferenceCallback) commo Format: "", }, }, + "eventedPleg": { + SchemaProps: spec.SchemaProps{ + Description: "eventedPleg enables the event based PLEG between the kubelet and CRI-O Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md Valid values are `Enabled`, `Disabled` and \"\" By default, the evented pleg feature is not enabled in the cluster", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, }, }, }, diff --git a/openapi/openapi.json b/openapi/openapi.json index a9e90467587..13c72b32c1c 100644 --- a/openapi/openapi.json +++ b/openapi/openapi.json @@ -8186,6 +8186,11 @@ "description": "CgroupMode determines the cgroups version on the node", "type": "string" }, + "eventedPleg": { + "description": "eventedPleg enables the event based PLEG between the kubelet and CRI-O Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md Valid values are `Enabled`, `Disabled` and \"\" By default, the evented pleg feature is not enabled in the cluster", + "type": "string", + "default": "" + }, "workerLatencyProfile": { "description": "WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster", "type": "string" diff --git a/payload-manifests/crds/0000_10_config-operator_01_node-Default.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_node-Default.crd.yaml new file mode 100644 index 00000000000..1cfb4982ba4 --- /dev/null +++ b/payload-manifests/crds/0000_10_config-operator_01_node-Default.crd.yaml @@ -0,0 +1,60 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1107 + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + release.openshift.io/feature-set: Default + name: nodes.config.openshift.io +spec: + group: config.openshift.io + names: + kind: Node + listKind: NodeList + plural: nodes + singular: node + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: "Node holds cluster-wide information about node specific features. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." + type: object + required: + - spec + 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 holds user settable values for configuration + type: object + properties: + cgroupMode: + description: CgroupMode determines the cgroups version on the node + type: string + enum: + - v1 + - v2 + - "" + workerLatencyProfile: + description: WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster + type: string + enum: + - Default + - MediumUpdateAverageReaction + - LowUpdateSlowReaction + status: + description: status holds observed values. + type: object + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/crds/0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml new file mode 100644 index 00000000000..984730147ce --- /dev/null +++ b/payload-manifests/crds/0000_10_config-operator_01_node-TechPreviewNoUpgrade.crd.yaml @@ -0,0 +1,67 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + api-approved.openshift.io: https://github.com/openshift/api/pull/1107 + include.release.openshift.io/ibm-cloud-managed: "true" + include.release.openshift.io/self-managed-high-availability: "true" + include.release.openshift.io/single-node-developer: "true" + release.openshift.io/feature-set: TechPreviewNoUpgrade + name: nodes.config.openshift.io +spec: + group: config.openshift.io + names: + kind: Node + listKind: NodeList + plural: nodes + singular: node + scope: Cluster + versions: + - name: v1 + schema: + openAPIV3Schema: + description: "Node holds cluster-wide information about node specific features. \n Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer)." + type: object + required: + - spec + 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 holds user settable values for configuration + type: object + properties: + cgroupMode: + description: CgroupMode determines the cgroups version on the node + type: string + enum: + - v1 + - v2 + - "" + eventedPleg: + description: 'eventedPleg enables the event based PLEG between the kubelet and CRI-O Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md Valid values are `Enabled`, `Disabled` and "" By default, the evented pleg feature is not enabled in the cluster' + type: string + enum: + - Enabled + - Disabled + - "" + workerLatencyProfile: + description: WorkerLatencyProfile determins the how fast the kubelet is updating the status and corresponding reaction of the cluster + type: string + enum: + - Default + - MediumUpdateAverageReaction + - LowUpdateSlowReaction + status: + description: status holds observed values. + type: object + served: true + storage: true + subresources: + status: {} diff --git a/payload-manifests/featuregates/featureGate-Default.yaml b/payload-manifests/featuregates/featureGate-Default.yaml index 5335b23319e..2fd80c02bd0 100644 --- a/payload-manifests/featuregates/featureGate-Default.yaml +++ b/payload-manifests/featuregates/featureGate-Default.yaml @@ -31,9 +31,6 @@ { "name": "DynamicResourceAllocation" }, - { - "name": "EventedPLEG" - }, { "name": "GCPClusterHostedDNS" }, @@ -120,6 +117,9 @@ { "name": "CloudDualStackNodeIPs" }, + { + "name": "EventedPLEG" + }, { "name": "ExternalCloudProvider" }, diff --git a/payload-manifests/featuregates/featureGate-LatencySensitive.yaml b/payload-manifests/featuregates/featureGate-LatencySensitive.yaml index 3a0de3ca8a1..8ff077bdee9 100644 --- a/payload-manifests/featuregates/featureGate-LatencySensitive.yaml +++ b/payload-manifests/featuregates/featureGate-LatencySensitive.yaml @@ -33,9 +33,6 @@ { "name": "DynamicResourceAllocation" }, - { - "name": "EventedPLEG" - }, { "name": "GCPClusterHostedDNS" }, @@ -122,6 +119,9 @@ { "name": "CloudDualStackNodeIPs" }, + { + "name": "EventedPLEG" + }, { "name": "ExternalCloudProvider" }, diff --git a/payload-manifests/featuregates/featureGate-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-TechPreviewNoUpgrade.yaml index 39e2f52cc9d..789d391fc05 100644 --- a/payload-manifests/featuregates/featureGate-TechPreviewNoUpgrade.yaml +++ b/payload-manifests/featuregates/featureGate-TechPreviewNoUpgrade.yaml @@ -18,9 +18,6 @@ { "name": "DisableKubeletCloudCredentialProviders" }, - { - "name": "EventedPLEG" - }, { "name": "MachineAPIOperatorDisableMachineHealthCheckController" } @@ -53,6 +50,9 @@ { "name": "DynamicResourceAllocation" }, + { + "name": "EventedPLEG" + }, { "name": "ExternalCloudProvider" },