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
Kermit Alexander II
6defbb4410
Update codegen/openapi spec.
2023-03-09 23:37:49 +00:00
Kubernetes Prow Robot
45b96eae98
Merge pull request #113145 from smarterclayton/zombie_terminating_pods
...
kubelet: Force deleted pods can fail to move out of terminating
2023-03-09 15:32:30 -08:00
Todd Neal
4096c9209c
dedupe pod resource request calculation
2023-03-09 17:15:53 -06:00
Kubernetes Prow Robot
c67953a2d0
Merge pull request #116428 from mborsz/fix
...
Avoid metric lookup in Parallelizer.Until on every work piece
2023-03-09 13:08:29 -08:00
Kubernetes Prow Robot
54ec651ab5
Merge pull request #110741 from zhoumingcheng/master-unit-v1
...
add unit test coverage for pkg/kubelet/util/queue
2023-03-09 11:15:51 -08:00
Kubernetes Prow Robot
c9bbb6553d
Merge pull request #116422 from aojea/nodeslect
...
unexport buggy function nodeSelectorAsSelector
2023-03-09 10:06:03 -08:00
Maciej Borsz
30bca1e1d5
Avoid metric lookup in Parallelizer.Util on every work piece
2023-03-09 17:12:30 +00:00
Antonio Ojea
fd62265d19
unexport buggy function nodeSelectorAsSelector
...
Change-Id: I1e48ac0dd0b33c367fa9be4f4adb11a4531849f9
2023-03-09 16:58:25 +00:00
Kubernetes Prow Robot
f90643435e
Merge pull request #113840 from 249043822/br-context-logging-statefulset
...
statefulset: use contextual logging
2023-03-09 06:42:02 -08:00
andyzhangx
5d0a54dcb5
remove Azure Disk in-tree driver code
...
fix
2023-03-09 13:24:08 +00:00
Alexander Constantinescu
e30c49b0e8
Add StableLoadBalancerNodeSet feature gate
2023-03-09 12:03:21 +01:00
Clayton Coleman
6b9a381185
kubelet: Force deleted pods can fail to move out of terminating
...
If a CRI error occurs during the terminating phase after a pod is
force deleted (API or static) then the housekeeping loop will not
deliver updates to the pod worker which prevents the pod's state
machine from progressing. The pod will remain in the terminating
phase but no further attempts to terminate or cleanup will occur
until the kubelet is restarted.
The pod worker now maintains a store of the pods state that it is
attempting to reconcile and uses that to resync unknown pods when
SyncKnownPods() is invoked, so that failures in sync methods for
unknown pods no longer hang forever.
The pod worker's store tracks desired updates and the last update
applied on podSyncStatuses. Each goroutine now synchronizes to
acquire the next work item, context, and whether the pod can start.
This synchronization moves the pending update to the stored last
update, which will ensure third parties accessing pod worker state
don't see updates before the pod worker begins synchronizing them.
As a consequence, the update channel becomes a simple notifier
(struct{}) so that SyncKnownPods can coordinate with the pod worker
to create a synthetic pending update for unknown pods (i.e. no one
besides the pod worker has data about those pods). Otherwise the
pending update info would be hidden inside the channel.
In order to properly track pending updates, we have to be very
careful not to mix RunningPods (which are calculated from the
container runtime and are missing all spec info) and config-
sourced pods. Update the pod worker to avoid using ToAPIPod()
and instead require the pod worker to directly use
update.Options.Pod or update.Options.RunningPod for the
correct methods. Add a new SyncTerminatingRuntimePod to prevent
accidental invocations of runtime only pod data.
Finally, fix SyncKnownPods to replay the last valid update for
undesired pods which drives the pod state machine towards
termination, and alter HandlePodCleanups to:
- terminate runtime pods that aren't known to the pod worker
- launch admitted pods that aren't known to the pod worker
Any started pods receive a replay until they reach the finished
state, and then are removed from the pod worker. When a desired
pod is detected as not being in the worker, the usual cause is
that the pod was deleted and recreated with the same UID (almost
always a static pod since API UID reuse is statistically
unlikely). This simplifies the previous restartable pod support.
We are careful to filter for active pods (those not already
terminal or those which have been previously rejected by
admission). We also force a refresh of the runtime cache to
ensure we don't see an older version of the state.
Future changes will allow other components that need to view the
pod worker's actual state (not the desired state the podManager
represents) to retrieve that info from the pod worker.
Several bugs in pod lifecycle have been undetectable at runtime
because the kubelet does not clearly describe the number of pods
in use. To better report, add the following metrics:
kubelet_desired_pods: Pods the pod manager sees
kubelet_active_pods: "Admitted" pods that gate new pods
kubelet_mirror_pods: Mirror pods the kubelet is tracking
kubelet_working_pods: Breakdown of pods from the last sync in
each phase, orphaned state, and static or not
kubelet_restarted_pods_total: A counter for pods that saw a
CREATE before the previous pod with the same UID was finished
kubelet_orphaned_runtime_pods_total: A counter for pods detected
at runtime that were not known to the kubelet. Will be
populated at Kubelet startup and should never be incremented
after.
Add a metric check to our e2e tests that verifies the values are
captured correctly during a serial test, and then verify them in
detail in unit tests.
Adds 23 series to the kubelet /metrics endpoint.
2023-03-08 22:03:51 -06:00
Paco Xu
a1def4b9c0
pod-infra-container-image: update comments as it will be removed in couple more releases
...
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-03-09 11:14:32 +08:00
Kubernetes Prow Robot
625b8be09e
Merge pull request #115371 from pacoxu/cgroup-v2-memory-tuning
...
default memoryThrottlingFactor to 0.9 and optimize the memory.high formulas
2023-03-08 18:46:00 -08:00
Jiahui Feng
d8be7aa9ca
implement message expression.
2023-03-08 17:36:11 -08:00
Kubernetes Prow Robot
8d5c96fed2
Merge pull request #116093 from swatisehgal/topologymanager-ga-graduation
...
node: topologymgr: Graduate Kubelet Topology Manager to GA
2023-03-08 16:56:06 -08:00
Jiahui Feng
f4ee476a3c
[API REVIEW] Validation.MessageExpression
2023-03-08 16:18:42 -08:00
Kubernetes Prow Robot
8fa82976fc
Merge pull request #116356 from pacoxu/cleanup-bump_qps_kubelet
...
sync default qps of kubelet change everywhere
2023-03-08 15:42:41 -08:00
Maksim Nabokikh
c1431af4f8
KEP-3325: Promote SelfSubjectReview to Beta ( #116274 )
...
* Promote SelfSubjectReview to Beta
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
* Fix whoami API
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
* Fixes according to code review
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
---------
Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
2023-03-08 15:42:33 -08:00
Jefftree
361391117d
Enable aggregated discovery
2023-03-08 23:03:52 +00:00
Kubernetes Prow Robot
4a896644de
Merge pull request #116235 from Jefftree/oas-ga
...
Promote OpenAPI V3 to GA
2023-03-08 14:44:20 -08:00
Antoine Pelisse
4f3859ce91
managedfields: Move most of fieldmanager package to managefields
2023-03-08 13:44:00 -08:00
Aldo Culquicondor
07a73bb2e1
One lock among PodNominator and SchedulingQueue
...
Change-Id: I17fe5da40250e42c04124c25b530ce6c8dea4154
2023-03-08 16:18:36 -05:00
Kubernetes Prow Robot
8b413d224a
Merge pull request #116342 from msau42/unlock
...
Unlock CSIMigrationvSphere feature gate
2023-03-08 11:27:24 -08:00
Kubernetes Prow Robot
03ff890ef4
Merge pull request #116329 from dims/drop-aws-kubelet-credential-provider-and-cleanup-aws-storage-e2e-tests
...
Drop aws kubelet credential provider and cleanup aws storage e2e tests
2023-03-08 06:49:11 -08:00
Patrick Ohly
cbf7d96a85
garbagecollector: structured logging of objectReference
...
When using JSON as output format, we want objectReference values to be
represented as a struct. For example, "item" is such a value:
{"ts":1678135015708.349,"caller":"garbagecollector/garbagecollector.go:595","msg":"classify object references","v":5,"item":{"name":"dra-test-driver-g4tkd","namespace":"dra-1830","apiVersion":"v1","uid":"c3f88616-7282-488c-887c-3f04291e6f4f"},"solid":null,"dangling":[{"apiVersion":"apps/v1","kind":"ReplicaSet","name":"dra-test-driver","uid":"dbe9a90c-9dfd-4ad0-8395-e5fa228f9851","controller":true,"blockOwnerDeletion":true}],"waitingForDependentsDeletion":null}
2023-03-08 08:37:56 -05:00
Andy Goldstein
26e3dab78b
garbagecollector: use contextual logging
...
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2023-03-08 08:37:56 -05:00
nilskch
0c11171b7e
add tests for probe errors and ExecProbeTimeout
2023-03-08 11:59:59 +01:00
ZhangKe10140699
a239b9986b
Migrated the StatefulSet controller (within `kube-controller-manager) to use [contextual logging]( https://k8s.io/docs/concepts/cluster-administration/system-logs/#contextual-logging )
2023-03-08 18:57:57 +08:00
Kubernetes Prow Robot
f99c351992
Merge pull request #116174 from pacoxu/fix-TestNewNodeIpamControllerWithCIDRMasks
...
node ipam controller ut: run test in parallel to avoid timeout
2023-03-08 02:25:12 -08:00
calvin0327
0ffac50126
cleanup container runtime options
...
Signed-off-by: calvin0327 <wen.chen@daocloud.io>
2023-03-08 16:53:19 +08:00
Paco Xu
f368413d65
sync default qps of kubelet change
2023-03-08 14:04:51 +08:00
Paco Xu
0e6636eb33
nodeipam: return error instead of panics
2023-03-08 12:47:14 +08:00
Kubernetes Prow Robot
e390791e5f
Merge pull request #116341 from bobbypage/revert-114640-handle-device-mgr-recovery
...
Revert "node: device-mgr: Handle recovery flow by checking if healthy devices exist"
2023-03-07 19:31:33 -08:00
Kubernetes Prow Robot
83334ccaa1
Merge pull request #116320 from wangchen615/lastminute-scheduler-fix
...
Address last-minute requested changes for inplace update feature testing in scheduler
2023-03-07 19:31:26 -08:00
Paco Xu
4fdca4c5f6
node ipam ut: run test in parallel to avoid timeout; and optimize the panic check
2023-03-08 11:10:51 +08:00
Jiahui Feng
501976cc34
fix broken tests after dependency injection.
2023-03-13 14:40:47 -07:00
Jiahui Feng
feb18b3f5f
implmementing type checking
...
with multi-type support.
2023-03-07 15:49:19 -08:00
Jiahui Feng
68ac7acbce
[API REVIEW] ValidatingAdmissionPolicyStatus
2023-03-07 15:43:34 -08:00
Kubernetes Prow Robot
fe6a51ed4c
Merge pull request #116121 from wojtek-t/bump_qps_kubelet
...
Bump default API QPS limits for Kubelet
2023-03-07 15:08:43 -08:00
Kubernetes Prow Robot
6bce018b36
Merge pull request #116271 from vinaykul/restart-free-pod-vertical-scaling-kubelet-panic-fix
...
Fix nil pointer access panic in kubelet from uninitialized pod allocation checkpoint manager in standalone kubelet scenario
2023-03-07 12:38:45 -08:00
Michelle Au
4c0ed3b52e
Unlock CSIMigrationvSphere feature gate until there is a supported vSphere CSI driver available
2023-03-07 20:26:27 +00:00
David Porter
9c20cee504
Revert "node: device-mgr: Handle recovery flow by checking if healthy devices exist"
2023-03-07 11:50:52 -08:00
Kubernetes Prow Robot
2c8f63f693
Merge pull request #115268 from jsafrane/split-reconstruction
...
Split volume reconstruction refactoring from SELinuxMountReadWriteOncePod
2023-03-07 10:44:34 -08:00
Andrea Tosatto
cae19f9e85
Remove deprecated pod-eviction-timeout flag from controller-manager
2023-03-07 18:14:18 +00:00
kerthcet
e5c812bbe7
Remove CLI flag enable-taint-manager
...
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-03-07 18:11:49 +00:00
Kubernetes Prow Robot
37326f7cea
Merge pull request #112670 from yangjunmyfm192085/delklogV0
...
use contextual logging(nodeipam and nodelifecycle part)
2023-03-07 09:40:33 -08:00
Kubernetes Prow Robot
e28b191581
Merge pull request #116167 from borgerli/pr/kcm-podgc
...
delete Evicted pods first during pod gc
2023-03-07 07:21:04 -08:00
Kubernetes Prow Robot
2225ee5dd3
Merge pull request #115904 from soltysh/cronjob_tz_ga
...
Promote CronJob TZ to GA
2023-03-07 07:20:47 -08:00
Kubernetes Prow Robot
51ef4b10ba
Merge pull request #115504 from pacoxu/cronjob-timezone
...
add some ut for cronjob strategy and timezone in schedule
2023-03-07 07:20:34 -08:00
SataQiu
5a5ca8aa0c
remove residual code associated with DynamicKubeletConfig
2023-03-07 22:57:08 +08:00
Davanum Srinivas
90d185b7e1
Drop AWS kubelet credential provider and cleanup AWS storage e2e tests
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-07 09:00:12 -05:00
Kubernetes Prow Robot
86bf570711
Merge pull request #111661 from alexanderConstantinescu/etp-local-svc-hc-kube-proxy
...
[Proxy]: add `healthz` verification when determining HC response for eTP:Local
2023-03-07 05:34:36 -08:00
Kubernetes Prow Robot
637bd66165
Merge pull request #115332 from obaranov1/ttlafterfinished-logging-migration
...
Migrate /pkg/controller/ttlafterfinished to structured and contextual logging
2023-03-07 04:20:08 -08:00
Naman Lakhwani
b6f9a65558
Migrating pkg/controller/serviceaccount
to contextual logging ( #114918 )
...
* migrating pkg/controller/serviceaccount to contextual logging
Signed-off-by: Naman <namanlakhwani@gmail.com>
* small nit
Signed-off-by: Naman <namanlakhwani@gmail.com>
* capitalising first letter of error
Signed-off-by: Naman <namanlakhwani@gmail.com>
* addressed review comments
Signed-off-by: Naman <namanlakhwani@gmail.com>
* small nit to add key
Signed-off-by: Naman <namanlakhwani@gmail.com>
---------
Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-03-07 04:19:59 -08:00
Naman Lakhwani
8f45b64c93
Migrated pkg/controller/replicaset
to contextual logging ( #114871 )
...
* migrated controller/replicaset to contextual logging
Signed-off-by: Naman <namanlakhwani@gmail.com>
* small nits
Signed-off-by: Naman <namanlakhwani@gmail.com>
* addressed changes
Signed-off-by: Naman <namanlakhwani@gmail.com>
* small nit
Signed-off-by: Naman <namanlakhwani@gmail.com>
* taking t as input
Signed-off-by: Naman <namanlakhwani@gmail.com>
---------
Signed-off-by: Naman <namanlakhwani@gmail.com>
2023-03-07 04:19:51 -08:00
Kubernetes Prow Robot
4aaa4df840
Merge pull request #113986 from songxiao-wang87/runwxs-test2
...
Migrate StorageVersionGC to contextual logging
2023-03-07 04:19:43 -08:00
Kubernetes Prow Robot
471b392f43
Merge pull request #113916 from songxiao-wang87/runwxs-test1
...
Migrate ttl_controller to contextual logging
2023-03-07 04:18:30 -08:00
Maciej Szulik
e047c859be
Update generated
2023-03-07 12:58:59 +01:00
Maciej Szulik
1b825c179b
Promote CronJob TZ to GA
2023-03-07 12:58:57 +01:00
Swati Sehgal
bea99ae1ee
node: topologymgr: update autogenerated code
...
Changes committed after running:
`./hack/update-codegen.sh`
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-07 11:11:31 +00:00
Swati Sehgal
ae964a493f
node: topologymgr: remove comments with feature gate references
...
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-07 09:42:54 +00:00
Kubernetes Prow Robot
3489796d5c
Merge pull request #113428 from mengjiao-liu/contextual-logging-controller-cronjob
...
Update `pkg/controller/cronjob/` for contextual logging
2023-03-07 01:28:18 -08:00
JunYang
780ef3afb0
use klog.InfoS instead of klog.V(0),Info
2023-03-07 15:50:01 +08:00
vinay kulkarni
98e8f42f33
panic on pod resources alloc checkpoint failure
2023-03-07 05:59:34 +00:00
Kubernetes Prow Robot
04675428bb
Merge pull request #115973 from jpbetz/enforcement-actions
...
KEP-3488: Implement Enforcement Actions and Audit Annotations
2023-03-06 21:56:37 -08:00
Kubernetes Prow Robot
8e659d43ec
Merge pull request #115925 from claudiubelu/skip-flaky-tests
...
unit tests: Skip flaky tests on Windows
2023-03-06 21:56:29 -08:00
Kubernetes Prow Robot
b4305fcf63
Merge pull request #115391 from haoruan/bugfix/allow-pv-nodeaffinity-to-be-mutable
...
allow to mutate pv nodeaffinity label key
2023-03-06 21:56:17 -08:00
Kubernetes Prow Robot
9d7db70882
Merge pull request #116066 from yoongon/feature/fit-test-comments
...
Fix comments at fit_test.go to increase redability
2023-03-06 20:52:16 -08:00
Hao Ruan
c8d10dcaeb
allow to mutate pv nodeaffinity label key
2023-03-07 11:16:10 +08:00
Joe Betz
932a4d9724
Generate code
2023-03-06 21:51:33 -05:00
Joe Betz
d221ddb89a
Implement validationActions and auditAnnotations
2023-03-06 21:51:27 -05:00
Li Bo
749d2ba8ae
delete Evicted pods first during pod gc
2023-03-07 10:11:01 +08:00
Kubernetes Prow Robot
8c61473f1c
Merge pull request #115747 from cici37/rc
...
Apply cost constraints to ValidatingAdmissionPolicy
2023-03-06 16:54:18 -08:00
Peter Schuurman
910ce0ed0b
Run ./hack/update-* scripts to update generated files
2023-03-06 16:38:52 -08:00
Chen Wang
fd6105d015
fix last minute scheduler changes for inplace update
2023-03-06 18:47:02 -05:00
Kubernetes Prow Robot
44909771d9
Merge pull request #115965 from jsafrane/add-reconstruction-metrics
...
Add volume reconstruction metrics
2023-03-06 14:56:16 -08:00
Kubernetes Prow Robot
283c26f91a
Merge pull request #115082 from sanposhiho/filter-metrics
...
feature(scheduler): implement plugin_evaluation_total metric
2023-03-06 12:58:17 -08:00
Claudiu Belu
5ba74c81ca
unit tests: Skip flaky tests on Windows
...
Some of the unit tests are currently flaky on Windows. This commit
skips them until they are resolved.
2023-03-06 20:46:05 +00:00
Cici Huang
244c63a2e6
Apply resource constraints to ValidatingAdmissionPolicy.
2023-03-06 20:43:59 +00:00
Kubernetes Prow Robot
64259b43b8
Merge pull request #116054 from jpbetz/secondary-authz
...
KEP-3488: Implement secondary authz for ValidatingAdmissionPolicy
2023-03-06 11:54:16 -08:00
Kubernetes Prow Robot
7a4c4eaae7
Merge pull request #116291 from denkensk/match-label-beta
...
feat: graduate matchLabelKeys in podTopologySpread to beta
2023-03-06 09:24:57 -08:00
Kubernetes Prow Robot
89d1a7971e
Merge pull request #116287 from csDengh/minor_code_improvement
...
scheduler: get an element from the nodes slice out of the loop for the better performance
2023-03-06 09:24:49 -08:00
Kubernetes Prow Robot
3f20bcb8e3
Merge pull request #116124 from aerfio/aerfio/update-broken-links-apps
...
Update obsolete links to kubernetes.io/docs/user-guide in Go structs descriptions in apps packages
2023-03-06 09:24:42 -08:00
Kubernetes Prow Robot
77fad93d8d
Merge pull request #116109 from aerfio/aerfio/update-broken-links-autoscaling
...
Update obsolete links to kubernetes.io/docs/user-guide in Go structs descriptions in autoscaling packages
2023-03-06 09:24:29 -08:00
Joe Betz
60bc5660de
Generate code
2023-03-06 12:08:40 -05:00
Joe Betz
7bbda746fe
Implement secondary authz
2023-03-06 12:08:14 -05:00
Jan Safranek
9ca548fcf0
Add metrics for force cleaned mounts after failed reconstruction
...
Count nr. of force cleaned mounts + their failures after a volume fails
reconstruction.
2023-03-06 17:48:59 +01:00
Kubernetes Prow Robot
0270fc75d0
Merge pull request #116256 from atiratree/unmanaged-pods
...
improve message, log level and testing for unmanaged pods in disruption controller
2023-03-06 08:19:14 -08:00
Kubernetes Prow Robot
388ad23561
Merge pull request #115968 from stlaz/sc_accessors
...
add SeccompProfile to Pod and Container accessors/mutators
2023-03-06 08:18:41 -08:00
Kubernetes Prow Robot
d6e9cff212
Merge pull request #115838 from torredil/remove-aws
...
Remove AWS legacy cloud provider + EBS in-tree storage plugin
2023-03-06 08:18:29 -08:00
Kubernetes Prow Robot
890d39f976
Merge pull request #114640 from swatisehgal/handle-device-mgr-recovery
...
node: device-mgr: Handle recovery flow by checking if healthy devices exist
2023-03-06 07:10:28 -08:00
Kubernetes Prow Robot
4185bf7238
Merge pull request #116273 from sourcelliu/improveresource
...
Improve the performance when Resource Clone
2023-03-06 06:06:41 -08:00
Kubernetes Prow Robot
68eea2468c
Merge pull request #114572 from huyinhou/fix-concurrent-map-access
...
kubelet/deviceplugin: fix concurrent map iteration and map write
2023-03-06 06:06:29 -08:00
torredil
6aebda9b1e
Remove AWS legacy cloud provider + EBS in-tree storage plugin
...
Signed-off-by: torredil <torredil@amazon.com>
2023-03-06 14:01:15 +00:00
Swati Sehgal
937d330393
node: topologymgr: Remove ResourceAllocator as TM is always enabled
...
With Topology Manager enabled by default, we no longer need
`resourceAllocator` as Topology Manager serves as the main
PodAdmitHandler completely responsible for admission check
based on hints received from the hintProviders and the
subsequent allocation of the corresponding resources to a
pod as can be seen here:
https://github.com/kubernetes/kubernetes/blob/v1.26.0/pkg/kubelet/cm/topologymanager/scope.go#L150
With regard to DRA, the passing of `cm.draManager` into
resourceAllocator seems redundant as no admission checks
(and allocation of resources handled by DRA) is taking place
in `Admit` method of resourceAllocator. DRA has a completely
different model to the rest of the resource managers where
pod is only scheduled on a node once resources are reserved
for it. Because of this, admission checks or waiting for
resources to be provisioned after the pod has been scheduled
on the node is not required.
Before making the above change, it was verified that DRA Manager
is instantiated in `NewContainerManager`:
https://github.com/kubernetes/kubernetes/blob/v1.26.0/pkg/kubelet/cm/container_manager_linux.go#L318
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:51:11 +00:00
Swati Sehgal
6a62f0236a
node: topologymgr: trivial internal variable renaming
...
Since Topology manager is graduating to GA, we remove
internal configuration variable names with `Experimental`
prefix.
There is no expected change in behavior, only trival
variable renaming.
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:51:11 +00:00
Swati Sehgal
d536a342b4
node: topologymgr: GA graduation implies Feature Gate is ON by default
...
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:51:05 +00:00
Swati Sehgal
04438aa6f8
node: topologymgr: Graduate Kubelet Topology Manager to GA
...
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 12:47:59 +00:00
Swati Sehgal
5b2a3dbbdc
node: device-mgr: explicitly check if pre-allocated devices are healthy
...
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
2023-03-06 11:52:23 +00:00