Commit Graph

117593 Commits

Author SHA1 Message Date
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
Patrick Ohly
1db11c07ff node authorizer: limit kubelet access to ResourceClaim objects
As discussed during the KEP and code review of dynamic resource allocation for
Kubernetes 1.26, to increase security kubelet should only get read access to
those ResourceClaim objects that are needed by a pod on the node.

This can be enforced easily by the node authorizer:
- the names of the objects are defined by the pod status
- there is no indirection as with volumes (pod -> pvc -> pv)

Normally the graph only gets updated when a pod is not scheduled yet.
Resource claim status changes can still happen after that, so they
also must trigger an update.
2023-07-13 08:35:12 +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
SataQiu
148acc8632 enable arm64 support for GCE node configuration 2023-07-13 14:16:46 +08:00
Mike Spreitzer
75186b1c32 Fix, deprecate apiserver_flowcontrol_request_concurrency_limit
Because it is redundant and has a bad name and its HELP string was
outdated.

Also note intended retention period for request_concurrency_in_use.

Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
2023-07-13 01:50:37 -04:00
vadasambar
c52911e59a docs: add comment describing LoadConfigFromFile 2023-07-13 09:59:39 +05:30
vadasambar
5c18810f35 chore: update license date for configfile tests 2023-07-13 09:59:39 +05:30
vadasambar
72aeb96132 test: add tests for LoadConfigFromFile 2023-07-13 09:59:39 +05:30
vadasambar
b3373ae273 refactor: make only LoadConfigFromFile public
- `loadConfig` can be made public again when needed (not required now)
2023-07-13 09:59:39 +05:30
vadasambar
8e284389a5 feat: make loadConfig and loadConfigFile public functions
- so that users who import kube-scheduler libraries can use these functions to read kube scheduler config
2023-07-13 09:59:39 +05:30
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
Kubernetes Prow Robot
4af23c157c
Merge pull request #119242 from carlory/add-logger
change the QueueingHintFn to pass a logger
2023-07-12 13:03:31 -07:00
Kubernetes Prow Robot
79c02ceb73
Merge pull request #119154 from aimuz/fix-119152
fix: Add "metav1.CauseType" to "field.ErrorType" map
2023-07-12 12:01:11 -07:00
Kubernetes Prow Robot
e3fe07e322
Merge pull request #119243 from dprotaso/standard-app-protocol
Update standard app protocols
2023-07-12 10:58:00 -07:00
Kubernetes Prow Robot
374866eaf0
Merge pull request #119226 from enj/enj/i/kms_owners
Add enj to apiserver options approver
2023-07-12 10:57:52 -07:00
Kubernetes Prow Robot
1f117fc72e
Merge pull request #119108 from sttts/sttts-restrcore-split-generic-file
kube-apiserver/corerest: split apart generic code
2023-07-12 10:57:44 -07:00
Kubernetes Prow Robot
047d040ce7
Merge pull request #119012 from pohly/dra-batch-node-prepare
kubelet: support batched prepare/unprepare in v1alpha3 DRA plugin API
2023-07-12 10:57:37 -07:00
Kubernetes Prow Robot
2ec4e14bfa
Merge pull request #118812 from serathius/storage-metric
Improve apiserver storage size metric
2023-07-12 10:57:26 -07:00
Kubernetes Prow Robot
ac07b4612e
Merge pull request #117804 from jsafrane/fix-csi-attachable-reconstruction
Fix reconstruction of CSI volumes
2023-07-12 10:57:15 -07:00
carlory
0599b3caa0 change the QueueingHintFn to pass a logger 2023-07-13 00:56:41 +08:00
Kubernetes Prow Robot
be13c6a884
Merge pull request #118508 from serathius/kep2340
Implement Alpha state for KEP #2340
2023-07-12 09:33:11 -07:00
Marek Siarkowicz
39bb8f4bb1 Implement ConsistentListFromCache feature gate
Request bookmark every 100ms when there is at least one request blocked on revision not present in watch cache.
2023-07-12 17:26:17 +02:00
Amine
0695853a30 Improve naming and code comments 2023-07-12 16:20:14 +01:00
Patrick Ohly
08d40f53a7 dra: test with and without immediate ReservedFor
The recommendation and default in the controller helper code is to set
ReservedFor to the pod which triggered delayed allocation. However, this
is neither required nor enforced. Therefore we should also test the fallback
path were kube-scheduler itself adds the pod to ReservedFor.
2023-07-12 16:57:17 +02:00
Patrick Ohly
98ba89d31d resourceclaim controller: avoid caching deleted pod unnecessarily
We don't need to remember that a pod got deleted when it had no resource claims
because the code which checks the cached UIDs only checks for pods which have
resource claims.
2023-07-12 16:57:17 +02:00
Amine
28b6c90696 Move DeleteFunc logging to level 2 2023-07-12 15:50:40 +01:00
Amine
761016482d Properly setup mutatingWebhookConfigurationManager{} 2023-07-12 15:50:40 +01:00
Amine
747dbd9b6b run ./hack/verify-gofmt.sh 2023-07-12 15:50:16 +01:00
Amine
1eb60939fe Add smart reload for MutatingWebhooks 2023-07-12 15:50:16 +01:00
Amine
aeefb762ec Properly handle parameter in shareInformer.DeleteFunc 2023-07-12 15:50:16 +01:00
Amine
a01a8cb07e Fix webhook accessors caching pattern 2023-07-12 15:50:16 +01:00
Amine
7d3d44af77 Add webhookAccessors smart reloads unit tests
This patch adds few unit tests to assert that the webhook accessors are
only recreate when they are update in the api-server.

In order to test this feature we had to make few changes to wb manager
that allows us to mock `NewValidatingWebhookAccessor` external function.
2023-07-12 15:50:16 +01:00
Amine
c6f36e8702 Fix deadlock issue
This patch fixes the deadlock issue by using a map to cache already
initiated Webhooks instead of using `needRefresh` map.
2023-07-12 15:50:16 +01:00
Amine
99875b3fb7 Webhook Accessors Smart Recompilation
Addresses https://github.com/kubernetes/kubernetes/issues/116588

This is an WIP patch trying to avoid recompiling CELs expressions when
recreation Validating/Mutating WebhookAccessors.

Maybe we should also concider using generatic.Controller from
5f59f44983/staging/src/k8s.io/apiserver/pkg/admission/plugin/validatingadmissionpolicy/internal/generic/controller.go
2023-07-12 15:50:14 +01:00
Kubernetes Prow Robot
da2d500c80
Merge pull request #119252 from serathius/flakes
Fix TestConditionalProgressRequester and TestWaitUntilFreshAndListTimeout flakes
2023-07-12 07:49:26 -07:00
Kubernetes Prow Robot
be222f38f0
Merge pull request #119058 from TommyStarK/dra-state-checkpoint-unit-test
dynamic resource allocation: Improve code coverage of state checkpoint
2023-07-12 07:49:14 -07:00
Patrick Ohly
7d064812bb kube-controller-manager: finish conversion to contextual logging
This removes all exceptions and fixes the remaining unconverted log calls.
2023-07-12 14:57:29 +02:00
Kubernetes Prow Robot
3cc729fc7f
Merge pull request #119195 from pohly/dra-reallocate-flake
dra e2e: fix "reallocation works" flake
2023-07-12 05:55:25 -07:00
Kubernetes Prow Robot
529eeb78ef
Merge pull request #119078 from pohly/dra-scheduler-queueing-hints
dra: scheduler queueing hints
2023-07-12 05:55:13 -07:00
Patrick Ohly
d743c50bb9 kubelet: support batched prepare/unprepare in v1alpha3 DRA plugin API
Combining all prepare/unprepare operations for a pod enables plugins to
optimize the execution. Plugins can continue to use the v1beta2 API for now,
but should switch. The new API is designed so that plugins which want to work
on each claim one-by-one can do so and then report errors for each claim
separately, i.e. partial success is supported.
2023-07-12 14:50:30 +02:00
Marek Siarkowicz
7a63997c8a Improve apiserver storage size metric to allow it's graduation
Change name to make it compliant with prometheus guidelines.
Calculate it on demand instead of periodic to comply with prometheus standards.
Replace "endpoint" with "server" label to make it semantically consistent with storage factory
2023-07-12 14:33:10 +02:00
dprotaso
610509fedd Update standard app protocols
Add websocket support - see https://github.com/kubernetes/enhancements/pull/3996
2023-07-12 08:28:50 -04:00
Dr. Stefan Schimanski
f1f2fa9da8
kube-apiserver/corerest: split apart generic code 2023-07-12 14:13:10 +02:00
Francesco Romani
01c3a51a78 node: podresources: getallocatable: move to GA
lock the feature gate to GA, and remove the now-redundant code.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-07-12 14:11:22 +02:00
Marek Siarkowicz
c1decb6763 Fix TestConditionalProgressRequester and TestWaitUntilFreshAndListTimeout flakes 2023-07-12 14:03:32 +02:00
Kubernetes Prow Robot
0da0b7a85d
Merge pull request #119251 from soltysh/issue119230
Match both old and new kubectl version for a while in e2e
2023-07-12 04:51:12 -07:00
Patrick Ohly
1b8ddf6b79 podgc controller: convert to contextual logging 2023-07-12 13:45:10 +02:00