Commit Graph

46990 Commits

Author SHA1 Message Date
Alex Wang
199c37acef feat: update matchLabelKeys comment and code auto-generate
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 23:51:50 +08:00
Jan Safranek
a53c6f1dc8 Add validation of CSIDriver.SELinuxMount 2023-03-14 16:49:55 +01:00
Aravindh Puthiyaparambil
26279a5282
kubelet: Add validation for EnableNodeLogQuery 2023-03-14 08:45:20 -07:00
Aravindh Puthiyaparambil
aadad09410
api: Add EnableNodeLogQuery to KubeletConfiguration
Added EnableNodeLogQuery field to kubelet/apis/config/types.go and
staging/src/k8s.io/kubelet/config/v1beta1/types.go, then executed.
 `hack/update-codegen.sh`.

This new field will default to off and will need to be explicitly
enabled in addition to the NodeLogQuery gate to use the feature.
2023-03-14 08:45:19 -07:00
Aravindh Puthiyaparambil
d52cbd4a5a
feature: Add NodeLogQuery feature gate
Enable the query endpoint only if this gate is enabled in addition to
the EnableNodeLogQuery kubelet config option.
2023-03-14 08:45:18 -07:00
Kubernetes Prow Robot
a9008b502d
Merge pull request #116577 from jsafrane/fix-standalone-mode
Fix volume reconstruction in standalone mode
2023-03-14 08:37:02 -07:00
Kubernetes Prow Robot
204a9a1f17
Merge pull request #116459 from ffromani/podresources-ratelimit-minimal
add podresources DOS prevention using rate limit
2023-03-14 08:36:45 -07:00
Kubernetes Prow Robot
2bd69db8d7
Merge pull request #116351 from vinaykul/restart-free-pod-vertical-scaling-kubelet-fix-followup
Initialize pod resource allocation checkpoint manager to noop
2023-03-14 08:36:37 -07:00
Alex Wang
8a1f9f43e6 feat: validate matchLabelKeys when labelSelector isn't set
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 22:36:41 +08:00
Divyen Patel
eca25d9e12 lock CSIMigrationvSphere feature gate 2023-03-14 19:57:57 +05:30
Jan Safranek
a84dc2d5c5 Flip SELinuxMountReadWriteOncePod to Beta
And enable all e2e tests by default. They're still behind
`[Feature:SELinux]` tag to ensure the underlying OS supports SELinux.
2023-03-14 14:32:38 +01:00
Humble Chirammal
92f59b6323 Update NodeExpandSecretRef comment for beta
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
2023-03-14 17:57:24 +05:30
Jan Safranek
c4f8c3f628 Fix volume reconstruction in standalone mode
Kubelet in standalone mode won't have kubeclient, it cannot get node.status
and get devices from it. Such a kubelet cannot mount attachable volumes
anyway.
2023-03-14 12:32:21 +01:00
Patrick Ohly
e97531b349 api: extend validation of dynamic resource allocation fields in PodSpec
The generated ResourceClaim name and the names of the ResourceClaimTemplate and
ResourceClaim referenced by a pod must be valid according to the resource API,
otherwise the pod cannot start.

Checking this was removed from the original implementation out of concerns
about validating fields in core against limitations imposed by a separate,
alpha API.  But as this was pointed out again in
https://github.com/kubernetes/kubernetes/pull/116254#discussion_r1134010324
it gets added back.

The same strings that worked before still work now. In particular, the
constraints for a spec.resourceClaim.name are still the same (DNS label).
2023-03-14 11:58:41 +01:00
Kubernetes Prow Robot
c8f001d798
Merge pull request #114504 from vrutkovs/tracing-kubelet-toplevel
kubelet: create top-level traces for pod sync and GC
2023-03-14 03:12:16 -07:00
Patrick Ohly
2b8a4e8097 api: generated files for PodSchedulingContext 2023-03-14 10:18:08 +01:00
Patrick Ohly
fec5233668 api: resource.k8s.io PodScheduling -> PodSchedulingContext
The name "PodScheduling" was unusual because in contrast to most other names,
it was impossible to put an article in front of it. Now PodSchedulingContext is
used instead.
2023-03-14 10:18:08 +01:00
Kubernetes Prow Robot
0e06be57a6
Merge pull request #116299 from pohly/dra-v1alpha2
api: resource.k8s.io v1alpha1 -> v1alpha2
2023-03-14 02:15:08 -07:00
Mengjiao Liu
c512232782 Migrate pkg/scheduler/framework/plugins/defaultbinder to contextual logging 2023-03-14 17:02:25 +08:00
Kubernetes Prow Robot
921dfed168
Merge pull request #116566 from liggitt/fix-fuzzer
Fix StatefulSet fuzzer
2023-03-14 00:45:09 -07:00
Patrick Ohly
29941b8d3e api: resource.k8s.io v1alpha1 -> v1alpha2
For Kubernetes 1.27, we intend to make some breaking API changes:
- rename PodScheduling -> PodSchedulingHints (https://github.com/kubernetes/kubernetes/issues/114283)
- extend ResourceClaimStatus (https://github.com/kubernetes/enhancements/pull/3802)

We need to switch from v1alpha1 to v1alpha2 for that.
2023-03-14 07:52:03 +01:00
Kubernetes Prow Robot
152876a3eb
Merge pull request #115668 from jiahuif-forks/feature/validating-admission-policy/type-system
Type System for ValidatingAdmissionPolicy
2023-03-13 23:27:09 -07:00
Kubernetes Prow Robot
dfc63f218c
Merge pull request #116557 from smarterclayton/sync_known_race
kubelet: TestSyncKnownPods should not race
2023-03-13 22:27:24 -07:00
Kubernetes Prow Robot
59b11feadd
Merge pull request #116553 from thockin/pr-111942-takeover
API docs trivial typo
2023-03-13 22:27:16 -07:00
Jordan Liggitt
f7ab379489
Fix StatefulSet fuzzer 2023-03-14 01:19:12 -04:00
Kubernetes Prow Robot
0701e4b3b0
Merge pull request #116508 from tangwz/fix_PreFilter_and_PreScore_test_name
Avoid using negative words in PreFilter and PreScore tests.
2023-03-13 21:17:20 -07:00
Kubernetes Prow Robot
e3cf864279
Merge pull request #116502 from sourcelliu/removecast
Remove unnecessary int64 type conversion
2023-03-13 21:17:08 -07:00
Matthew Cary
74b8fc7534 Add statefulsets to v1beta1 default_test
Change-Id: Id68cdb2c9bb7b4ebe21597ead1926e02e3b491af
2023-03-13 20:35:00 -07:00
Alex Wang
08dfa41f17 fix: key in matchLabelKeys needs to be ignored when LabelSelector is nil
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2023-03-14 11:25:04 +08:00
mantuliu
42ddbb4276 Fix PreFilter logic problem in node affinity 2023-03-14 11:23:40 +08:00
Jiahui Feng
deb467261c generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh 2023-03-13 19:44:28 -07:00
Kubernetes Prow Robot
cd56332d06
Merge pull request #116501 from mattcary/ss-beta
Graduate StatefulSetAutoDelete to beta
2023-03-13 19:31:20 -07:00
Kubernetes Prow Robot
6b3e2b7873
Merge pull request #116397 from jiahuif-forks/feature/validating-admission-policy/message-expression
MessageExpression for ValidatingAdmissionPolicy
2023-03-13 19:31:08 -07:00
Rob Scott
e23af041f5
Introducing Topology Mode Annotation, Deprecating Topology Hints
Annotation

As part of this change, kube-proxy accepts any value for either
annotation that is not "disabled".

Change-Id: Idfc26eb4cc97ff062649dc52ed29823a64fc59a4
2023-03-14 02:23:11 +00:00
kidddddddddddddddddddddd
488d7650f4 update description 2023-03-14 09:42:41 +08:00
Kubernetes Prow Robot
e998b09bc4
Merge pull request #116555 from bart0sh/PR106-dra-plugin-constant
DRA: add constant PluginClientTimeout
2023-03-13 17:51:31 -07:00
Kubernetes Prow Robot
da20948492
Merge pull request #115621 from humblec/node-secret-beta
promote CSINodeExpandSecret feature to Beta
2023-03-13 17:51:24 -07:00
Kubernetes Prow Robot
781daea7b2
Merge pull request #115209 from dgrisonnet/cleanup-deprecated-metrics
Cleanup deprecated metrics
2023-03-13 17:51:12 -07:00
ZhangKe10140699
7198bcffcd daemonset: use contextual logging 2023-03-14 08:50:27 +08:00
杨军10092085
361e4ff0fa volume: use contextual logging 2023-03-14 08:37:30 +08:00
Matthew Cary
1d6df8233c Graduate StatefulSetAutoDelete to beta
Change-Id: Iee385580d313c69fbb8a893eb5c165aa0b75725d
2023-03-13 17:09:29 -07:00
Kubernetes Prow Robot
4641604be8
Merge pull request #116513 from klueska/dra-update-multipleplugins
Update DRAManager to allow multiple plugins to process a single claim
2023-03-13 16:49:14 -07:00
Kubernetes Prow Robot
110541b3d7
Merge pull request #116490 from tallclair/docs-urls2
Fix broken links in API documentation
2023-03-13 16:48:56 -07:00
Ed Bartosh
50cb3268b6 DRA: add constant PluginClientTimeout 2023-03-14 00:37:43 +02:00
Clayton Coleman
71a36529d1
kubelet: TestSyncKnownPods should not race
SyncKnownPods began triggering UpdatePod() for pods that have been
orphaned by desired config to ensure pods run to termination. This
test reads a mutex protected value while pod workers are running
in the background and as a consequence triggers a data race.

Wait for the workers to stabilize before reading the value. Other
tests validate that the correct sync events are triggered (see
kubelet_pods_test.go#TestKubelet_HandlePodCleanups for full
verification of this behavior).

It is slightly concerning that I was unable to recreate the race
locally even under stress testing, but I cannot identify why.
2023-03-13 16:24:37 -06:00
Kubernetes Prow Robot
611273a5bb
Merge pull request #115253 from danwinship/proxy-update-healthchecknodeport
Split out HealthCheckNodePort stuff from service/endpoint map Update()
2023-03-13 15:22:48 -07:00
Damien Grisonnet
ac394c5c19 Cleanup deprecated metrics
Remove the following deprecated metrics:
- node_collector_evictions_number
- scheduler_e2e_scheduling_duration_seconds

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-03-13 22:55:34 +01:00
Tim Hockin
35eb667e32
Update generated files 2023-03-13 14:45:33 -07:00
Rodrigo Campos
ec0410a266
kubelet: Move userns manager to its own package
To that end, we need to add one kubelet getter listPodsFromDisk(). Other
than that, it is a pretty trivial move.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-03-13 22:28:04 +01:00
Rodrigo Campos
16d76f6813
kubelet: Don't reserve mapping for userns phase II
Latest changes to KEP-127 removed that phase, so let's stop reserving
those IDs for that.

While we are there, we replace 0 for 0*65536 as before we had a bug that
we were not multiplying the index, to avoid bugs in the future.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-03-13 22:28:04 +01:00
Rodrigo Campos
8af3cce7fe
kubelet: remove GetHostIDsForPod()
Now KEP-127 relies on idmap mounts to do the ID translation and we won't
do any chowns in the kubelet.

This patch just removes the usage of GetHostIDsForPod() in
operationexecutor to do the chown, and also removes the
GetHostIDsForPod() method from the kubelet volume interface.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-03-13 22:28:03 +01:00
Giuseppe Scrivano
9075404dc4
kubelet: use idmapped mounts for all volumes
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2023-03-13 22:28:03 +01:00
Kubernetes Prow Robot
c237ddb226
Merge pull request #116045 from sanposhiho/sanposhiho/message
fix(HPA): make a difference in SuccessfulRescale  events between the resource metric and the container resource metric
2023-03-13 13:24:47 -07:00
Kubernetes Prow Robot
5cd7297148
Merge pull request #116540 from danwinship/conntrack-owners
copy pkg/proxy OWNERS to pkg/util/conntrack
2023-03-13 12:15:09 -07:00
Kubernetes Prow Robot
02a654a635
Merge pull request #116043 from sanposhiho/featuregate-check
fix(HPA): ignore the container resource metrics in HPA controller when the feature gate is disabled
2023-03-13 12:14:50 -07:00
Mark Rossetti
b3a67abec7
Updating perfCounterUpdatePerioud for Windows to 10 seconds
Signed-off-by: Mark Rossetti <marosset@microsoft.com>
2023-03-13 12:13:24 -07:00
Tim Allclair
ea974280dc Fix broken API docs URLs 2023-03-13 11:37:59 -07:00
Kubernetes Prow Robot
3106a5c553
Merge pull request #116301 from andyzhangx/remove-azuredisk-code
Remove Azure disk in-tree storage plugin
2023-03-13 10:38:48 -07:00
Kubernetes Prow Robot
3b1fc60d80
Merge pull request #116523 from pacoxu/CSIStorageCapacity-v1beta1-remove
Remove storage.k8s.io/v1beta1 API version of CSIStorageCapacity
2023-03-13 09:28:50 -07:00
Dan Winship
eaa0791b56 copy pkg/proxy OWNERS to pkg/util/conntrack 2023-03-13 11:20:36 -04:00
Kubernetes Prow Robot
a0b1bee7c5
Merge pull request #115840 from atosatto/remove-taint-manager-cli
Remove enable-taint-manager and pod-eviction-timeout CLI flags
2023-03-13 08:13:10 -07:00
Kubernetes Prow Robot
492a08c916
Merge pull request #113525 from 249043822/br-context-logging-deployment
deployment controller: use contextual logging
2023-03-13 08:13:02 -07:00
Kubernetes Prow Robot
34537c1a1d
Merge pull request #110864 from claudiubelu/adds-unittests
unittests: Adds winstats unittests
2023-03-13 08:12:50 -07:00
Kubernetes Prow Robot
9c5eebaf3f
Merge pull request #115879 from mtardy/scdeny-warning
`SecurityContextDeny` admission plugin: add warning on creation
2023-03-13 07:02:48 -07:00
Kevin Klues
685688c703 Update DRAManager to allow multiple plugins to process a single claim
Right now, the v1alpha1 API only passes enough information for one plugin to
process a claim, but the v1alpha2 API will allow for multiple plugins to
process a claim. This commit prepares the code for this upcoming change.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-13 12:52:41 +00:00
Kevin Klues
569ed33d78 Add additional tests to DRAManager checkpointing
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-13 12:52:41 +00:00
Kevin Klues
fd7370b84d Update DRAManager checkpoint to store a map for CDIDevices
The key of the map is the KubeletPluginName where the CDIDevices originate.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-13 12:52:41 +00:00
Kevin Klues
273a8ffad1 Rename CdiDevices to CDIDevices in dramanager checkpoint
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-13 12:52:41 +00:00
Claudiu Belu
e3edf13486 unittests: Adds winstats unittests
The module pkg/kubelet/winstats has almost no coverage for Windows. This
commit adds unit tests to cover the mentioned module.
2023-03-13 12:08:15 +00:00
Saza
d34b0275a3
dynamic resource allocation: add timeouts for communiction with plugin (#114844)
* add timeouts for communication with dra plugin

* move timeout constant to k8s.io/kubernetes/pkg/kubelet/cm/util

* move settings of timeout to pkg/kubelet/plugin/dra/plugin/client.go

* remove timeout constant
2023-03-13 04:34:56 -07:00
Kubernetes Prow Robot
185cd95b9c
Merge pull request #113443 from yangjunmyfm192085/namespace-contextual-logging
namespace controller: use contextual logging
2023-03-13 04:34:44 -07:00
ZhangKe10140699
66bda6c092 deployment controller: use contextual logging 2023-03-13 19:00:44 +08:00
mtardy
36a2156033 Add a SecurityContextDeny feature gate disabled by default
Put plugin registration behind the feature gate.
2023-03-13 10:18:08 +01:00
John Kwiatkoski
69465d2949
Adding test coverage for NewPodContainerManager() (#110220) 2023-03-13 02:08:44 -07:00
Paco Xu
49032c394c The storage.k8s.io/v1beta1 API version of CSIStorageCapacity will no longer be served in v1.27. 2023-03-13 15:06:04 +08:00
JunYang
f5bd8c86d4 namespace controller: use contextual logging 2023-03-13 14:59:17 +08:00
Kubernetes Prow Robot
16bc942a6b
Merge pull request #113464 from mengjiao-liu/contextual-logging-controller-bootstrap
Migrate `pkg/controller/bootstrap` to contextual logging
2023-03-12 20:12:42 -07:00
Mengjiao Liu
e56f3e0781 Migrate pkg/controller/bootstrap to contextual logging 2023-03-13 10:18:40 +08:00
vinay kulkarni
1e01358ea2 Initialize pod resource allocation checkpoint manager to noop
This avoids accidentally introducing null pointer access if manager
functions were called outside of InPlacePodVerticalScaling feature gate.
2023-03-13 00:16:44 +00:00
vinay kulkarni
06e1692371 Update generated files 2023-03-12 23:46:40 +00:00
vinay kulkarni
9a805db010 Set default resize policy only for specified resource types, rename RestartNotRequired -> NotRequired 2023-03-12 23:46:40 +00:00
vinay kulkarni
9411050448 Set default resource resize restart policy to RestartNotRequired 2023-03-12 23:46:39 +00:00
vinay kulkarni
c5130fb0d6 Restructure naming of resource resize restart policy - generated files 2023-03-12 23:46:39 +00:00
vinay kulkarni
8b23497ae7 Restructure naming of resource resize restart policy 2023-03-12 23:11:32 +00:00
Kubernetes Prow Robot
3c6e419cc3
Merge pull request #116450 from vinaykul/restart-free-pod-vertical-scaling-api
Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources
2023-03-12 16:06:40 -07:00
Kubernetes Prow Robot
a32050e6cb
Merge pull request #116201 from sanposhiho/metric-scheduling-gate
add(scheduler): implement "plugin_execution_duration_seconds" metric in PreEnqueue
2023-03-12 13:52:40 -07:00
Kubernetes Prow Robot
a4a0fd44d8
Merge pull request #115912 from moshe010/dra-checkpoint
kubelet DRA: Add checkpointing mechanism in the DRA Manager
2023-03-12 12:20:40 -07:00
Kubernetes Prow Robot
e413e6a59c
Merge pull request #116312 from sanposhiho/move-label
cleanup(scheduler): move metric labels to metrics package
2023-03-12 10:48:40 -07:00
Kensei Nakada
c77182b01a feature(hpa): beta graduation for the container resource metrics 2023-03-12 13:36:19 +00:00
Moshe Levi
2c79af0d63 kubelet dra: add unit tests for checkpoint
Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-12 09:13:19 +02:00
tangwz
3766e060e5 Avoid using negative words in PreFilter and PreScore tests. 2023-03-12 15:06:26 +08:00
vinay kulkarni
1c7850c355 Fix null pointer access in doPodResizeAction for kubeletonly mode 2023-03-12 05:59:14 +00:00
Kensei Nakada
fafbed3b1d
fix the error message 2023-03-12 14:48:48 +09:00
Kensei Nakada
639007b28e cleanup(scheduler): move metric labels to metrics package 2023-03-12 05:10:29 +00:00
Kensei Nakada
6697467062 add(scheduler): implement "plugin_execution_duration_seconds" metric in PreEnqueue 2023-03-12 04:45:52 +00:00
mantuliu
4204251acf Remove unnecessary int64 type conversion
Signed-off-by: mantuliu <240951888@qq.com>
2023-03-12 09:50:09 +08:00
Kubernetes Prow Robot
cc3855e0cf
Merge pull request #116170 from aojea/watch_instead_poll_system_namespaces
Watch instead poll system namespaces
2023-03-11 11:24:39 -08:00
kannon92
aef8cbab89 Add batch.kubernetes.io to labels created in the Job controller. 2023-03-11 12:27:38 +00:00
Vadim Rutkovsky
556d774945 kubelet: create top-level traces for pod sync and GC
This starts new top level OpenTelemetry spans every time syncPod or image / container GC is invoked
2023-03-11 10:42:14 +01:00
andyzhangx
c2b2a7622f revert azuredisk test removal change
revert

revert vendor changes

revert

revert

fix
2023-03-11 07:10:05 +00:00
Francesco Romani
b837a0c1ff kubelet: podresources: DOS prevention with builtin ratelimit
Implement DOS prevention wiring a global rate limit for podresources
API. The goal here is not to introduce a general ratelimiting solution
for the kubelet (we need more research and discussion to get there),
but rather to prevent misuse of the API.

Known limitations:
- the rate limits value (QPS, BurstTokens) are hardcoded to
  "high enough" values.
  Enabling user-configuration would require more discussion
  and sweeping changes to the other kubelet endpoints, so it
  is postponed for now.
- the rate limiting is global. Malicious clients can starve other
  clients consuming the QPS quota.

Add e2e test to exercise the flow, because the wiring itself
is mostly boilerplate and API adaptation.
2023-03-11 08:00:54 +01:00
Kubernetes Prow Robot
c6f3007071
Merge pull request #115967 from harche/evented_pleg_metrics
Graduate Evented PLEG to Beta
2023-03-10 17:34:40 -08:00
Kubernetes Prow Robot
1f2d49972c
Merge pull request #116424 from jsafrane/add-selinux-metric-test
Add e2e tests for SELinux metrics
2023-03-10 12:41:06 -08:00
Kubernetes Prow Robot
0010333bdd
Merge pull request #116161 from danielvegamyhre/mutable-scheduling-directives
Mutable pod scheduling directives
2023-03-10 12:40:58 -08:00
Kubernetes Prow Robot
94e30facdb
Merge pull request #114497 from dgrisonnet/pod-logs-metrics
Remove redundant subsystem in kube-apiserver pod logs metrics name
2023-03-10 12:40:41 -08:00
Kubernetes Prow Robot
7529178924
Merge pull request #111372 from HeavenTonight/master
code cleanup
2023-03-10 11:44:40 -08:00
Kubernetes Prow Robot
d8fe845415
Merge pull request #116108 from Jefftree/agg-discovery-enb
Enable Aggregated Discovery for Beta
2023-03-10 10:48:39 -08:00
Daniel Vega-Myhre
86f41dc012 mutable pod scheduling directives 2023-03-10 18:30:09 +00:00
Antonio Ojea
6e78e3279a consider default a system namespace to be managed by the namespace controller
Change-Id: I08d68c18234404c1258aa003211d82e2e72dadb1
2023-03-10 17:49:53 +00:00
Antonio Ojea
eecfaf658e decouple system namespaces from bootstrap controller
Use an informer instead of polling.

Change-Id: Ib071e53addb914fcb31d8a1346cf61ca6d22520b
2023-03-10 17:49:47 +00:00
Jiahui Feng
1fff4949bd generated: ./hack/update-codegen.sh && ./hack/update-openapi-spec.sh 2023-03-10 09:03:49 -08:00
Damien Grisonnet
1efa1a65ee pkg/registry: rename pod logs metrics
The pod_logs subsystem was inadvertently made redundant in the following
kube-apiserver metrics:
- kube_apiserver_pod_logs_pods_logs_backend_tls_failure_total
- kube_apiserver_pod_logs_pods_logs_insecure_backend_total

To safely rename them, it is required to deprecate them in 1.27 whilst
introducing the new metrics replacing them.

Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2023-03-10 17:43:09 +01:00
tangwz
be080584c6
scheduler(NodeResourcesFit & NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase (#115655)
* scheduler(NodeResourcesFit): calculatePodResourceRequest in PreScore phase

* scheduler(NodeResourcesFit and NodeResourcesBalancedAllocation): calculatePodResourceRequest in PreScore phase

* modify the comments and tests.

* revert the tests.

* don't need consider nodes.

* use list instead of map.

* add comment for podRequests.

* avoid using negative wording in variable names.
2023-03-10 07:44:53 -08:00
vinay kulkarni
d011cc4d87 Fix up after rebasing on top of dedup pod resource req calculation PR 2023-03-10 15:21:56 +00:00
vinay kulkarni
565fd4116d Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources - generated files 2023-03-10 14:49:26 +00:00
vinay kulkarni
01b96e7704 Rename ContainerStatus.ResourcesAllocated to ContainerStatus.AllocatedResources 2023-03-10 14:49:26 +00:00
Jan Safranek
05cd2ba863 Don't bump nr. of admitted volumes on retry
AddPodToVolume is called periodically, it does not make sense to bump
volume_manager_selinux_volumes_admitted_total on each call.
2023-03-10 15:03:56 +01:00
Jan Safranek
48ea6a3f3a Fix SELinux mismatch metrics
DesiredStateOfWorld must remember both
- the effective SELinux label to apply as a mount option (non-empty for
  RWOP volumes, empty otherwise)
- and the label that _would_ be used if the mount option would be used by
  all access modes.

Mismatch warning metrics must be generated from the second label.
2023-03-10 15:03:56 +01:00
Kubernetes Prow Robot
4b7bd457c4
Merge pull request #115204 from alexanderConstantinescu/kccm-del-taint-pred
[KCCM - service controller]: KEP-3458 implementation
2023-03-10 04:35:06 -08:00
Kubernetes Prow Robot
f734741cb8
Merge pull request #114373 from TommyStarK/unit-tests/kubelet-kuberuntime
kubelet/kuberuntime: Improving test coverage
2023-03-10 04:34:58 -08:00
Kubernetes Prow Robot
c88b61f553
Merge pull request #113910 from mengjiao-liu/contextual-logging-pkg-controller-certificates
clusterroleaggregation: use contextual logging
2023-03-10 04:34:50 -08:00
Kubernetes Prow Robot
cb00077cd3
Merge pull request #113471 from ncdc/gc-contextual-logging
garbagecollector: use contextual logging
2023-03-10 04:34:39 -08:00
Moshe Levi
e7256e08d3 kubelet dra: add checkpointing mechanism in the DRA Manager
The checkpointing mechanism will repopulate DRA Manager in-memory cache on kubelet restart.
This will ensure that the information needed by the PodResources API is available across
a kubelet restart.

The ClaimInfoState struct represent the DRA Manager in-memory cache state in checkpoint.
It is embedd in the ClaimInfo which also include the annotation field. The separation between
the in-memory cache and the cache state in the checkpoint is so we won't be tied to the in-memory
cache struct which may change in the future. In the ClaimInfoState we save the minimal required fields
to restore the in-memory cache.

Signed-off-by: Moshe Levi <moshele@nvidia.com>
2023-03-10 12:22:15 +02:00
TommyStarK
7f21a9ce01 kubelet/kuberuntime: Improving test coverage
Signed-off-by: TommyStarK <thomasmilox@gmail.com>
2023-03-10 11:06:54 +01:00
Francesco Romani
09517c27c4 kubelet: podresources: pack parameters in a struct
To enable rate limiting, needed for GA graduation,
we need to pass more parameters to the already crowded
`ListenAndServePodresources` function.

To tidy up a bit, pack the parameters in a helper struct,
with no intended changes in behavior.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-03-10 10:28:52 +01:00
Kubernetes Prow Robot
2505053b27
Merge pull request #115708 from my-git9/ut-util
[UT] increase ut coverage for probe/util.go
2023-03-10 00:06:40 -08:00
Kubernetes Prow Robot
8b3d529523
Merge pull request #116395 from alculquicondor/fix-podinfo-race
One lock among PodNominator and SchedulingQueue
2023-03-09 22:44:17 -08:00
Kubernetes Prow Robot
7da203f60d
Merge pull request #116306 from nilskch/add-unit-tests
add unit tests for probe errors and ExecProbeTimeout
2023-03-09 22:43:55 -08:00
Kubernetes Prow Robot
3219564cf3
Merge pull request #116296 from SataQiu/clean-kubelet-20230306
Remove unused resize.go from pkg/kubelet/container
2023-03-09 22:43:48 -08:00
Kubernetes Prow Robot
e57d968323
Merge pull request #116015 from SataQiu/clean-kubelet-20230223
kubelet: remove the deprecated --master-service-namespace flag
2023-03-09 22:43:34 -08:00
Kubernetes Prow Robot
a408be817f
Merge pull request #115972 from jsafrane/add-orphan-pod-metrics
Add metric for failed orphan pod cleanup
2023-03-09 22:43:26 -08:00
Kubernetes Prow Robot
16d2d55bc0
Merge pull request #115969 from DangerOnTheRanger/messageExpression-for-crd
Add messageExpression field for CRD validation
2023-03-09 22:43:19 -08:00
Kubernetes Prow Robot
33d8614c9c
Merge pull request #115929 from HirazawaUi/delete-kubelet-unused-function
cleanup(kubelet): remove unused function
2023-03-09 22:43:12 -08:00
Kubernetes Prow Robot
0018c07050
Merge pull request #115898 from saschagrunert/seccomp-todo
Default to sandbox `Seccomp` field instead of `SeccompProfilePath`
2023-03-09 22:43:05 -08:00
Kubernetes Prow Robot
06f0cba9b1
Merge pull request #115367 from tzneal/dedupe-resource-calculation
dedupe pod resource request calculation
2023-03-09 22:42:50 -08:00
Kubernetes Prow Robot
ba7f4e2fee
Merge pull request #115314 from UiPath/fix-quota-monitoring
kubelet: Fix fs quota monitoring on volumes
2023-03-09 22:42:39 -08:00
xin.li
406b4d4401 [UT] add increase coverage for probe/util.go
Signed-off-by: xin.li <xin.li@daocloud.io>
2023-03-10 14:14:41 +08:00
Kubernetes Prow Robot
8fbfbd9653
Merge pull request #115260 from pwschuurman/kep-3335-statefulset-start-ordinal-beta
Move StatefulSetStartOrdinal feature gate to beta
2023-03-09 21:34:30 -08:00
Kubernetes Prow Robot
e8ae6658ed
Merge pull request #115065 from apelisse/apimachinery-managed-fields
managedfields: Move most of fieldmanager package to managefields
2023-03-09 21:34:22 -08:00
Kubernetes Prow Robot
48e4052fc0
Merge pull request #114902 from TommyStarK/pkg-apis/replace-deprecated-pointer-function
pkg/apis: Replace deprecated pointer function
2023-03-09 21:34:15 -08:00
Kubernetes Prow Robot
1b647d5bf8
Merge pull request #114558 from TommyStarK/unit-tests/pkg-kubelet-nodestatus
kubelet/nodestatus: Improving test coverage
2023-03-09 21:34:00 -08:00
Kubernetes Prow Robot
10802e9be1
Merge pull request #114498 from runzhliu/patch-2
Update kuberuntime_manager_test.go
2023-03-09 21:33:52 -08:00
Kubernetes Prow Robot
78fe7c0dbc
Merge pull request #114426 from my-git9/ut/request_
[UT] add test for pkg/probe/http/request.go
2023-03-09 21:33:45 -08:00
Kubernetes Prow Robot
ccba890df9
Merge pull request #114420 from bzsuni/bz/optimization
Cleanup: fix variable names in comments
2023-03-09 21:33:37 -08:00
Kubernetes Prow Robot
8745423a7a
Merge pull request #114397 from my-git9/ut/util
[UT]And test for pkg/probe/util.go
2023-03-09 21:33:30 -08:00
Kubernetes Prow Robot
f6564d33ba
Merge pull request #114357 from dengyufeng2206/1208pull
Log spelling formatting
2023-03-09 21:33:22 -08:00
Kubernetes Prow Robot
a3ad4d7623
Merge pull request #114017 from calvin0327/cleanup-containerruntime-options
cleanup container runtime options
2023-03-09 21:33:06 -08:00
Kubernetes Prow Robot
15f5a5c6ef
Merge pull request #110949 from claudiubelu/adds-unittests-4
tests: Ports kubelet unit tests to Windows
2023-03-09 21:32:30 -08:00
Kubernetes Prow Robot
d241fcb4bd
Merge pull request #110760 from zhoumingcheng/master-unit-v2
add unit test coverage for pkg/kubelet/types/
2023-03-09 20:30:29 -08:00
Kubernetes Prow Robot
33d9543ceb
Merge pull request #111634 from KunWuLuan/pluginmanager_cache_log_amend
docs(desired_state_of_world.go): log in desired_state_of_world.go seems to be wrong
2023-03-09 19:08:29 -08:00