OCPNODE-1515 : Support Evented PLEG feature in Openshift#1458
OCPNODE-1515 : Support Evented PLEG feature in Openshift#1458sairameshv wants to merge 2 commits intoopenshift:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
Hello @sairameshv! Some important instructions when contributing to openshift/api: |
|
/test verify |
7661898 to
6c1e4f0
Compare
| // +optional | ||
| WorkerLatencyProfile WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` | ||
|
|
||
| // EventedPleg enables event based PLEG between the kubelet and the CRI-O |
There was a problem hiding this comment.
I think we want to expand this comment to provide more detail.
Questions I would be asking would be:
- What are the valid values?
- What happens if i didn't specify any value? Is this behaviour likely to change over time?
Nit, the comment should start with the json tag version of the name not the Go field version
So I'd be expecting something more along the lines of:
| // EventedPleg enables event based PLEG between the kubelet and the CRI-O | |
| // eventedPLEG enables event based PLEG between the kubelet and the CRI-O. | |
| // Valid values are `Enabled`, `Disabled` and omitted. | |
| // When omitted, this means no opinion and the platform is left to choose a reasonable default | |
| // which is subject to change over time. | |
| // The current default is `Disabled`. |
Also, is it worthing rather than saying CRI-O, spelling that out in human readable prose?
I assume a user will know what PLEG is if they are turning this on?
There was a problem hiding this comment.
Updated as suggested along with a reference to the KEP !!
| DefaultUpdateDefaultReaction WorkerLatencyProfileType = "Default" | ||
| ) | ||
|
|
||
| // +kubebuilder:validation:Enum=Enabled;Disabled;"" |
There was a problem hiding this comment.
If you are using omitempty which I think you are doing because this is a workload API rather than a configuration API, you don't need to have "" in place, when the field is omitted the validation for the enum will not execute
There was a problem hiding this comment.
Yeah, Removed the "" option and I think nodes.config API is a configuration API as this resource is unique cluster-wide
There was a problem hiding this comment.
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 "" in the enum and dropping omitempty. This improves the discoverability of the API for the user to configure it
There was a problem hiding this comment.
It is a singleton resource named "cluster" that has some of the node related configs like cgroupMode, workerlatencyprofiles etc.
I agree that removing omitempty improves the discoverability of the API for the user. At the same time, I want to maintain consistency with the other API fields already present which are again optional
WDYT?
There was a problem hiding this comment.
At the same time, I want to maintain consistency with the other API fields already present which are again optional
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.
There was a problem hiding this comment.
Agreed with your point, Updated !!
|
How does this interact with #1471? What's the goal in 4.14? Looks like 1471 enabled the feature by default in tech preview clusters, so is the intention here that a user will have the choice? It will be on by default but can be disabled by using the fields added here? |
#1471 Just provides a way to enable this feature via featuregate. I don't think it enables the EventedPLEG without getting this PR & the related MCO PR merged. |
It does enable it for TechPreviewNoUpgrade clusters. MCO gets the feature gate passed through to kubelet and so it gets enabled by default on any TechPreviewNoUpgrade cluster, guessing that wasn't the intention? Note, this has been noticed because of debugging issues in openshift/machine-config-operator#3688 |
| // 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 |
There was a problem hiding this comment.
We typically have a particular prose we use for this, can you update please
| // By default, the evented pleg feature is not enabled in the cluster | |
| // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. | |
| // The current default value is Disabled. |
| 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 |
There was a problem hiding this comment.
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?
761cb1f to
23a1dcc
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: sairameshv The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1. Incase of Evented PLEG, CRI-O sends the container events to the Kubelet so that the pod cache can be updated based on the received events. KEP Reference: https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/3386-kubelet-evented-pleg/README.md 2. This feature can be enabled in OCP by adding a new field in the node config custom resource that can be monitored by the MCO and update both the required Kubelet and CRI-O configurations Enhancement PR: openshift/enhancements#1368 Signed-off-by: Sai Ramesh Vanka <svanka@redhat.com>
23a1dcc to
8b0fb6b
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
|
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
|
@sairameshv: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Rotten issues close after 30d of inactivity. Reopen the issue by commenting /close |
|
@openshift-bot: Closed this PR. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
More about the Evented PLEG is here - KEP Reference
that can be monitored by the MCO and update both the Kubelet and CRI-O configurations
Enhancement PR: OCPNODE-1525: Support Evented PLEG in Openshift enhancements#1368