Commit Graph

45 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
232c0de57a
Merge pull request #115101 from HirazawaUi/delte-pkg-kubelet-unused-functions
delete unused functions in pkg/kubelet directory
2023-01-29 17:21:08 -08:00
Jurj Andrei George
4df989d719 Skip failing Windows unit tests
As discussed during the SIG Testing meeting on January 10, 2023, failing
Windows unit tests are now skipped.
These changes should be reverted when the unit tests wil get fixed.
Mentioned SIG Testing meeting:
https://docs.google.com/document/d/1z8MQpr_jTwhmjLMUaqQyBk1EYG_Y_3D4y4YdMJ7V1Kk/edit#heading=h.qwblxf2uhgoo
2023-01-18 14:18:41 +02:00
HirazawaUi
a8173eded3 delete unused functions in pkg/kubelet directory 2023-01-16 20:00:49 +08:00
saltbo
6f878d92fb
fix: update the fsstore_test.go
Signed-off-by: saltbo <saltbo@foxmail.com>
2022-10-23 21:51:48 +08:00
Wojciech Tyczyński
6088fe4221 Remove no-longer used selflink code from kubelet 2022-01-14 10:38:23 +01:00
Davanum Srinivas
5feff280e1
remove fakefs to drop spf13/afero dependency
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-06-24 09:51:34 -04:00
njuptlzf
6738380a80 cleanup tempDir after fsstore_test.go 2021-05-27 10:10:08 +08:00
afrouz
190b5250ec
Migrate pkg/kubelet/kubeletconfig to Structured Logging
Remove plg/kubelet/kubeletconfig/util/log

Co-authored-by: Elana Hashman <ehashman@redhat.com>
2021-03-15 15:42:34 -07:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
obitech
bba15d358c Add strict deserialization for kubelet component config
CodecFactory is started with EnableStrict that throws an error when deserializing
a Kubelet component config that is malformed (e.g. unknown or duplicate keys).

When strict decoding a v1beta1 config fails, non-strict decoding is used and a warning is emitted.
For this, NewSchemeAndCodecs is now a variadic function that can take multiple
arguments for augmenting the returned codec factory. Strict decoding is
then explicitely enabled when decoding a kubelet config.
Additionally, decoding a RemoteConfigSource needs to be non-strict
to avoid an accidental error when it contains newer API fields that are not
yet known to the Kubelet.

DecodeKubeletConfiguration returns a wrapped error instead of a simple string
so its type can be tested.

Add unit tests for unhappy paths when loading a component config

Add keys for test cases struct fields, remove nil field initialization

Co-Authored-By: Jordan Liggitt <jordan@liggitt.net>
2019-10-24 19:37:35 +02:00
Tim Allclair
3f510c69f6 Remove dead code from pkg/kubelet/... 2019-08-21 10:40:21 -07:00
wojtekt
93d7feb8a2 Fix kubelet watches to propagate all options 2019-07-15 12:49:45 +02:00
Daniel (Shijun) Qian
5268f69405 fix duplicated imports of k8s code (#77484)
* fix duplicated imports of api/core/v1

* fix duplicated imports of client-go/kubernetes

* fix duplicated imports of rest code

* change import name to more reasonable
2019-05-08 10:12:47 -07:00
SenXuDC
48c715515e
Update fsstore.go 2018-12-06 23:01:52 +08:00
Michael Taufen
1089cb629f Don't compare interface values in dynamic config controller
This previously caused a panic when moving lastKnownGood between two
non-nil values, because we were comparing the interface wrapper instead
of comparing the NodeConfigSources. The case of moving from one non-nil
lastKnownGood config to another doesn't appear to be tested by the e2e
node tests. I added a unit test and an e2e node test to help catch bugs
with this case in the future.
2018-11-09 10:45:12 -08:00
Lucas Käldström
8b6a7ee075
autogenerated go code, godeps, bazel and gofmt 2018-09-02 14:38:59 +03:00
Lucas Käldström
0707b1274f
Automated package reference rename 2018-09-02 14:15:38 +03:00
Lucas Käldström
844487aea4
autogenerated 2018-08-29 20:21:17 +03:00
Lucas Käldström
7a840cb4c8
automated: Rename all package references 2018-08-29 19:07:52 +03:00
Daisuke Taniwaki
7d4c85b02c
Fix test failure of truncated time 2018-06-30 01:14:44 +09:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Michael Taufen
b5648c3f61 dynamic Kubelet config reconciles ConfigMap updates 2018-05-21 09:03:58 -07:00
Michael Taufen
fcc1f8e7b6 Move to a structured status for dynamic Kubelet config
Updates dynamic Kubelet config to use a structured status, rather than a
node condition. This makes the status machine-readable, and thus more
useful for config orchestration.

Fixes: #56896
2018-05-15 11:25:12 -07:00
Michael Taufen
c41cf55a2c explicit kubelet config key in Node.Spec.ConfigSource.ConfigMap
This makes the Kubelet config key in the ConfigMap an explicit part of
the API, so we can stop using magic key names.

As part of this change, we are retiring ConfigMapRef for ConfigMap.
2018-05-08 15:37:26 -07:00
Michael Taufen
c9d398d01e unpack dynamic kubelet config payloads to files
This PR unpacks the downloaded ConfigMap to a set of files on the node.

This enables other config files to ride alongside the
KubeletConfiguration, and the KubeletConfiguration to refer to these
cohabitants with relative paths.

This PR also stops storing dynamic config metadata (e.g. current,
last-known-good config records) in the same directory as config
checkpoints. Instead, it splits the storage into `meta` and
`checkpoints` dirs.
2018-04-19 09:18:53 -07:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Michael Taufen
9ebaf5e7d2 Move the kubeletconfig v1alpha1 API to beta, rename to kubelet.config.k8s.io 2018-02-14 17:30:22 -08:00
Michael Taufen
dd74a39700 Make ConfigOK status messages more human readable by including the API path to the object instead of the UID 2018-01-03 16:05:43 -08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Michael Taufen
d5d7d6d684 Send an event just before the Kubelet restarts to use a new config 2017-12-20 13:02:55 -08:00
Kubernetes Submit Queue
2d914ee703 Merge pull request #53984 from sttts/sttts-legacyscheme
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

pkg/api: extract Scheme/Registry/Codecs into pkg/api/legacyscheme

This serves as

- a preparation for the pkg/api->pkg/apis/core move
- and makes the dependency to the scheme explicit when vizualizing
  left depenncies.

The later helps with our our efforts to split up the monolithic repo
into self-contained sub-repos, e.g. for kubectl, controller-manager
and kube-apiserver in the future.
2017-10-18 10:49:10 -07:00
Dr. Stefan Schimanski
cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski
7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Marcin Owsiany
49553d4a7a Fix lint warnings for useless err checks.
This check was recently added to golint.
2017-10-17 12:52:54 +02:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Michael Taufen
a846ba191c Improve dynamic kubelet config e2e node test and fix bugs
Rather than just changing the config once to see if dynamic kubelet
config at-least-sort-of-works, this extends the test to check that the
Kubelet reports the expected Node condition and the expected configuration
values after several possible state transitions.

Additionally, this adds a stress test that changes the configuration 100
times. It is possible for resource leaks across Kubelet restarts to
eventually prevent the Kubelet from restarting. For example, this test
revealed that cAdvisor's leaking journalctl processes (see:
https://github.com/google/cadvisor/issues/1725) could break dynamic
kubelet config. This test will help reveal these problems earlier.

This commit also makes better use of const strings and fixes a few bugs
that the new testing turned up.

Related issue: #50217
2017-09-07 15:50:17 -07:00
Cheng Xing
8618e28194 Refactoring for filesystem mock move 2017-08-28 16:17:15 -07:00
Michael Taufen
a90d81620b Revert "Merge pull request #51008 from kubernetes/revert-50789-fix-scheme"
This reverts commit f4afdecef8, reversing
changes made to e633a1604f.

This also fixes a bug where Kubemark was still using the core api scheme
to manipulate the Kubelet's types, which was the cause of the initial
revert.
2017-08-21 11:28:05 -07:00
Shyam JVS
5591914d62 Revert "Don't register the kubeletconfig group with the default Scheme" 2017-08-21 11:15:27 +02:00
Michael Taufen
0af9f756cd Don't register the kubeletconfig group with the default Scheme 2017-08-18 13:51:39 -07:00
Michael Taufen
24bab4c20f move KubeletConfiguration out of componentconfig API group 2017-08-15 08:12:42 -07:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Michael Taufen
443d58e40a Dynamic Kubelet Configuration
Alpha implementation of the Dynamic Kubelet Configuration feature.
See the proposal doc in #29459.
2017-08-08 12:21:37 -07:00