Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Kubectl: take pod overhead into account for node info #81929
What type of PR is this?
What this PR does / why we need it:
kubectl doesn't take Pod Overhead into account.
Special notes for your reviewer:
Unfortunately, I do not see any examples of 'feature gates' with CLI tools. Because of this, I am not sure, but think it would be appropriate to include Pod.Spec.Overhead if it is defined in the Pod.Spec (which should only be the case if the feature is enabled, or if someone is manually adding without the admission controller).
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:
/cc @tallclair -- PTAL. I think from a user perspective, if PodOverhead is being utilized it is crucial that this shows up in kubectl node information. I'm concerned there isn't a way (I saw) for Feature gates to be utilized here. In lieu of this, I am taking the Overhead defined in Pod.Spec if it is defined. I'm not sure if there's a way to do this on the node, instead of in client application, to avoid this. WDYT?
Also, I am concerned that this is yet another almost identical that is duplicated from the resource helpers in k/k.
Re: feature gates, I don't think there's a way to apply feature gates client side. I agree that checking for a non-nil field is a sufficient proxy.
I think there's some work underway to move the describe logic server-side, which would let you check feature gates. I don't know the status of that though.
[APPROVALNOTIFIER] This PR is APPROVED
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing