Commit Graph

104636 Commits

Author SHA1 Message Date
Lukasz Szaszkiewicz
9e2bdfee02 rename to muxAndDiscoveryComplete 2021-10-19 13:26:59 +02:00
Shivanshu Raj Shrivastava
3e6d122ee1
fixed using reference to loop iterator (#105433)
* fixed using reference to loop iterator

* fixed other for loops
2021-10-19 02:40:38 -07:00
Lukasz Szaszkiewicz
c54463d379 kube-aggregator: registeres APIServiceRegistrationControllerInitiated as a MuxComplete signal
apiServiceRegistrationControllerInitiated is closed when APIServiceRegistrationController has finished "installing" all known APIServices.
At this point we know that the proxy handler knows about APIServices and can handle client requests.
Before it might have resulted in a 404 response which could have serious consequences for some controllers like GC and NS
2021-10-19 10:10:21 +02:00
Lukasz Szaszkiewicz
ddfbb5d2bb genericapiserver: indroduce muxCompleteSignals for holding signals that indicate all known HTTP paths have been registered
the new field exists primarily to avoid returning a 404 response when a resource actually exists but we haven't installed the path to a handler.
it is exposed for easier composition of the individual servers.
the primary users of this field are the WithMuxCompleteProtection filter and the NotFoundHandler.
2021-10-19 10:10:15 +02:00
Lukasz Szaszkiewicz
b71fa61b79 apiserver: adds WithMuxCompleteProtection filter
It puts the muxCompleteProtectionKey in the context if a request has been made before muxCompleteSignal has been ready.
Putting the key protect us from returning a 404 response instead of a 503.
It is especially important for controllers like GC and NS since they act on 404s.

The presence of the key is checked in the NotFoundHandler (staging/src/k8s.io/apiserver/pkg/util/notfoundhandler/not_found_handler.go)

The race may happen when a request reaches the NotFoundHandler because not all paths have been registered in the mux
but when the registered checks are examined in the handler they indicate that the paths have been actually installed.
In that case, the presence of the key will make the handler return 503 instead of 404.
2021-10-19 09:55:11 +02:00
Lukasz Szaszkiewicz
b92ff2928a update modules.txt 2021-10-19 09:55:11 +02:00
Lukasz Szaszkiewicz
53867975e7 apiserver: indroduces NotFoundHanlder
The new handler is meant to be executed at the end of the delegation chain.
It simply checks if the request have been made before the server has installed all known HTTP paths.
In that case it returns a 503 response otherwise it returns a 404.

We don't want to add additional checks to the readyz path as it might prevent fixing bricked clusters.
This specific handler is meant to "protect" requests that arrive before the paths and handlers are fully initialized.
2021-10-19 09:55:04 +02:00
Kubernetes Prow Robot
edeab47b36
Merge pull request #105757 from MikeSpreitzer/catch-up
Fix nits noticed in recent code review
2021-10-19 00:00:38 -07:00
Mike Spreitzer
1844a05277 Fix nits noticed in recent code review 2021-10-18 23:51:48 -05:00
haoyun
a600e31c55 test: add test for PatchNode when error happend
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-10-19 11:01:01 +08:00
Yaakov Selkowitz
4e3f94eb41 test: use newer test images for better s390x coverage
These image versions added s390x builds via
https://github.com/kubernetes/kubernetes/pull/102785.
2021-10-18 23:00:31 -04:00
Kubernetes Prow Robot
b977200a5d
Merge pull request #102785 from yselkowitz/master
Enable more test images for s390x
2021-10-18 19:59:34 -07:00
David Porter
d28db6ee0c Support cgroupv2 in node problem detector test 2021-10-18 19:50:45 -07:00
Kubernetes Prow Robot
1af8a8c026
Merge pull request #105465 from marosset/remove-host-process-contianer-kubelet-annotations
Stop passing WindowsHostProcessContainer annotations for CRI calls in kubelet
2021-10-18 15:50:02 -07:00
Kubernetes Prow Robot
e526cf316f
Merge pull request #105081 from aramase/update-log-mount-util
update the log message for mount windows
2021-10-18 15:49:54 -07:00
Kubernetes Prow Robot
e595d79dfc
Merge pull request #104574 from 249043822/br-repeat-package
fix duplicate package import in pod_worker
2021-10-18 15:49:46 -07:00
Kubernetes Prow Robot
819b021ada
Merge pull request #92433 from claudiubelu/windows/etcd-image
Adds Windows support for etcd image
2021-10-18 15:49:34 -07:00
Mark Rossetti
3ddff55fe6 Adding unit test coverage for API validation for emphermal contaienrs in hostprocess pods on Windows
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2021-10-18 15:46:27 -07:00
Kubernetes Prow Robot
5889fb4fbc
Merge pull request #105652 from wzshiming/feat/structure-shutdown-config
Refactor to use structure to pass parameters for GracefulNodeShutdown
2021-10-18 14:45:20 -07:00
Namanl2001
ebb2f426c3
adding SSH_KEY desc to makefile
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 00:21:37 +05:30
Namanl2001
85d16760f0
adding defaultGceKey in remote/ssh.go
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 00:07:36 +05:30
Ross Peoples
0cf3dba1f1 drain node output should say drained not evicted 2021-10-18 11:05:28 -05:00
elbehery
04ad18ce44 Run storage hostpath e2e test client pod as privileged
hostPath volume plugin creates a directory within /tmp on host machine, to be mounted as volume.
inject-pod writes content to the volume, and a client-pod tried the read the contents and verify.
when SELinux is enabled on the host, client-pod can not read the content, with permission denied.
running the client-pod as privileged, so that it can access the volume content, even when SEinux is enabled on the host.
2021-10-18 15:06:20 +02:00
Lukasz Szaszkiewicz
7a342a0f8a kube-apiserver: wires the notFoundHandler 2021-10-18 12:41:42 +02:00
Kubernetes Prow Robot
a78e3133a0
Merge pull request #104327 from sxllwx/fix/dynamic-client
set the content-type Header when the dynamic client sends the request
2021-10-18 03:01:49 -07:00
Kevin Klues
86f9c266bc Add optimizations to reduce iterations in distributed NUMA algorithm
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-18 08:53:25 +00:00
Haichao Li
ad7bceb31b glusterdynamic-provisioner: update to v1.3 and provide arm64 support
Signed-off-by: Haichao Li <Haichao.li@arm.com>
Change-Id: I809de5eee0f4cc2865bbf89ee9ad840497185019
2021-10-18 16:23:32 +08:00
Kubernetes Prow Robot
9804a83d8f
Merge pull request #105343 from jonyhy96/fix-patch-node-once
kubeadm: fix some retry logic in PatchNodeOnce
2021-10-17 09:49:49 -07:00
CIPHERTron
27eb281e32 add new line 2021-10-17 21:25:41 +05:30
CIPHERTron
683e5bb2e1 sort directories 2021-10-17 20:32:39 +05:30
CIPHERTron
195cd8a575 rearrange direcctories 2021-10-17 15:34:06 +05:30
CIPHERTron
0de2040ada mark kube-proxy structured logs as migrated 2021-10-17 12:49:39 +05:30
haoyun
bd8f26c2d7 fix: patchNode retry logic
Signed-off-by: haoyun <yun.hao@daocloud.io>
2021-10-17 12:36:36 +08:00
Kevin Klues
70e0f47191 Support full-pcpus-only with the new NUMA distribution policy option
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 19:31:02 +00:00
Kevin Klues
d54445a84d Generalize the NUMA distribution algorithm to take cpuGroupSize
This parameter ensures that CPUs are always allocated in groups of size
'cpuGroupSize'. This is important, for example, to ensure that all CPUs (i.e.
hyperthreads) from the same core are handed out together.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 19:31:02 +00:00
Kevin Klues
1436e33642 Add more extensive testing for NUMA distribution algorithm in CPUManager
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 19:31:02 +00:00
Kevin Klues
cf3afb8602 Add 2 distinguishing test cases between the 2 takeByTopology algorithms
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 19:31:02 +00:00
Kevin Klues
eb78e2406b Add a new TestTakeByTopologyNUMADistributed() test to the CPUManager
As part of this, pull out all of the existing "TakeByTopology" tests and have
them be called by the original TestTakeByTopologyNUMAPacked() as well as the
new TestTakeByTopologyNUMADistributed() test. In a subsequent commit, we will
add some tests that should differ between these two algorithms.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 19:31:02 +00:00
Kevin Klues
876dd9b078 Added algorithm to CPUManager to distribute CPUs across NUMA nodes
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 19:31:02 +00:00
Kevin Klues
462544d079 Split CPUManager takeByTopology() into two different algorithms
The first implements the original algorithm which packs CPUs onto NUMA nodes if
more than one NUMA node is required to satisfy the allocation. The second
disitributes CPUs across NUMA nodes if they can't all fit into one.

The "distributing" algorithm is currently a noop and just returns an error of
"unimplemented". A subsequent commit will add the logic to implement this
algorithm according to KEP 2902:

https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2902-cpumanager-distribute-cpus-policy-option

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 14:46:19 +00:00
Kevin Klues
0e7928edce Add new CPUManager policy option for "distribute-cpus-across-numa"
This commit only adds the option to the policy options framework. A
subsequent commit will add the logic to utilize it.

The KEP describing this new option can be found here:
https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2902-cpumanager-distribute-cpus-policy-option

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2021-10-16 14:46:19 +00:00
Kubernetes Prow Robot
0cef26182c
Merge pull request #105674 from tkashem/apf-debug
apf: include seat information in per request debug dump
2021-10-15 23:53:48 -07:00
Kubernetes Prow Robot
3f40906dd8
Merge pull request #105702 from liggitt/json-strict-test
JSON decoder fixup
2021-10-15 15:45:48 -07:00
Kubernetes Prow Robot
daa83e6263
Merge pull request #105688 from mcshooter/updateNPD0810
Update the binary version file for NPD to 0.8.10-gke0.1
2021-10-15 12:55:16 -07:00
Lukasz Szaszkiewicz
207478c1e6 allow for passing a custom handler to the empty delegate 2021-10-15 18:02:27 +02:00
Jordan Liggitt
ffb2d12633 Test json/yaml decoding type coercion 2021-10-15 11:52:56 -04:00
Jordan Liggitt
b4632c38f0 Fix strict json decoder test 2021-10-15 11:52:56 -04:00
Jordan Liggitt
fd64f8d7ef Add missing json tag on internal unstructured list 2021-10-15 11:52:56 -04:00
Aldo Culquicondor
2c1b3fdb5b Graduate JobTrackingWithFinalizers to beta
Enable feature by default.

Update integration tests for other features to assume that finalizers are present.

Change-Id: Ie969344f572627dba882c0e862e5700dadaf3026
2021-10-15 10:29:40 -04:00
kerthcet
fc9533e72f remove scheduler ServiceAffinity plugin
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-10-15 22:10:31 +08:00