Commit Graph

11382 Commits

Author SHA1 Message Date
Paco Xu
f368413d65 sync default qps of kubelet change 2023-03-08 14:04:51 +08:00
Jiahui Feng
feb18b3f5f implmementing type checking
with multi-type support.
2023-03-07 15:49:19 -08:00
Andrea Tosatto
cae19f9e85 Remove deprecated pod-eviction-timeout flag from controller-manager 2023-03-07 18:14:18 +00:00
kerthcet
98bbeae99f address comments
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-03-07 18:11:51 +00:00
kerthcet
15daa48e30 Deprecate CLI flag pod-eviction-timeout
Signed-off-by: kerthcet <kerthcet@gmail.com>
2023-03-07 18:11:51 +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
4401af2c3e
Merge pull request #116219 from SataQiu/fix-kube-controller-manager-20230302
kube-controller-manager: fix a bug that the kubeconfig field of kubecontrollermanager.config.k8s.io configuration is not populated correctly
2023-03-07 08:28:46 -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
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
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
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
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
SataQiu
eb541bb819 controller-manager: fix a bug that the kubeconfig field of kubecontrollermanager.config.k8s.io configuration is not set correctly 2023-03-04 11:17:55 +08:00
Sergey Kanzhelev
04189b1fc4 rename ExperimentalPodPidsLimit to PodPidsLimit 2023-03-04 01:48:16 +00:00
Kubernetes Prow Robot
b4b2345f9a
Merge pull request #116106 from alexzielenski/revert-116062-revert-field-manager
Revert "Revert "Merge pull request #115324 from alexzielenski/apiserver/smd/use-openapiv3"
2023-03-01 19:09:07 -08:00
SataQiu
91089ce65b kubelet: remove the deprecated --master-service-namespace flag 2023-03-01 18:44:59 +08:00
Kubernetes Prow Robot
bd1435dccd
Merge pull request #114016 from songxiao-wang87/runwxs-test3
word misspelling
2023-02-28 14:53:16 -08:00
Alexander Zielenski
c485cb2435 supply OpenAPIV3Config unconditionally
the handlers are still gated, but OpenAPIV3 is required for SSA
2023-02-28 13:29:57 -08:00
SataQiu
75ef759810 kubelet: avoid duplicate printing the flag deprecation warnings during re-parsing 2023-02-28 22:58:40 +08:00
Kubernetes Prow Robot
fb37f1331b
Merge pull request #113574 from chendave/cleanup_testcases
kubeadm: Improve testcases for `init` and `join` command
2023-02-28 00:43:16 -08:00
SataQiu
70b33409de kubeadm: modify '--config' flag from required to optional for 'kubeadm kubeconfig user' 2023-02-27 12:19:31 +08:00
Dave Chen
a825450707 kubeadm: improve test coverage by validating the data structure
data structure is what returned if everything okay, but this
structure is not validated at all both in `init` and `join` cmd.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-02-27 10:41:25 +08:00
Paco Xu
b24725eed7 update coredns to v1.10.1
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
2023-02-26 09:25:40 +08:00
Kensei Nakada
33daba24fb fix(HPA): ignore the container resource metrics in HPA controller when the feature gate is disabled 2023-02-25 23:04:07 +00:00
Paco Xu
b1ee8c8b82 kubeadm: no need to check if target coredns version is not changed 2023-02-25 21:53:28 +08:00
Kubernetes Prow Robot
70c129fea5
Merge pull request #115420 from chendave/2806
kubeadm: skip ipv4 check if the cluster is using IPv6 address
2023-02-23 02:51:36 -08:00
charles-chenzz
0891ba9739 resourceClaimController should be registered like the others one to keep code clean 2023-02-23 17:26:30 +08:00
Kubernetes Prow Robot
4dd887797f
Merge pull request #115924 from claudiubelu/fix-kubeadm-unittest
unit tests: Fixes kubeadm postupgrade failing unit test on Windows
2023-02-22 00:50:08 -08:00
Dave Chen
66f043f650 kubeadm: skip ipv4 check if the cluster is using IPv6 address
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-02-22 10:02:54 +08:00
Kubernetes Prow Robot
06b6644fcf
Merge pull request #115815 from Huang-Wei/pod-scheduling-readiness-beta
Graduate PodSchedulingReadiness to beta
2023-02-21 14:24:32 -08:00
Claudiu Belu
2e2ef9b0e7 unit tests: Fixes kubeadm postupgrade failing unit test on Windows
The unit test TestWriteKubeletConfigFiles fails on Windows because the
file not found error message is different on Windows.
2023-02-21 16:53:06 +00:00
obaranov1
21adaa1490 logging migration of the ttlafterfinished
Signed-off-by: Oksana Baranova <oksana.baranova@intel.com>
2023-02-21 14:55:03 +02:00
Kubernetes Prow Robot
bd914b493c
Merge pull request #115676 from chendave/conversion_api
kubeadm: remove the manual conversion from versioned cluster cfg to internal cfg
2023-02-20 02:53:48 -08:00
Kubernetes Prow Robot
9e356a4132
Merge pull request #115719 from saschagrunert/seccomp-default-ga
Graduate `SeccompDefault` feature to stable / GA
2023-02-20 01:11:51 -08:00
Wei Huang
72863f65d6
Graduate PodSchedulingReadiness to beta 2023-02-17 18:45:20 -08:00
Kubernetes Prow Robot
d9ed2ff4b0
Merge pull request #114687 from freddie400/migrate-hpa
Migrate pkg/controller/podautoscaler to contextual logging
2023-02-17 05:44:03 -08:00
Freddie
dee494ece1 squashing without rebase 2023-02-17 01:47:52 +05:30
Kubernetes Prow Robot
ffe410bbb4
Merge pull request #115604 from pacoxu/fix-design-proposals-links
old design proposals are now moved to Design Proposals Archive repo
2023-02-16 09:55:38 -08:00
Kubernetes Prow Robot
8e31885e36
Merge pull request #115575 from SataQiu/fix-20230207
kubeadm: fix a bug where the uploaded kubelet configuration in kube-system/kubelet-config ConfigMap does not respect user patch
2023-02-16 00:45:38 -08:00
Paco Xu
3d536bd14b API docs: point to current docs instead of archived designs 2023-02-16 15:32:08 +08:00
Sascha Grunert
37caed0e19
Graduate SeccompDefault feature to stable / GA
Updating the required code and docs for SeccompDefault to go GA, which
now means that we enable the feature per default.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-15 15:28:07 +01:00
Kubernetes Prow Robot
f545ff3ba8
Merge pull request #115610 from SataQiu/detect-sandbox-20230208
kubeadm: show a warning message when detecting that the sandbox image of the container runtime is inconsistent with that used by kubeadm
2023-02-14 19:26:23 -08:00
Andy Goldstein
71ec5ed81d
resourcequota: use contexual logging (#113315)
Signed-off-by: Andy Goldstein <andy.goldstein@redhat.com>
2023-02-14 07:19:31 -08:00
Sascha Grunert
a28385ebe2
Graduate KubeletTracing feature to beta
We now graduate `KubeletTracing` to beta, which means we enable the
feature gate per default.

Part of https://github.com/kubernetes/enhancements/issues/2831

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-02-14 10:05:35 +01:00
Lucas Severo Alves
6b34fafdaf
Add ctx logging involved in KS startup (#115588)
* ctx logging involved in startup

as per https://github.com/kubernetes/kubernetes/pull/111155#pullrequestreview-1283257121

* use klog.Background().Error in flag handling

* revert scheduler_perf changes

* refence issue in code comment

* enable ctx logcheck for cmd/kube-scheduler
2023-02-13 09:19:29 -08:00
SataQiu
d12b4d4c67 kubeadm: show a warning message when detecting that the sandbox image of the container runtime is inconsistent with that used by kubeadm 2023-02-10 14:59:40 +08:00
Dave Chen
82990268ec kubeadm: remove the manual conversion from versioned cluster cfg to internal cfg
The manual conversion was needed to adapt `ClusterConfiguration.DNS` from v1beta2
to v1beta3, now that v1beta2 is removed from the code base, the manual conversion
is unnecessary as well.

The help to reduce the maintenance efforts.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-02-10 14:46:15 +08:00
Paco Xu
019d2615af archived design proposals are now moved to Design Proposals Archive Repo. 2023-02-08 11:12:22 +08:00
Kubernetes Prow Robot
22b88dea36
Merge pull request #115315 from enj/enj/i/kas_kubelet_conn_close
kubelet/client: collapse transport wiring onto standard approach
2023-02-07 07:01:14 -08:00
SataQiu
69e50cabd2 kubeadm: fix a bug where the uploaded kubelet configuration in kube-system/kubelet-config ConfigMap does not respect user patch 2023-02-07 18:24:31 +08:00
Kubernetes Prow Robot
8e20effbb7
Merge pull request #114695 from chendave/fix_cross_move
kubeadm: backup kubelet config for "upgrade node" and "upgrade apply"
2023-02-07 02:18:58 -08:00
Kubernetes Prow Robot
6eb008620c
Merge pull request #115379 from artemvmin/serial-mkfs
Add an option to limit the number of concurrent mkfs calls
2023-02-06 18:26:58 -08:00
Monis Khan
754cb3d601
kubelet/client: collapse transport wiring onto standard approach
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-02-06 20:34:49 -05:00
Kubernetes Prow Robot
561a35f358
Merge pull request #115038 from mercedes-benz/tobiasgiese/kubeadmfix-etcd-learner-join
kubeadm: fix etcd learner join
2023-02-06 02:09:01 -08:00
Artem Minyaylov
f573e14942 Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex
2023-02-04 11:05:22 -08:00
Mengjiao Liu
6f2cd1b5bd Update pkg/controller/cronjob/ for contextual logging 2023-02-02 14:27:13 +08:00
Dave Chen
5127cbf949 kubeadm: backup kubelet config file for upgrade apply
Back up kubelet config file for `kubeadm upgrade apply`, some code
refactoring is done to de-dup some redundant code logic.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-02-02 12:09:18 +08:00
Dave Chen
9e6e13e562 kubeadm: include the err got from PrintDryRunFile
The error was ingored which means if anything wrong from `PrintDryRunFiles`,
it was sliently ignored.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-02-02 12:00:19 +08:00
Dave Chen
c55a98fde9 kubeadm: fix invalid cross-device link error
The root cause for that error is because `rename` doesn't work
across different mount points.

The kubelet config file and back up directory are mounted to
different file system in kinder environment.

```
df /var/lib/kubelet/config.yaml | tail -n1 | awk '{print $1}'
/dev/sda2

df /etc/kubernetes/tmp/kubeadm-kubelet-configxxx | tail -n1 | awk '{print $1}'
overlay
```

Call `cp` instead of `rename` to back up the kubelet file would fix
that issue.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-02-02 11:43:18 +08:00
Dave Chen
016cc0c120 kubeadm:[cherry-pick]backup kubelet config for "upgrade node"
This addresses the TODO item so that the old kubelet config file could
be recovered if something goes wrong.

Signed-off-by: Dave Chen <dave.chen@arm.com>
Co-authored-by: Paco Xu <paco.xu@daocloud.io>
2023-02-02 11:43:18 +08:00
Kubernetes Prow Robot
5d4776adc1
Merge pull request #114948 from haoruan/feature-api-doc-field-linter
Add linter to check if api docs match field tag names
2023-01-30 16:21:09 -08:00
Kubernetes Prow Robot
5681b0da14
Merge pull request #115338 from danwinship/nodeutil.gethostname
Move GetHostname() from k/k/pkg/util/node to k/component-helpers/node/util
2023-01-30 09:07:20 -08:00
Kubernetes Prow Robot
4b074c816e
Merge pull request #115298 from knelasevero/StartTestServerCtx
Pass context to StartTestServer to get contextualized logger from it during tests
2023-01-30 09:07:12 -08:00
Kubernetes Prow Robot
a94a35293b
Merge pull request #114490 from MadhavJivrajani/update-contention-profiling-docs
*: Make docs more accurate for the contention-profiling flag
2023-01-29 17:20:49 -08:00
songxiao-wang87
8c7f3c2116 Making a run test.
Signed-off-by: songxiao-wang87 <wang.xiaosong23@zte.com.cn>
2023-01-28 03:14:57 +00:00
Dan Winship
f994ae2521 Move GetHostname() from k/k/pkg/util/node to k/component-helpers/node/util
In fact, this actually uses pkg/util/node's GetHostname() but takes
the unit tests from cmd/kubeadm/app/util's private fork of that
function since they were more extensive. (Of course the fact that
kubeadm had a private fork of this function is a strong argument for
moving it to component-helpers.)
2023-01-27 18:24:38 -05:00
Mohamed Zaian
90570b7595 etcd: Update to version 3.5.7 2023-01-27 17:24:00 +01:00
Lucas Severo Alves
6a06b63554 comment change from t.Fatal to panic 2023-01-25 11:44:12 +01:00
Lucas Severo Alves
096d2e5895 remove unwanted newlines 2023-01-24 21:45:32 +01:00
Lucas Severo Alves
636f8e1a3e chore: changes needed before #111155 2023-01-24 17:55:32 +01:00
Patrick Ohly
bc6c7fa912 logging: fix names of keys
The stricter checking with the upcoming logcheck v0.4.1 pointed out these names
which don't comply with our recommendations in
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#name-arguments.
2023-01-23 14:24:29 +01:00
Patrick Ohly
66dfac3b18 kube-proxy: support the logging feature gates
When trying to bring up a cluster via kubeadm with these feature gates enabled,
kube-proxy fails because it didn't know about them:

    kind: Cluster
    apiVersion: kind.x-k8s.io/v1alpha4
    nodes:
    - role: control-plane
    - role: worker
    - role: worker
    featureGates: {"DynamicResourceAllocation":true,"ContextualLogging":true}
    runtimeConfig: {"resource.k8s.io/v1alpha1":"true"}

    =>

    2023-01-20T07:07:54.474966617Z stderr F E0120 07:07:54.474846       1 run.go:74] "command failed" err="failed complete: unrecognized feature gate: ContextualLogging"

The effect of the logging feature gates is minor for kube-proxy, supporting
them is mostly useful for the sake of consistency and to support kubeadm.
2023-01-20 19:31:57 +01:00
Clayton Coleman
95051a63b3
wait: Use a context implementation for ContextForChannel
ContextForChannel uses a goroutine to transform a channel close to
a context cancel. However, this exposes a synchronization issue if
we want to unify the underlying implementation between contextless
and with context - a ConditionFunc that closes the channel today
expects the behavior that no subsequent conditions will be invoked
(we have a test in wait_test.go TestUntilReturnsImmediately that
verifies this expectation). We can't unify the implementation
without ensuring this property holds.

To do that this commit changes from the goroutine propagation to
implementing context.Context and using stopCh as the Done(). We
then implement Err() by returning context.Canceled and stub the
other methods. Since our context cannot be explicitly cancelled
by users, we cease to return the cancelFn and callers that need
that behavior must wrap the context as normal.

This should be invisible to clients - they would already observe
the same behavior from the context, and the existing error
behavior of Poll* is preserved (which ignores ctx.Err()).

As a side effect, one less goroutine is created making it more
efficient.
2023-01-18 10:00:47 -05:00
Hao Ruan
2adb95c376 Add linter to check if api docs match field tag names 2023-01-18 10:49:12 +08:00
Tobias Giese
ea46c91868 kubeadm: promote member after the static pod manifest was written
Signed-off-by: Tobias Giese <tobias.giese@mercedes-benz.com>
Co-authored-by: Christian Schlotter <christi.schlotter@gmail.com>
2023-01-16 11:11:58 +01:00
Kubernetes Prow Robot
fd885b751d
Merge pull request #115068 from neolit123/revert-115000-feature/UpdateOrCreateTokenAddErrProcessing
Revert "UpdateOrCreateToken get secrets err handling optimization"
2023-01-15 07:30:31 -08:00
Kubernetes Prow Robot
3a8e2e399b
Merge pull request #114393 from danielvegamyhre/myfeature
Option to ignore existing pods' preferred inter-pod affinities if the incoming pod has no preferred inter-pod affinities
2023-01-13 17:28:15 -08:00
Daniel Vega-Myhre
41817b1888 optionally ignore preferred terms of existing pods unless incoming pod
has inter-pod affinities
2023-01-13 23:15:53 +00:00
Lubomir I. Ivanov
7938631e22
Revert "UpdateOrCreateToken get secrets err handling optimization" 2023-01-14 00:11:49 +02:00
Kubernetes Prow Robot
a66aad2d80
Merge pull request #115000 from helen-frank/feature/UpdateOrCreateTokenAddErrProcessing
UpdateOrCreateToken get secrets err handling optimization
2023-01-12 19:57:12 -08:00
Kubernetes Prow Robot
2b69bec35d
Merge pull request #114901 from SataQiu/fix-lint-error-20230108
Fix gocritic lint errors for cmd/kubeadm/*
2023-01-12 09:05:06 -08:00
helen
e6591d24ce when UpdateOrCreateTokens get secrets, if the error is not a NotFound, the error is thrown in time
Signed-off-by: helen <haitao.zhang@daocloud.io>
2023-01-12 20:50:02 +08:00
SataQiu
3df577ea28 kubeadm: remove unused variable DefaultAuditPolicyLogMaxAge 2023-01-12 12:30:30 +08:00
Dave Chen
765ef1783b kubeadm: stop using of CRI endpoints without URL scheme
run the testcase with `-v` flag will reveal the warning,
e.g.
`W1103 ... Usage of CRI endpoints without URL scheme is deprecated...`

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-01-12 10:59:34 +08:00
Dave Chen
a7b610c3bb kubeadm: use the right methods for logging if no args are passing
Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-01-12 10:59:34 +08:00
Dave Chen
aae1f2a85f kubeadm: cri-socket is not allowed for mixed configuration
Set the `cri-socket` both in flags and config file will hit errors,
this should not be a valid case to validate in current testcases.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2023-01-12 10:59:34 +08:00
Kubernetes Prow Robot
280473ebc4
Merge pull request #114773 from yangjunmyfm192085/fixsmallerrorlog
fix a small log error about proxy
2023-01-11 07:51:43 -08:00
Kubernetes Prow Robot
6699db9f59
Merge pull request #114957 from claudiubelu/kubeadm-preflight-checks-admin
unit tests: Fixes kubeadm enforce requirements test
2023-01-11 03:33:43 -08:00
Claudiu Belu
3af2c257e8 unit tests: Fixes kubeadm enforce requirements test
enforceRequirements will run preflight checks, including whether the user
is privileged is not. Because of this, the test will make different assertions
based on the user's UID. However, we don't have UIDs on Windows, so we're asserting
the wrong thing.

This fix addresses the issue.
2023-01-10 16:56:14 +00:00
Jordan Liggitt
3b64cb5f11
Include head and tail of clipped test messages 2023-01-10 11:26:34 -05:00
SataQiu
e0f11d9c5b kubeadm: fix gocritic lint errors 2023-01-08 11:23:26 +08:00
SataQiu
5d99ad1182 kubeadm: update .import-restrictions 2023-01-07 23:46:02 +08:00
Ian K. Coolidge
f3829c4be3 cpuset: Rename 'NewCPUSet' to 'New' 2023-01-06 23:32:51 +00:00