-
Notifications
You must be signed in to change notification settings - Fork 606
OCPNODE-1515 : Support Evented PLEG feature in Openshift #1458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: {} |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We typically have a particular prose we use for this, can you update please
Suggested change
|
||||||||
| // +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;"" | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you are using
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, Removed the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it a singleton resource or is there one per Node in the cluster? If it's a singleton then yep, it's a configuration API, in which case I would suggest including
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a singleton resource named "cluster" that has some of the node related configs like cgroupMode, workerlatencyprofiles etc.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We tend to say we don't repeat the sins of the past here. We have conventions that evolve over time so new fields should follow current conventions even when they make the field look inconsistent with older fields. IMO this should be no omitempty, but allow empty string on the enum please.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed with your point, Updated !! |
||||||||
| 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 | ||||||||
|
|
||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a user friendly explanation we can include? A link to a KEP is quite a lot of context.
Is the intention when a user enables this feature that CRIO and Kubelet are both configured? Is there explicit configuration required for both?
EventedPLEG is an upstream feature gate, what happens when that is enabled by default?