Commit Graph

109396 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
d550419496
Merge pull request #110549 from benluddy/skip-unused-oldself-activation-work
Only provide an oldSelf binding when referenced by a CEL rule.
2022-06-27 13:40:34 -07:00
John Howard
c6b0652b89
kubelet: silence flag output on errors (#110728)
* kubelet: silence flag output on errors

Currently, the `--help` text is output on kubelet errors. Currently on
my machine this is 280 lines. Typically kubelet is run by systemd or
similar, starting it a loop. This means when an issue is encountered, we
are spammed by 100s of logs per second, masking the real error.

With this PR, the list of all flags is silenced. Users can still access
them by `kubelet --help` as normal. This same `SilenceUsage` is already
set in the api-server command.

* Update cmd/kubelet/app/server.go

Co-authored-by: Paco Xu <paco.xu@daocloud.io>

Co-authored-by: Paco Xu <paco.xu@daocloud.io>
2022-06-27 11:34:59 -07:00
Kubernetes Prow Robot
10810ab42b
Merge pull request #110788 from 21kyu/change_reflect_ptr
Change reflect.Ptr to reflect.Pointer
2022-06-27 10:16:59 -07:00
Kubernetes Prow Robot
1cbd008c75
Merge pull request #110766 from ardaguclu/add-integration-for-events
(kubectl events): Add integration tests
2022-06-27 09:00:58 -07:00
Kai
a0d6a49b12
Update SUPPORT.md 2022-06-27 16:58:44 +02:00
Vladimir Nachev
a380ef5c41
Ensure the dir of --audit-log-path exists
Signed-off-by: Vladimir Nachev <vladimir.nachev@sap.com>
2022-06-27 17:57:26 +03:00
Kubernetes Prow Robot
aefb71d7ef
Merge pull request #110721 from jsafrane/fix-force-detach
Don't force detach volume from healthy nodes
2022-06-27 07:49:12 -07:00
Kubernetes Prow Robot
d9e7f25a80
Merge pull request #110668 from brianpursley/k-108630
Remove unused flags from kubectl run
2022-06-27 07:49:00 -07:00
Sascha Grunert
a4f966aada
Graduate SeccompDefault feature to beta
As outlined in the KEP, we now graduate the Kubelet feature to beta
which means that it is enabled by default. The corresponding Kubelet
flag still defaults to `false`, but we now have the chance to e2e test
the feature by using a new serial test case.

KEP: https://github.com/kubernetes/enhancements/issues/2413

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-06-27 14:39:55 +02:00
Arda Güçlü
f5af2d0e91 (kubectl events): Add integration tests
This PR adds integration tests for `kubectl alpha events`
2022-06-27 09:32:32 +03:00
Stephen Heywood
faae770946 Migrate and update current e2e event test
e2e test validates the following missing endpoint
- replaceCoreV1NamespacedEvent
2022-06-27 10:43:24 +12:00
Kubernetes Prow Robot
f4abde9e57
Merge pull request #110632 from Kartik494/fix_cherry_pick
Update cherry_pick_pull.sh
2022-06-26 05:18:58 -07:00
Kartik Sharma
23f7594946 Update cherry_pick_pull.sh 2022-06-26 09:21:05 +05:30
21kyu
df168d5b5c Change reflect.Ptr to reflect.Pointer 2022-06-26 01:23:43 +09:00
Kubernetes Prow Robot
d2c5779dad
Merge pull request #110776 from harry1064/remove-clock-pkg-scheduler
Use clock package from k8s.io/utils/clock
2022-06-24 22:32:57 -07:00
Kubernetes Prow Robot
11686e1386
Merge pull request #110771 from alculquicondor/increase_timeout
Wait for cache sync in TestSyncPastDeadlineJobFinished
2022-06-24 13:28:59 -07:00
Kubernetes Prow Robot
1d22329de8
Merge pull request #110201 from aramase/kmsv2
Add KMS v2alpha1 API
2022-06-24 12:06:58 -07:00
Anish Ramasekar
907545445a
Add KMS v2alpha1 API
Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
2022-06-24 17:58:34 +00:00
harry1064
fceb5cd4b1
Use clock package from k8s.io/utils/clock
- Remove unwanted clock.go file.
2022-06-25 00:25:12 +08:00
Kubernetes Prow Robot
6219eed24f
Merge pull request #110535 from giuseppe/add-userns-CRI
kubelet: add CRI definitions for user namespaces
2022-06-24 09:16:56 -07:00
Rodrigo Campos
466c4d24a9 pkg/kubelet: skip long test on short mode
When adding functionality to the kubelet package and a test file, is
kind of painful to run unit tests today locally.

We usually can't run specifying the test file, as if xx_test.go and
xx.go use the same package, we need to specify all the dependencies. As
soon as xx.go uses the Kuebelet type (we need to do that to fake a
kubelet in the unit tests), this is completely impossible to do in
practice.

So the other option is to run the unit tests for the whole package or
run only a specific funtion. Running a single function can work in some
cases, but it is painful when we want to test all the functions we
wrote. On the other hand, running the test for the whole package is very
slow.

Today some unit tests try to connect to the API server (with retries)
create and list lot of pods/volumes, etc. This makes running the unit
test for the kubelet package slow.

This patch tries to make running the unit test for the whole package
more palatable. This patch adds a skip if the short version was
requested (go test -short ...), so we don't try to connect
to the API server or skip other slow tests.

Before this patch running the unit tests took in my computer (I've run
it several times so the compilation is already done):

	$ time go test -v
	real	0m21.303s
	user	0m9.033s
	sys	0m2.052s

With this patch it takes ~1/3 of the time:

	$ time go test -short -v
	real	0m7.825s
	user	0m9.588s
	sys	0m1.723s

Around 8 seconds is something I can wait to run the tests :)

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-06-24 18:00:21 +02:00
Kubernetes Prow Robot
42fec42586
Merge pull request #110756 from lokichoggio/proxy
fix comments in pkg/proxy/types.go
2022-06-24 07:03:10 -07:00
Kubernetes Prow Robot
4df3f2b9f0
Merge pull request #110411 from trierra/px-beta-125
promote the Portworx feature gate to Beta
2022-06-24 07:02:58 -07:00
Aldo Culquicondor
62a25920e6 Wait for cache sync in TestSyncPastDeadlineJobFinished
Change-Id: I6f023ca6999108f4f86a0f57831d47704cdbb42b
2022-06-24 09:22:59 -04:00
Jan Safranek
3b94ac228a Don't force detach volume from healthy nodes
6 minute force-deatch timeout should be used only for nodes that are not
healthy. 

In case a CSI driver is being upgraded or it's simply slow, NodeUnstage
can take more than 6 minutes. In that case, Pod is already deleted from the
API server and thus A/D controller will force-detach a mounted volume,
possibly corrupting the volume and breaking CSI - a CSI driver expects
NodeUnstage to succeed before Kubernetes can call ControllerUnpublish.
2022-06-24 12:51:41 +02:00
Kubernetes Prow Robot
7a9268d83a
Merge pull request #110719 from xakdwch/master
volume/fc: fix FibreChannel volume plugin matching wrong disks
2022-06-24 03:40:57 -07:00
Patrick Ohly
7f55a0bae0 kubelet: avoid manipulating global logger during unit test
The code as it stands now works, but it is still complicated and previous
versions had race
conditions (https://github.com/kubernetes/kubernetes/issues/108040). Now the
test works without modifying global state. The individual test cases could run
in parallel, this just isn't done because they complete quickly already (2
seconds).
2022-06-24 11:27:40 +02:00
Kubernetes Prow Robot
411ecc3b62
Merge pull request #110764 from soltysh/improve_msg
Improve run and debug attach message upon failure
2022-06-24 02:27:09 -07:00
Kubernetes Prow Robot
e526241a9a
Merge pull request #108833 from eltociear/patch-8
fix typo in genericapiserver.go
2022-06-24 02:26:57 -07:00
Patrick Ohly
65385fec20 kubelet: convert node shutdown manager to contextual logging
This will make output checking easier (done in a separate commit). kubelet
itself still uses the global logger.
2022-06-24 11:20:34 +02:00
Giuseppe Scrivano
e8154ba52d
kubelet: add CRI definitions for user namespaces
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2022-06-24 09:39:40 +02:00
Kubernetes Prow Robot
34b4125351
Merge pull request #110656 from pacoxu/kubeadm-dup-unix
kubeadm: handle dup unix:// prefix in node annotation
2022-06-24 00:21:21 -07:00
Maciej Szulik
43c2ae479f
Improve run and debug attach message upon failure 2022-06-24 09:14:27 +02:00
Paco Xu
8555f401a0 kubeadm: handle dup unix:// prefix in node annotaiton 2022-06-24 11:16:34 +08:00
Kubernetes Prow Robot
07dfdf0859
Merge pull request #110709 from chendave/fix_renew
kubeadm: Honor `cert-dir` for cert operations
2022-06-23 19:51:19 -07:00
lokichoggio
52280de403
fix comments in pkg/proxy/types.go 2022-06-24 09:50:02 +08:00
Kubernetes Prow Robot
487512bb56
Merge pull request #109510 from sugangli/pinhole-fw
Firewall Pinhole Fix for ILB and NetLB
2022-06-23 16:13:20 -07:00
Kubernetes Prow Robot
801bcfeea7
Merge pull request #110731 from jkh52/update-netproxy
Bump konnectivity-client to 0.0.32
2022-06-23 12:41:20 -07:00
Kubernetes Prow Robot
d6547d26eb
Merge pull request #110748 from cpanato/prombotclean
remove release-1.20 from prom bot due to eol
2022-06-23 11:19:43 -07:00
Sugang Li
c64846da00 update kube-controller-manager dependencies 2022-06-23 18:07:18 +00:00
Sugang Li
84903d4b84 add ILB and NetLB pinhole changes 2022-06-23 18:07:15 +00:00
Kubernetes Prow Robot
035f22d781
Merge pull request #110712 from chendave/ignore_args
kubeadm: certs renew doesn't support positional args
2022-06-23 09:09:43 -07:00
cpanato
ab810a7f85
remove release-1.20 from prom bot due to eol
Signed-off-by: cpanato <ctadeu@gmail.com>
2022-06-23 18:04:17 +02:00
AllenZMC
711896b68b Check for errors ahead of time
Signed-off-by: AllenZMC <zhongming.chang@daocloud.io>
2022-06-23 23:26:17 +08:00
Kubernetes Prow Robot
1e3c973e72
Merge pull request #110628 from danwinship/kep-3178-ipvs-mark-drop
don't use KUBE-MARK-DROP in ipvs proxy
2022-06-23 07:59:55 -07:00
Kubernetes Prow Robot
272386c9b6
Merge pull request #110496 from kolyshkin/runc-1.1.3
vendor: bump runc to 1.1.3
2022-06-23 07:59:43 -07:00
Dave Chen
e8e804deaa kubeadm: certs renew doesn't support positional args
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-23 19:52:22 +08:00
Kubernetes Prow Robot
df0af6f7b8
Merge pull request #110736 from Octopusjust/k8s-pr3
Incomplete coverage of test scenarios
2022-06-23 04:33:44 -07:00
Dave Chen
57646c941f kubeadm: Honor cert-dir for cert operations
- `cert-dir` could be specified to a value other than the default value
- we have tests that should be executed successfully on the working cluster

Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-06-23 19:32:20 +08:00
xakdwch
ddcc448070 volume/fc: fix FibreChannel volume plugin matching wrong disks
Before:
  findDisk()
    fcPathExp := "^(pci-.*-fc|fc)-0x" + wwn + "-lun-" + lun
After:
  findDisk()
    fcPathExp := "^(pci-.*-fc|fc)-0x" + wwn + "-lun-" + lun + "$"

fc path may have the same wwns but different luns.for example:
pci-0000:41:00.0-fc-0x500a0981891b8dc5-lun-1
pci-0000:41:00.0-fc-0x500a0981891b8dc5-lun-12

Function findDisk() may mismatch the fc path, return the wrong device and wrong associated devicemapper parent.
This may cause a disater that pods attach wrong disks. Accutally it happended in my testing environment before.
2022-06-23 16:36:01 +08:00