1. Add API definitions;
2. Add feature gate and drops the field when feature gate is not on;
3. Set default values for the field;
4. Add API Validation
5. add kube-proxy iptables and ipvs implementations
6. add tests
Implement pod resource metrics as described in KEP 1916. The new
`/metrics/resources` endpoint is exposed on the active scheduler
and reports kube_pod_resources* metrics that present the effective
requests and limits for all resources on the pods as calculated by
the scheduler and kubelet. This allows administrators using the
system to quickly perform resource consumption, reservation, and
pending utilization calculations when those metrics are read.
Because metrics calculation is on-demand, there is no additional
resource consumption incurred by the scheduler unless the endpoint
is scraped.
PodOverhead is now a beta feature and set to true by default. No need to
override to true during testing.
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Pod and burstable QoS cgroups should take overhead of running a sandbox
into account if the PodOverhead feature is enabled. These helper
functions are utilized by Kubelet for sizing the pod and burstable QoS
cgroups.
Pod overhead is added to resource requests, regardless of the initial
request values. A particular resource pod overhead is only added to a
resource limit if a non-zero limit already existed.
This commit updates eviction handling to also take Pod Overhead into
account (if the feature is enabled).
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Update GetResoureqRequest function to utilize a new helper,
GetResourceRequestQuantity. This logic was duplicated in a couple of
areas in the K/K codebase, so consolidating for better test coverage.
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
* merge pkg/api/v1/node with pkg/util/node
* update test case for utilnode
* remove package pkg/api/v1/node
* move isNodeReady to internal func
* Split GetNodeCondition into e2e and controller pkg
* fix import errors
As cited in
https://github.com/kubernetes/dns/issues/174 - this is documented to
work, and I don't see why it shouldn't work. We allowed the definition
of headless services without ports, but apparently nobody tested it very
well.
Manually tested clusterIP services with no ports - validation error.
Manually tested services with negative ports - validation error.
New tests failed, output inspected and verified. Now pass.
Automatic merge from submit-queue (batch tested with PRs 55600, 67386). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
remove deplicate code for PodRequestsAndLimits
remove deplicate code for PodRequestsAndLimits
add unit test for PodRequestsAndLimits
**What this PR does / why we need it**:
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #
**Special notes for your reviewer**:
**Release note**:
```release-note
NONE
```