Commit Graph

7540 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
0775e6b2db Merge pull request #80591 from danwinship/no-localhost-snat
hostport: Don't masquerade localhost-to-localhost traffic
2019-07-31 22:36:50 -07:00
Kubernetes Prow Robot
1a8844cd03 Merge pull request #80683 from moshe010/rename_files
TopologyManager: Fix rename best-effort policy files
2019-07-31 00:25:00 -07:00
Kubernetes Prow Robot
4f15c017ea Merge pull request #80657 from rphillips/fixes/log_metrics_add_uid
kubelet: add UID to kubelet_container_log_filesystem_used_bytes metric
2019-07-30 08:53:43 -07:00
Kubernetes Prow Robot
b4f6b0bf50 Merge pull request #79963 from RainbowMango/pr_fix_typo_for_informer
Fix go lint error for cache directory
2019-07-30 05:33:03 -07:00
Kubernetes Prow Robot
4c191fde89 Merge pull request #73829 from alculquicondor/fix/comment
Fix/Add comments on cadvisor implementations
2019-07-30 05:32:51 -07:00
Kubernetes Prow Robot
40b31794ab Merge pull request #79623 from aaronbbrown/abb-quote-container-in-use
quote container name in container already use error matching
2019-07-30 03:35:31 -07:00
Kubernetes Prow Robot
320bc21dbe Merge pull request #78762 from klueska/upstream-inherit-cpus-from-init-containers
Proactively remove init Containers in CPUManager static policy
2019-07-30 03:35:18 -07:00
Aldo Culquicondor
a626a2972e Fix/Add comments on cadvisor implementations
Fix lint issues.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-29 09:31:35 -04:00
Kubernetes Prow Robot
f18833ee58 Merge pull request #80429 from gaorong/expose-node-lease-renewal-frequency
kubelet: change node-lease-renew-interval to 0.25 of lease-renew-duration
2019-07-29 02:29:56 -07:00
Rong Gao
cda783699b change node-lease-renew-interval to 0.25 of renew-duration
0.25 is a dedicated value to align before default value
of renew-interval but get more heuristic interval
2019-07-29 15:02:11 +08:00
Moshe Levi
3b83c5c7c6 TopologyManager: Fix rename best-effort policy files
PR https://github.com/kubernetes/kubernetes/pull/80301 rename
the preferred policy to best-effort, but the files names are
still policy_preferred.go and policy_preferred_test.go. This
PR fix that.
2019-07-28 19:35:16 +03:00
Kubernetes Prow Robot
23649560c0 Merge pull request #80301 from klueska/upstream-rename-topologymanager-preferred-best-effort
Rename 'preferred' TopologyManager policy to 'best-effort'
2019-07-27 09:25:56 -07:00
RainbowMango
0e0e1f7dab 1. Fix lint errors for the whole directory staging/src/k8s.io/client-go/tools/cache;
2. Remove staging/src/k8s.io/client-go/tools/cache from .golint_failures;
3. Fix some typo from comments.
2019-07-27 15:49:03 +08:00
Ryan Phillips
2bdf975d5b kubelet: add UID to kubelet_container_log_filesystem_used_bytes metric
buildPodRef creates a unique key with the {podName, namespace, UID}
tuple. By omitting the UID in the metric, duplicate metrics can be sent
to prometheus causing 500's on the /metrics endpoint.
2019-07-26 14:59:43 -05:00
Kevin Klues
9f36f1a173 Add tests for proactive init Container removal in the CPUManager static policy 2019-07-26 14:34:51 +02:00
Kevin Klues
6a7db380de Add tests for new containertMap type in the CPUManager 2019-07-26 14:34:51 +02:00
Kevin Klues
c6d9bbcb74 Proactively remove init Containers in CPUManager static policy
This patch fixes a bug in the CPUManager, whereby it doesn't honor the
"effective requests/limits" of a Pod as defined by:

    https://kubernetes.io/docs/concepts/workloads/pods/init-containers/#resources

The rule states that a Pod’s "effective request/limit" for a resource
should be the larger of:
    * The highest of any particular resource request or limit
      defined on all init Containers
    * The sum of all app Containers request/limit for a
      resource

Moreover, the rule states that:
    * The effective QoS tier is the same for init Containers
      and app containers alike

This means that the resource requests of init Containers and app
Containers should be able to overlap, such that the larger of the two
becomes the "effective resource request/limit" for the Pod. Likewise,
if a QoS tier of "Guaranteed" is determined for the Pod, then both init
Containers and app Containers should run in this tier.

In its current implementation, the CPU manager honors the effective QoS
tier for both init and app containers, but doesn't honor the "effective
request/limit" correctly.

Instead, it treats the "effective request/limit" as:
    * The sum of all init Containers plus the sum of all app
      Containers request/limit for a resource

It does this by not proactively removing the CPUs given to previous init
containers when new containers are being created. In the worst case,
this causes the CPUManager to give non-overlapping CPUs to all
containers (whether init or app) in the "Guaranteed" QoS tier before any
of the containers in the Pod actually start.

This effectively blocks these Pods from running if the total number of
CPUs being requested across init and app Containers goes beyond the
limits of the system.

This patch fixes this problem by updating the CPUManager static policy
so that it proactively removes any guaranteed CPUs it has granted to
init Containers before allocating CPUs to app containers. Since all init
container are run sequentially, it also makes sure this proactive
removal happens for previous init containers when allocating CPUs to
later ones.
2019-07-26 14:34:51 +02:00
Antoine Pelisse
6568325ca2 Regenerate 2019-07-25 11:54:00 -07:00
Dan Winship
bf077b19d4 hostport: Don't masquerade localhost-to-localhost traffic 2019-07-25 13:34:14 -04:00
Kevin Klues
7eccc71c9e Rename 'preferred' TopologyManager policy to 'best-effort' 2019-07-25 10:44:36 +02:00
Kubernetes Prow Robot
70521fbf32 Merge pull request #80486 from liyanhui1228/systemuuid
Set the systemUUID for windows nodes
2019-07-24 13:50:33 -07:00
Angela Li
6acc08508c fix lint 2019-07-23 16:01:39 -07:00
Angela Li
e242bbe12c Changed to use cmd for getting system uuid 2019-07-23 15:59:32 -07:00
Angela Li
e56db7d407 Move to getMachineInfo() 2019-07-23 13:25:12 -07:00
Kubernetes Prow Robot
5b496fe8f5 Merge pull request #80315 from klueska/upstream-cleanup-socketmask
Cleanup the TopologyManager socketmask abstraction
2019-07-23 11:40:28 -07:00
Kubernetes Prow Robot
304e2c247a Merge pull request #80294 from klueska/upstream-fail-fast-cpumanager-topologymanager
Update the cpumanager and topologymanager to error out if an invalid policy is given
2019-07-23 11:40:14 -07:00
Angela Li
da966f33f4 Add unit test 2019-07-23 11:22:51 -07:00
Angela Li
7adb0a2656 Set the systemUUID for windows nodes 2019-07-23 10:59:24 -07:00
Kubernetes Prow Robot
04c9bd9bfa Merge pull request #80176 from liyanhui1228/cpuusage
Add CPU usage nano cores for windows nodes
2019-07-22 13:52:53 -07:00
Angela Li
8851a42655 gofmt 2019-07-22 10:56:28 -07:00
Angela Li
e6e8615db3 address comments 2019-07-22 10:53:15 -07:00
Kubernetes Prow Robot
96f02fd0a4 Merge pull request #80104 from mattjmcnaughton/mattjmcnaughton/image-manager-test-readability-improvements
Improve readability for image manager tests
2019-07-18 21:33:11 -07:00
Kubernetes Prow Robot
a5fcaa87f6 Merge pull request #80324 from tallclair/server-metrics
Register Kubelet server metrics
2019-07-18 19:31:49 -07:00
Kubernetes Prow Robot
49f6510d9a Merge pull request #80277 from draveness/feature/revert-cleanup-critical-pod
Revert "feat: cleanup pod critical pod annotations feature"
2019-07-18 19:31:37 -07:00
Kubernetes Prow Robot
cff86e7861 Merge pull request #80234 from tallclair/kubelet-authz
Cleanup kubelet authz tests & make explicit
2019-07-18 19:31:12 -07:00
Kevin Klues
65b07312b0 Cleanup comments in TopologyManager socketmask abstraction 2019-07-18 18:52:19 -07:00
Angela Li
99a7a0a53b fix gofmt 2019-07-18 16:15:39 -07:00
Angela Li
3764360ccc Make kubelet report usageNanoCores for node on Windows 2019-07-18 15:20:53 -07:00
Tim Allclair
1eb5aed0dd Register Kubelet server metrics 2019-07-18 14:29:59 -07:00
Tim Allclair
72951efdaf Cleanup kubelet authz tests & make explicit 2019-07-18 13:35:11 -07:00
Kevin Klues
0edfd4be35 Add package level And/Or calls to TopologyManager socketmask abstraction 2019-07-18 09:06:51 -07:00
Kevin Klues
434fd34e0b Add NewEmtpySocketMask() call to TopologyManager socketmask abstraction 2019-07-18 09:05:55 -07:00
mattjmcnaughton
1d2c96ad5e Improve readability for image manager tests
Use named variables so boolean arguments are more readable.
2019-07-18 10:14:43 -04:00
Kubernetes Prow Robot
ab266f725f Merge pull request #80173 from gaorong/node-lease-renew-interval
make node lease renew interval more heuristic
2019-07-18 07:08:11 -07:00
Kevin Klues
4ee5d5409e Update the topologymanager to error out if an invalid policy is given
Previously, the topologymanager would simply fall back to the None() policy
if an invalid policy was specified. This patch updates this to return an
error when an invalid policy is passed, forcing the kubelet to fail
fast when this occurs.

These semantics should be preferable because an invalid policy likely
indicates operator error in setting the policy flag on the kubelet
correctly (e.g. misspelling 'strict' as 'striict'). In this case it is
better to fail fast so the operator can detect this and correct the
mistake, than to mask the error and essentially disable the
topologymanager unexpectedly.
2019-07-18 13:24:09 +02:00
Kevin Klues
5dc5f1de06 Update the cpumanager to error out if an invalid policy is given
Previously, the cpumanager would simply fall back to the None() policy
if an invalid policy was specified. This patch updates this to return an
error when an invalid policy is passed, forcing the kubelet to fail
fast when this occurs.

These semantics should be preferable because an invalid policy likely
indicates operator error in setting the policy flag on the kubelet
correctly (e.g. misspelling 'static' as 'statiic'). In this case it is
better to fail fast so the operator can detect this and correct the
mistake, than to mask the error and essentially disable the cpumanager
unexpectedly.
2019-07-18 13:24:09 +02:00
draveness
d83526d253 Revert "feat: cleanup pod critical pod annotations feature"
This reverts commit b6d41ee5cc.
2019-07-18 13:31:12 +08:00
Kubernetes Prow Robot
1125054612 Merge pull request #80235 from moshe010/remove_string
Remove unnecessary string() from policy_none
2019-07-17 19:34:49 -07:00
Kubernetes Prow Robot
2b21e478b1 Merge pull request #79489 from bclau/feature/run-as-username
Adds WindowsOptions.RunAsUserName field
2019-07-17 19:34:24 -07:00
James Sturtevant
a8c78d1359 Windows: Sets the effective SecurityContext's RunAsUserName
Co-Authored-By: Claudiu Belu <cbelu@cloudbasesolutions.com>
2019-07-17 15:03:11 +00:00