Commit Graph

20744 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f6ba25fdbd Merge pull request #119026 from AxeZhan/sleepAction
Introducing Sleep Action for PreStop Hook
2023-10-16 21:19:44 +02:00
Jefftree
e3098225ea bump kube-openapi 2023-10-16 15:05:13 -04:00
Jefftree
b30c6bdff8 Fix v3 spec 2023-10-16 15:05:13 -04:00
Kubernetes Prow Robot
146252cae8 Merge pull request #120485 from ushitora-anqou/patch-1
fix: typo in staging/src/k8s.io/cri-api/pkg/apis/runtime/v1/api.proto
2023-10-16 19:07:12 +02:00
kiashok
d1a6c0ae7d Update cri-api change in v1.29.0
Signed-off-by: kiashok <kiashok@microsoft.com>
2023-10-16 09:55:14 -07:00
Siyuan Zhang
2f923e356e k8s.io/apiserver/storage: add a new TestCreate case.
Add a test case of create with rv set.

Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-10-16 08:44:34 -07:00
AxeZhan
5c0618b848 codegen 2023-10-16 19:50:33 +08:00
Kubernetes Prow Robot
4254a77c21 Merge pull request #121249 from pohly/klog-call-fixes
fix invalid log calls
2023-10-16 13:14:01 +02:00
Patrick Ohly
957adfac49 fix invalid log calls
These were found with a modified klog that enables "go vet" to check klog call
parameters:

    cmd/kubeadm/app/features/features.go:149:4: printf: k8s.io/klog/v2.Warningf format %t has arg v of wrong type string (govet)
    			klog.Warningf("Setting deprecated feature gate %s=%t. It will be removed in a future release.", k, v)
    test/images/sample-device-plugin/sampledeviceplugin.go:147:5: printf: k8s.io/klog/v2.Errorf does not support error-wrapping directive %w (govet)
    				klog.Errorf("error: %w", err)
    test/images/sample-device-plugin/sampledeviceplugin.go:155:3: printf: k8s.io/klog/v2.Errorf does not support error-wrapping directive %w (govet)
    		klog.Errorf("Failed to add watch to %q: %w", triggerPath, err)
    staging/src/k8s.io/code-generator/cmd/prerelease-lifecycle-gen/prerelease-lifecycle-generators/status.go:207:5: printf: k8s.io/klog/v2.Fatalf does not support error-wrapping directive %w (govet)
    				klog.Fatalf("Package %v: unsupported %s value: %q :%w", i, tagEnabledName, ptag.value, err)
    staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go:286:3: printf: (k8s.io/klog/v2.Verbose).Infof format %s reads arg #1, but call has 0 args (govet)
    		klog.V(4).Infof("Node %s missing in vSphere cloud provider cache, trying node informer")
    staging/src/k8s.io/legacy-cloud-providers/vsphere/nodemanager.go:302:3: printf: (k8s.io/klog/v2.Verbose).Infof format %s reads arg #1, but call has 0 args (govet)
    		klog.V(4).Infof("Node %s missing in vSphere cloud provider caches, trying the API server")
2023-10-16 10:21:07 +02:00
Yao Cheng
18c3b6fce4 Register metrics for apiserver handlers
Signed-off-by: Yao Cheng <chengyao09@hotmail.com>
2023-10-16 02:06:01 +00:00
HirazawaUi
1132fd0afd add tcp_fin_timeout, tcp_keepalive_intvl and tcp_keepalive_probes to safe sysctls 2023-10-15 23:05:40 +08:00
AxeZhan
9327f3a173 api changes 2023-10-15 13:32:54 +08:00
Kubernetes Prow Robot
c40bc8c7d8 Merge pull request #120503 from dgrisonnet/body-size
Rename request body size metric to conform with Prometheus best practices
2023-10-15 05:55:39 +02:00
Kubernetes Prow Robot
4d8a51acac Merge pull request #121229 from aojea/remove_cluster_cidr
remove ClusterCIDR alpha API
2023-10-15 02:56:33 +02:00
Kubernetes Prow Robot
cf54acce5c Merge pull request #120274 from danwinship/kube-proxy-config-docs
kube-proxy config/CLI doc fixups
2023-10-15 02:56:24 +02:00
Kubernetes Prow Robot
4a94a570bd Merge pull request #121182 from cpanato/update-rulz
Update publishing-bot rules for active release branches that uses go120 to Go 1.20.10
2023-10-14 23:50:46 +02:00
Kubernetes Prow Robot
43e617f252 Merge pull request #120248 from pacoxu/grpc-container-probe
remove feature gate GRPCContainerProbe
2023-10-14 23:50:20 +02:00
Kubernetes Prow Robot
e0426ffd62 Merge pull request #118806 from abhigyadufare/patch-1
Error Typofix
2023-10-14 23:49:43 +02:00
Kubernetes Prow Robot
52cba2d8d8 Merge pull request #117411 from tenzen-y/add-multiply-method
quantity: Add multiplication methods
2023-10-14 23:49:26 +02:00
Kubernetes Prow Robot
f07df93ffb Merge pull request #119566 from haircommander/cri-owners
cri-api: add CRI implementation maintainers as approvers
2023-10-14 22:42:15 +02:00
Antonio Ojea
c2d473f0d4 remove ClusterCIDR
KEP-2593 proposed to expand the existing node-ipam controller
to be configurable via a ClusterCIDR objects, however, there
were reasonable doubts on the SIG about the feature and after
several months of dicussions we decided to not move forward
with the KEP intree, hence, we are going to remove the existing
code, that is still in alpha.

https://groups.google.com/g/kubernetes-sig-network/c/nts1xEZ--gQ/m/2aTOUNFFAAAJ

Change-Id: Ieaf2007b0b23c296cde333247bfb672441fe6dfc
2023-10-14 19:06:22 +00:00
Kubernetes Prow Robot
b87cae907d Merge pull request #121001 from jiahuif-forks/feature/validating-admission-policy/typed-composition-variables
ValidatingAdmissionPolicy: typed variables support.
2023-10-14 01:55:43 +02:00
Kubernetes Prow Robot
088f8c0ec5 Merge pull request #121096 from alexzielenski/common-schema
add rest of accessors to common.Schema
2023-10-14 00:00:54 +02:00
Alexander Zielenski
fb1fc8b4a7 ratcheting: disable correlation by index
discussion: https://github.com/kubernetes/kubernetes/pull/121118#discussion_r1358865893
2023-10-13 14:36:46 -07:00
Alexander Zielenski
d991ed56c2 comments: clear up correlateOldValueForChildAtNewIndex godoc 2023-10-13 14:11:02 -07:00
Alexander Zielenski
0ed67c9e41 cleanup: use swtich in CachedDeepEqual and add more comments 2023-10-13 14:05:47 -07:00
Alexander Zielenski
60c90fc085 cleanup: consistently support nil receiver and document 2023-10-13 13:57:55 -07:00
Alexander Zielenski
abb68591af cleanup: clarify correlatedOldValueForChildAtNewIndex comment 2023-10-13 13:54:53 -07:00
Yuki Iwai
ddcbae734a Add a 0 × 0 case
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-10-14 05:54:15 +09:00
Yuki Iwai
fb2e28b070 Verify more carefully the results in the TestInt64AmountMul
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-10-14 05:53:45 +09:00
Siyuan Zhang
26a4e06c92 k8s.io/apiserver/storage: add 3 new unit tests for delete.
Signed-off-by: Siyuan Zhang <sizhang@google.com>
2023-10-13 13:51:28 -07:00
Alexander Zielenski
e1fa1df3ae cleanup: consistent interface{} and any 2023-10-13 13:50:52 -07:00
Alexander Zielenski
0495616230 cleanup: add godoc 2023-10-13 13:50:19 -07:00
Yuki Iwai
4de3e73b8a Add test cases for mostPositive and mostNegative
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-10-14 04:42:28 +09:00
Yuki Iwai
685ae02433 Add more unit tests
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-10-14 04:42:28 +09:00
Yuki Iwai
79325b6178 Multiply by a scalar
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-10-14 04:42:28 +09:00
Yuki Iwai
4381eb7237 quantity: Add multiplication methods
Add multiplication functionality to Quantity.

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
2023-10-14 04:42:28 +09:00
Kubernetes Prow Robot
0851995a61 Merge pull request #121158 from siyuanfoundation/test-list
k8s.io/apiserver/storage: add some ResourceVersion validation in GetList unit tests.
2023-10-13 15:46:52 +02:00
Kubernetes Prow Robot
86ba008787 Merge pull request #120990 from tkashem/fix-race-apf-test
APF: fix data race in unit tests
2023-10-13 14:37:30 +02:00
Kubernetes Prow Robot
b40f1c00e2 Merge pull request #121203 from enj/enj/i/h2_dos_flake
Skip TestUnauthenticatedHTTP2ClientConnectionClose http1 tests
2023-10-13 05:03:05 +02:00
Kubernetes Prow Robot
a7f8c2f787 Merge pull request #118846 from cyclinder/net.ipv4.tcp_keepalive_time
Mark net.ipv4.tcp_keepalive_time as a safe sysctl
2023-10-13 05:02:51 +02:00
Monis Khan
cd5db9b7f2 Skip TestUnauthenticatedHTTP2ClientConnectionClose http1 tests
These occasionally flake on CI:

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/121200/pull-kubernetes-unit-go-compatibility/1712589824344461312

=== Failed
=== FAIL: vendor/k8s.io/apiserver/pkg/endpoints/filters TestUnauthenticatedHTTP2ClientConnectionClose/other_skip=true/http/1.1 (0.19s)
    authentication_test.go:653: expect TCP connection: 1, actual: 2
        --- FAIL: TestUnauthenticatedHTTP2ClientConnectionClose/other_skip=true/http/1.1 (0.19s)

=== FAIL: vendor/k8s.io/apiserver/pkg/endpoints/filters TestUnauthenticatedHTTP2ClientConnectionClose/other_skip=true (0.23s)
    --- FAIL: TestUnauthenticatedHTTP2ClientConnectionClose/other_skip=true (0.23s)

=== FAIL: vendor/k8s.io/apiserver/pkg/endpoints/filters TestUnauthenticatedHTTP2ClientConnectionClose (2.30s)

Signed-off-by: Monis Khan <mok@microsoft.com>
2023-10-12 19:13:07 -04:00
Alexander Zielenski
4dedabf2a6 test: fix boilerplate 2023-10-12 15:51:25 -07:00
Kubernetes Prow Robot
cb713c15e9 Merge pull request #121120 from enj/enj/i/h2_dos
Prevent rapid reset http2 DOS on API server
2023-10-13 00:05:46 +02:00
Monis Khan
800a8eaba7 Prevent rapid reset http2 DOS on API server
This change fully addresses CVE-2023-44487 and CVE-2023-39325 for
the API server when the client is unauthenticated.

The changes to util/runtime are required because otherwise a large
number of requests can get blocked on the time.Sleep calls.

For unauthenticated clients (either via 401 or the anonymous user),
we simply no longer allow such clients to hold open http2
connections.  They can use http2, but with the performance of http1
(with keep-alive disabled).

Since this change has the potential to cause issues, the
UnauthenticatedHTTP2DOSMitigation feature gate can be disabled to
remove this protection (it is enabled by default).  For example,
when the API server is fronted by an L7 load balancer that is set up
to mitigate http2 attacks, unauthenticated clients could force
disable connection reuse between the load balancer and the API
server (many incoming connections could share the same backend
connection).  An API server that is on a private network may opt to
disable this protection to prevent performance regressions for
unauthenticated clients.

For all other clients, we rely on the golang.org/x/net fix in
b225e7ca6d
That change is not sufficient to adequately protect against a
motivated client - future changes to Kube and/or golang.org/x/net
will be explored to address this gap.

The Kube API server now uses a max stream of 100 instead of 250
(this matches the Go http2 client default).  This lowers the abuse
limit from 1000 to 400.

Signed-off-by: Monis Khan <mok@microsoft.com>
2023-10-12 16:54:07 -04:00
Kubernetes Prow Robot
1cc9479720 Merge pull request #121189 from nilekhc/validation-doc
[KMSv2] chore: updates api doc
2023-10-12 22:49:35 +02:00
Kubernetes Prow Robot
e93e8eac0e Merge pull request #120735 from Jefftree/request-body
Bump kube-openapi with v3 marshal and requestBody required marking
2023-10-12 22:49:25 +02:00
Kubernetes Prow Robot
8923c3c871 Merge pull request #119659 from kannon92/beta-pod-ready-to-start
[KEP-3085] Promote PodReadyToStartContainers to beta in 1.29
2023-10-12 22:49:16 +02:00
Kubernetes Prow Robot
32ea66d524 Merge pull request #121159 from siyuanfoundation/getCurrentState
k8s.io/apiserver/storage/etcd: refactor getCurrentState.
2023-10-12 21:45:00 +02:00
Kubernetes Prow Robot
d4a6a674de Merge pull request #120976 from tengqm/fix-audit-apidoc
Fix API docs for audit APIs
2023-10-12 20:00:58 +02:00