Commit Graph

117807 Commits

Author SHA1 Message Date
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
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
Jordan Liggitt
12a874d227
Preserve resourcequota informers for groups with discovery resolution errors only 2023-07-12 12:29:33 -04:00
Jordan Liggitt
c9a084d59c
Fix duplicate GC event handlers getting added if discovery flutters 2023-07-12 12:29:31 -04:00
Jordan Liggitt
733f63c6c4
Add GroupDiscoveryFailedErrorGroups helper method 2023-07-12 12:19:06 -04: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