Commit Graph

23 Commits (9807360fe30d2947eea5833aeaf19d47c9c3c89c)

Author SHA1 Message Date
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
zhengchuan hu f4df66aa17 Fix broken links in kubelet 2017-09-29 19:22:23 +08:00
Michael Taufen 62fecfb0f4 Fix a potential file leak
Previously, if a write or sync error occurred, we would not have called
Close(). This commit refactors ReplaceFile() so that we are sure to call
Close(), and also attempts to delete the temporary file if errors occur.
2017-09-25 20:45:52 -07:00
Kubernetes Submit Queue d8847a8f1d Merge pull request #52119 from mtaufen/sync-files
Automatic merge from submit-queue

fsync config checkpoint files after writing

@yujuhong brought up that it's possible for a hard reboot to result in empty checkpoint files, if they haven't been synced to disk yet. This PR ensures that Kubelet configuration checkpoints are synced after writing to avoid this issue.

fixes #52222

**Release note**:
```release-note
NONE
```
2017-09-12 05:41:25 -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
Michael Taufen 47beb80368 fsync config checkpoint files after writing 2017-09-07 14:42:18 -07:00
Kubernetes Submit Queue f07279ada2 Merge pull request #51474 from verult/ProberTest
Automatic merge from submit-queue (batch tested with PRs 51805, 51725, 50925, 51474, 51638)

Flexvolume dynamic plugin discovery: Prober unit tests and basic e2e test.

**What this PR does / why we need it**: Tests for changes introduced in PR #50031 .
As part of the prober unit test, I mocked filesystem, filesystem watch, and Flexvolume plugin initialization.
Moved the filesystem event goroutine to watcher implementation.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51147

**Special notes for your reviewer**:
First commit contains added functionality of the mock filesystem.
Second commit is the refactor for moving mock filesystem into a common util directory.
Third commit is the unit and e2e tests.

**Release note**:

```release-note
NONE
```
/release-note-none
/sig storage
/assign @saad-ali @liggitt 
/cc @mtaufen @chakri-nelluri @wongma7
2017-09-03 11:10:05 -07:00
Michael Taufen 0e25cbd6a0 Separate feature gates for dynamic kubelet config vs loading from a file 2017-08-30 14:52:37 -07:00
Cheng Xing 8618e28194 Refactoring for filesystem mock move 2017-08-28 16:17:15 -07:00
Cheng Xing fde9541c80 Moving filesystem mock to pkg/util, and added some functionality 2017-08-28 11:33:26 -07:00
Michael Taufen 251e8f5f1f Test loading Kubelet config from a file 2017-08-26 12:53:59 -07:00
Michael Taufen 76c41a252c Remove crash loop detection from the dynamic kubelet config feature
The subfeature was a cool idea, but in the end it is very complex to
separate Kubelet restarts into crash-loops caused by config vs.
crash-loops caused by other phenomena, like admin-triggered node restarts,
kernel panics, and and process babysitter behavior. Dynamic kubelet config
will be better off without the potential for false positives here.

Removing this subfeature also simplifies dynamic configuration by
reducing persistent state:
- we no longer need to track bad config in a file
- we no longer need to track kubelet startups in a file
2017-08-22 12:37:22 -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