525 Commits

Author SHA1 Message Date
Natasha Sarkar
40e7d88f02 Kubelet sets pod.status.observedGeneration behind FG 2025-03-06 22:31:04 +00:00
Patrick Ohly
8a908e0c0b remove import doc comments
The "// import <path>" comment has been superseded by Go modules.
We don't have to remove them, but doing so has some advantages:

- They are used inconsistently, which is confusing.
- We can then also remove the (currently broken) hack/update-vanity-imports.sh.
- Last but not least, it would be a first step towards avoiding the k8s.io domain.

This commit was generated with
   sed -i -e 's;^package \(.*\) // import.*;package \1;' $(git grep -l '^package.*// import' | grep -v 'vendor/')

Everything was included, except for
   package labels // import k8s.io/kubernetes/pkg/util/labels
because that package is marked as "read-only".
2024-12-02 16:59:34 +01:00
Nils Carstensen
f1e1f59c21 Revert "Removed unnecessary use of fmt.Sprintf"
This reverts commit e71b5c0679.
2024-08-24 23:41:02 +02:00
Nils Carstensen
e71b5c0679 Removed unnecessary use of fmt.Sprintf 2024-08-24 22:50:43 +02:00
Nils Carstensen
3f7c2286e3 Reverted change: types and const removed 2024-08-24 22:47:17 +02:00
Nils Carstensen
0d46f104e1 Changed Formatting back to porject standard 2024-08-24 22:30:37 +02:00
Nils Carstensen
6dccf759f7 Reverted Formatting 2024-08-24 22:30:37 +02:00
Nils Carstensen
86f7f1dc7b removed unused vars and improved readability 2024-08-24 22:30:37 +02:00
Nils Carstensen
a63ca6749b Revert formatting changes 2024-08-24 17:19:27 -03:00
Kubernetes Prow Robot
1c4f540669 Merge pull request #122739 from HirazawaUi/remove-deprecated-args
kubelet: mark the deprecated pod-infra-container-image flag for removal in 1.35
2024-08-16 11:32:38 -07:00
HirazawaUi
b1d88fd80a move deprecated version to 1.35 2024-08-17 01:26:35 +08:00
Michael Fraenkel
a7264f95ff pod terminationGracePeriodSeconds is always valid (#124461)
* Pod terminationGracePeriodSeconds is always valid

Validation of a pod spec will always use the pod's
TerminationGracePeriodSeconds value.

A set of pod test-helpers have been created to help construct Pods.

* remove unused func

* reduction

* reduce 2

* simplify test

* report invalid grace period

* update SupplementalGroupPolicy tests
2024-06-29 18:09:29 -07:00
Kubernetes Prow Robot
a8d51f4f05 Use a generic Set instead of a specified Set in kubelet
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-06-04 14:25:43 +08:00
Patrick Ohly
1d653e6185 test: use cancelation from ktesting
The return type of ktesting.NewTestContext is now a TContext. Code
which combined it WithCancel often didn't compile anymore (cannot overwrite
ktesting.TContext with context.Context). This is a good thing because all of
that code can be simplified to let ktesting handle the cancelation.
2024-03-01 07:51:22 +01:00
HirazawaUi
a5ce5563f5 move deprecated version of pod-infra-container-image args to 1.32 2024-03-01 05:43:16 +08:00
Tim Allclair
77f03c1744 Don't export single-use types 2024-01-30 12:02:23 -08:00
Tim Allclair
01155f59c3 Merge pkg/util/config into pkg/kubelet/config 2024-01-30 11:57:35 -08:00
Patrick Ohly
d11511b1e8 kubelet: enhance context support
27a68aee3a introduced context support for events. Creating an event
broadcaster with context makes tests more resilient against leaking goroutines
when that context gets canceled at the end of a test and enables per-test
output via ktesting.

To use this in kubelet, a more thorough code update is needed. For now,
context.TODO serves as a reminder that this is necessary.
2023-12-01 10:15:01 +01:00
Taahir Ahmed
1ebe5774d0 kubelet: Support ClusterTrustBundlePEM projections 2023-11-03 11:40:48 -07:00
Liang Deng
18c46b2487 add validation for static pods to have a name
Signed-off-by: Liang Deng <283304489@qq.com>
2023-07-26 09:47:11 +08:00
Jongwoo Han
e51e5962d5 Use early return pattern to avoid nested conditions
Signed-off-by: jongwooo <jongwooo.han@gmail.com>
2023-05-03 02:27:26 +09: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
calvin0327
0ffac50126 cleanup container runtime options
Signed-off-by: calvin0327 <wen.chen@daocloud.io>
2023-03-08 16:53:19 +08:00
Kubernetes Prow Robot
0b05897c30 Merge pull request #112021 from mrunalp/test_host_path_pv_selinux_fix
Set correct SELinux label for host paths volumes created by host path provisioner
2022-12-23 12:35:27 -08:00
Kubernetes Prow Robot
1bf4af4584 Merge pull request #111930 from azylinski/new-histogram-pod_start_sli_duration_seconds
New histogram: Pod start SLI duration
2022-11-04 07:28:14 -07:00
Kubernetes Prow Robot
98742f9d77 Merge pull request #110747 from harshanarayana/cleanup/GIT-110737/logging-improvements
structured-logging: replace KObjs with KObjSlice for logging
2022-11-03 00:49:34 -07:00
Artur Żyliński
b0fac15cd6 Make the interface local to each package 2022-10-26 11:28:18 +02:00
Artur Żyliński
9f31669a53 New histogram: Pod start SLI duration 2022-10-26 11:28:17 +02:00
Mrunal Patel
65e693eccb Set correct SELinux label for host paths volumes created by host path provisioner
These host paths have a well known location under /tmp/hostpath_pv
and are therefore safe to be labeled with the shared SELinux label.

Without this label, the mounted volumes cannot be accessed by the
container processes.

Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2022-08-24 17:57:47 -07:00
inosato
3b95d3b076 Remove ioutil in kubelet and its tests
Signed-off-by: inosato <si17_21@yahoo.co.jp>
2022-07-30 12:35:26 +09:00
Davanum Srinivas
a9593d634c Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Adrian Reber
564f0e9a25 kubelet: add checkpoint/restore infrastructure
This adds the first infrastructure code parts to the kubelet
to support checkpoint/restore.

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-07-14 10:27:40 +00:00
Harsha Narayana
c3cbc443ef structured-logging: replace KObjs with KObjSlice for logging 2022-07-01 09:52:07 +05:30
sunzhaochang
e833c64ef0 Fix missing of Lock in SeenAllSources 2022-06-29 11:54:22 +08:00
Ciprian Hacman
57638ae7a1 Mark pod-infra-container-image flag as deprecated
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-14 09:11:51 +02:00
Ciprian Hacman
0819451ea6 Clean up logic for deprecated flag --container-runtime in kubelet
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-02-10 13:26:59 +02:00
Kubernetes Prow Robot
feb758027c Merge pull request #106907 from cyclinder/remove_dockershim_flags
Clean up dockershim flags in the kubelet
2022-01-18 09:09:09 -08:00
cyclinder
07999dac70 Clean up dockershim flags in the kubelet
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
Co-authored-by: Ciprian Hacman <ciprian@hakman.dev>
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
2022-01-14 16:02:50 +02:00
Wojciech Tyczyński
6088fe4221 Remove no-longer used selflink code from kubelet 2022-01-14 10:38:23 +01:00
Kubernetes Prow Robot
19069665f9 Merge pull request #107094 from adisky/d-container-runtime
Mark container-runtime kubelet flag as deprecated
2022-01-11 10:48:46 -08:00
Kubernetes Prow Robot
a0dfd958d5 Merge pull request #107163 from cyclinder/fix_leak_goroutine
fix goroutine leaks in TestConfigurationChannels
2022-01-10 17:23:16 -08:00
cyclinder
928e686877 fix goroutine leaks in TestConfigurationChannels
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2022-01-10 19:51:16 +08:00
wq
4f38d4aaa1 fix a typo in the comment of ImageCredentialProviderConfigFile 2022-01-09 00:07:43 +09:00
Aditi Sharma
e03d7d3fdd Mark container-runtime flag as deprecated
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2022-01-06 10:23:03 +05:30
yuzhiquanlong
be9e1fda5e remove format pods func, instead with klog.Kobjs 2021-10-15 18:26:02 +08:00
Stephen Augustus
481cf6fbe7 generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Kubernetes Prow Robot
36a7426aa5 Merge pull request #99144 from bart0sh/PR0094-promote-HugePageStorageMediumSize-to-GA
promote huge page storage medium size to GA
2021-07-07 18:09:05 -07:00
Shiming Zhang
582b492cc0 Pre-allocated memory 2021-06-01 15:19:44 +08:00
Ed Bartosh
c12aa0f6b7 promote HugePageStorageMediumSize to GA 2021-05-10 15:57:55 +03:00
Kubernetes Prow Robot
afe567d0fc Merge pull request #100750 from dabaooline/master
make clear PodConfigNotification's type
2021-04-26 12:53:29 -07:00