Commit Graph

117286 Commits

Author SHA1 Message Date
Fabio Bertinatto
d9bd413f99 Proactively bump golang.org/x/net to v0.12.0
Proactively bump to v0.12.0 to avoid v0.10.0 and v0.11.0, which contain
a regression added by commit
82780d606d.
This commit was later reverted in v0.12.0.

Generated with:

hack/pin-dependency.sh golang.org/x/net v0.12.0 && hack/update-vendor.sh
2023-07-14 13:27:38 -03:00
Kubernetes Prow Robot
95c8d61918
Merge pull request #113583 from chendave/POC_resetCfg
kubeadm: implementation of `ResetConfiguration` API types
2023-07-14 04:05:48 -07:00
Dave Chen
2a907e6004 kubeadm: fix fuzzing for ResetConfiguration
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-07-14 17:03:37 +08:00
Dave Chen
2e6715bc77 kubeadm: implementation of ResetConfiguration API types
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-07-14 17:03:31 +08:00
Kubernetes Prow Robot
e3bc35bc1b
Merge pull request #119008 from nilekhc/hotreload-update-metrics
[KMSv2] feat: implements metrics for encryption config hot reload
2023-07-13 23:08:00 -07:00
Kubernetes Prow Robot
18e0e668ca
Merge pull request #118933 from wojtek-t/apf_watchlist_support
Add support for watchlist to APF
2023-07-13 23:07:49 -07:00
Kubernetes Prow Robot
5c72df7281
Merge pull request #118953 from mskrocki/escLib
Convert EndpointSlice Reconciler to a library in staging.
2023-07-13 17:13:34 -07:00
Jiahui Feng
b635f2a401
ValidatingAdmissionPolicy: Variable Composition (#118642)
* [API REVIEW] Variable Composition

* lazy map.

* variable composition implementation.

* check variables during VAP validation.

* generated: ./hack/update-vendor.sh

* generated: UPDATE_COMPATIBILITY_FIXTURE_DATA

(cd staging/src/k8s.io/api/ && env UPDATE_COMPATIBILITY_FIXTURE_DATA=true go test)

* cost calucation.

* tests for cost calculations.

* e2e test for variables.

* fix doc for Validation.Expression.

* generated: ./hack/update-codegen.sh

* fix missing utilruntime import.

* generated: ./hack/update-openapi-spec.sh
2023-07-13 17:13:28 -07:00
Kubernetes Prow Robot
1e21da87b8
Merge pull request #118988 from nilekhc/hash-keyid
[KMSv2] chore: hashes keyID being logged
2023-07-13 15:47:48 -07:00
Kubernetes Prow Robot
be2cfc9697
Merge pull request #118228 from carlory/move-non-graceful-node-shutdown-to-GA
move non-graceful node shutdown to GA
2023-07-13 15:47:37 -07:00
Kubernetes Prow Robot
8839d08fc2
Merge pull request #119305 from deads2k/for-api
allow api-approvers to approve directories touched by generation
2023-07-13 14:44:04 -07:00
Alex Zielenski
423f4dfc79
Add quantity library to CEL (#118803)
* add quantity library to CEL

* add more tests to quantity

* use 1.29 env for quantity

* set CEL default env to 1.28 for 1.28 release

* add compare function

* docs and arith lib

* fixup addInt and subInt overload, add docs

* more tests

* cleanup docs

* remove old comments

* remove unnecessary cast

* add isInteger

* add overflow tests

* boilerplate

* refactor expectedResult for tests

* doc typo fix

* returns bool

* add docs link

* different dos link

* add isInteger true case

* expand iff

* add quantity back to 1.28 version, and revert change to DefaultCompatibilityVersion

* formatting
2023-07-13 14:43:56 -07:00
Kubernetes Prow Robot
fc798a8dc1
Merge pull request #118520 from jpbetz/validate-unique
Add merge map key validation to StorageVersions
2023-07-13 14:43:49 -07:00
Kubernetes Prow Robot
bea27f82d3
Merge pull request #118209 from pohly/dra-pre-scheduled-pods
dra: pre-scheduled pods
2023-07-13 14:43:37 -07:00
Kubernetes Prow Robot
1db4658614
Merge pull request #119295 from jsafrane/remove-serial-localvolume
Remove test Pods sharing a single local PV
2023-07-13 13:43:21 -07:00
Nilekh Chaudhari
131216fa8f
chore: hashes keyID
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-07-13 20:42:09 +00:00
Kubernetes Prow Robot
adbc309123
Merge pull request #119288 from danwinship/proxy-testing-cleanup
minor proxy unit testing cleanups
2023-07-13 13:42:05 -07:00
Jiahui Feng
049614f884
ValidatingAdmissionPolicy controller for Type Checking (#117377)
* [API REVIEW] ValidatingAdmissionPolicyStatucController config.

worker count.

* ValidatingAdmissionPolicyStatus controller.

* remove CEL typechecking from API server.

* fix initializer tests.

* remove type checking integration tests

from API server integration tests.

* validatingadmissionpolicy-status options.

* grant access to VAP controller.

* add defaulting unit test.

* generated: ./hack/update-codegen.sh

* add OWNERS for VAP status controller.

* type checking test case.
2023-07-13 13:41:50 -07:00
Kubernetes Prow Robot
a9e40bd7c6
Merge pull request #114307 from rphillips/promote_probe_termination_grace_period
ProbeTerminationGracePeriod promote to GA
2023-07-13 13:41:38 -07:00
Nilekh Chaudhari
c291e6355c
feat: implements metrics for encryption config hot reload
Signed-off-by: Nilekh Chaudhari <1626598+nilekhc@users.noreply.github.com>
2023-07-13 20:08:27 +00:00
Kubernetes Prow Robot
3f1704dfbd
Merge pull request #119296 from pohly/dra-pod-resource-claim-status-validation
dra API: ensure that pod status contains no duplicate resource claims
2023-07-13 12:39:49 -07:00
Kubernetes Prow Robot
1d846a12da
Merge pull request #118804 from benluddy/authz-deferred-errors
CEL lib: Expose errors on authz decisions instead of raising them from check()
2023-07-13 12:39:37 -07:00
David Eads
be2e5417ea allow api-approvers to approve directories touched by generation 2023-07-13 15:27:53 -04:00
Patrick Ohly
80ab8f0542 dra: handle scheduled pods in kube-controller-manager
When someone decides that a Pod should definitely run on a specific node, they
can create the Pod with spec.nodeName already set. Some custom scheduler might
do that. Then kubelet starts to check the pod and (if DRA is enabled) will
refuse to run it, either because the claims are still waiting for the first
consumer or the pod wasn't added to reservedFor. Both are things the scheduler
normally does.

Also, if a pod got scheduled while the DRA feature was off in the
kube-scheduler, a pod can reach the same state.

The resource claim controller can handle these two cases by taking over for the
kube-scheduler when nodeName is set. Triggering an allocation is simpler than
in the scheduler because all it takes is creating the right
PodSchedulingContext with spec.selectedNode set. There's no need to list nodes
because that choice was already made, permanently. Adding the pod to
reservedFor also isn't hard.

What's currently missing is triggering de-allocation of claims to re-allocate
them for the desired node. This is not important for claims that get created
for the pod from a template and then only get used once, but it might be
worthwhile to add de-allocation in the future.
2023-07-13 21:27:11 +02:00
Patrick Ohly
cffbb1f1b2 dra controller: enhance testing
The allocation mode is relevant when clearing the reservedFor: for delayed
allocation, deallocation gets requested, for immediate allocation not. Both
should get tested.

All pre-defined claims now use delayed allocation, just as they would if
created normally.
2023-07-13 21:27:11 +02:00
Patrick Ohly
5cec6d798c dra: revamp event handlers in kube-controller-manager
Enabling logging is useful to track what the code is doing.

There are some functional changes:
- The pod handler checks for existence of claims. This
  avoids adding pods to the work queue in more cases
  when nothing needs to be done, at the cost of
  making the event handlers a bit slower. This will become
  more important when adding more work to the controller
- The handler for deleted ResourceClaim did not check for
  cache.DeletedFinalStateUnknown.
2023-07-13 21:27:11 +02:00
Kubernetes Prow Robot
4fa97eae1b
Merge pull request #119291 from mimowo/use-jobctx-for-first-pending
Pass Job context down to firstPendingIndexes
2023-07-13 09:57:05 -07:00
Kubernetes Prow Robot
d39965270e
Merge pull request #119286 from ardaguclu/remove-openapiv3-alpha-env
Remove KUBECTL_EXPLAIN_OPENAPIV3 environment variable
2023-07-13 09:56:57 -07:00
Ricardo Katz
c688478a28
Fix lifecycle generator to check the version correctly (#119268)
* Fix lifecycle generator to check the version correctly

* Fix file header

Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>

---------

Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2023-07-13 09:56:49 -07:00
Kubernetes Prow Robot
20e60a03df
Merge pull request #110863 from claudiubelu/path-filepath-update-2
Replaces path.Operation with filepath.Operation (part 2)
2023-07-13 09:56:37 -07:00
Patrick Ohly
ddc0d94790 dra API: ensure that pod status contains no duplicate resource claims
This is a follow-up to https://github.com/kubernetes/kubernetes/pull/117351
which just got merged.
2023-07-13 18:41:40 +02:00
Jan Safranek
052b06bdad Remove test Pods sharing a single local PV
The test runs two pods accessing the same local volume, which is duplicate
with "Two pods mounting a local volume at the same time" test.
2023-07-13 18:33:18 +02:00
Kubernetes Prow Robot
eee56d56ed
Merge pull request #119219 from cpanato/update-prombot
Update publishing-bot rules for release branches to Go 1.20.5
2023-07-13 08:40:49 -07:00
Kubernetes Prow Robot
d37c62dcbf
Merge pull request #117800 from cyclinder/loggin_format
Add '--logging-format' flag to kube-proxy
2023-07-13 08:40:37 -07:00
Dan Winship
9914909f5a Define tcpProtocol in one place in the unit tests rather than many 2023-07-13 10:26:33 -04:00
Dan Winship
967ef29378 Remove/clarify two FIXME comments in the proxier unit test
When I first wrote TestInternalExternalMasquerade, I put "FIXME"
comments in all of the cases that seemed wrong to me, most of which
got removed as we fixed the corner cases. But there were two cases
where we decided that the implemented behavior, though odd, was
correct, and those FIXMEs never got removed.
2023-07-13 10:26:29 -04:00
Dan Winship
1437594786 Remove some stray references to the ProxyTerminatingEndpoints feature gate
All the code to deal with enabling/disabling the feature gate is gone,
but some of the tests were still specifying "this test case assumes
PTE is enabled".
2023-07-13 10:26:25 -04:00
Michal Wozniak
7e3b53042b Pass Job context down to firstPendingIndexes 2023-07-13 16:11:06 +02:00
Kubernetes Prow Robot
cd9215915b
Merge pull request #118480 from carlory/gc_metrics
podgc metrics should count all pod deletion behaviors
2023-07-13 06:52:05 -07:00
Dan Winship
4835d9e137 Belatedly clean up some "Endpoints" vs "EndpointSlice" distinctions in the unit tests
Remove "EndpointSlice" from some unit test names, because they don't
need to clarify that they use EndpointSlices now, because all of the
tests use EndpointSlices now.

Likewise, remove TestEndpointSliceE2E entirely; it was originally an
EndpointSlice version of one of the other tests, but the other test
uses EndpointSlices now too.
2023-07-13 09:41:32 -04:00
Kubernetes Prow Robot
2d6d2b938a
Merge pull request #119271 from aojea/servicedefault_informer
controlplane: kubernetes.default controller stop polling
2023-07-13 05:52:05 -07:00
Arda Güçlü
4d8f569b03 Remove KUBECTL_EXPLAIN_OPENAPIV3 environment variable
Since explain openapiv3 has been moved to beta already, there is no
point to having this environment variable.

This PR removes it.
2023-07-13 13:44:43 +03:00
Antonio Ojea
c5147c91b8 controlplane: kubernetes.default controller stop polling
the kubernetesservice controller is in charge of reconciling the
kubernetes.default service with the first IP in the service CIDR range
and port 443, it also maintains the Endpoints associated to the Service
using the configure EndpointReconciler.

Until now, the controller was creating the default namespace if it
doesn't exist , and creating the kubernetes.default service if it
doesn't exist too. However, it was polling the Service in each loop,
with this change we reuse the apiserver informers to watch the Service
instead of polling.

It also removes the logic to create the default network namespace, since
this is part of the systemnamespaces controller now.

Change-Id: I70954f8e6309e7af8e4b749bf0752168f0ec2c42
Signed-off-by: Antonio Ojea <aojea@google.com>
2023-07-13 10:41:06 +00:00
Kubernetes Prow Robot
56b5f05aea
Merge pull request #119278 from r4f4/azure-fix-cloud-err-detection
test: azure: check error for cloud detection.
2023-07-13 01:28:07 -07:00
Rafael Fonseca
9f5b6db8be test: azure: check error for cloud detection.
If something goes wrong during the Azure cloud detection, trying to cast
the returned value will result in the following panic and give no clue
as to what the error was.

```
  panic: interface conversion: cloudprovider.Interface is nil, not *azure.Cloud

goroutine 1 [running]:
k8s.io/kubernetes/test/e2e/framework/providers/azure.newProvider()
	test/e2e/framework/providers/azure/azure.go:50 +0x2b5
k8s.io/kubernetes/test/e2e/framework.SetupProviderConfig({0xc0007966b8, 0x5})
	test/e2e/framework/provider.go:82 +0x1a6
```
2023-07-13 09:04:24 +02:00
cyclinder
71ef0dafa7 add flag 'logging-format' to kube-proxy 2023-07-13 14:33:33 +08:00
cyclinder
c550c17f7f accept int or string flush frequency 2023-07-13 14:33:33 +08:00
Kubernetes Prow Robot
406d2dfe61
Merge pull request #119250 from pohly/controller-contextual-logging
kube-controller-manager: finish conversion to contextual logging
2023-07-12 18:59:30 -07:00
Kubernetes Prow Robot
70370d0210
Merge pull request #117731 from jongwooo/refactor/use-early-return-pattern
Use early return pattern to avoid nested conditions
2023-07-12 17:59:41 -07:00
Kubernetes Prow Robot
0086712926
Merge pull request #116922 from sourcelliu/checkpoint
Improve the performance of map usage
2023-07-12 17:59:30 -07:00