Commit Graph

53 Commits

Author SHA1 Message Date
Di Xu
b3dfe0c652 nodes: improve handling of erroneous host names 2018-08-01 14:57:25 +08:00
Xianglin Gao
6ca1428256 Use KubeletRunDirectory instead of hard-coded way
Signed-off-by: Xianglin Gao <xianglin.gxl@alibaba-inc.com>
2018-07-27 12:22:57 +08:00
Patrice Peterson
a20ff91c4c kubeadm: stop setting UID in the kubelet ConfigMap
Fixes #921.
2018-07-19 10:34:05 +02:00
Kubernetes Submit Queue
49454a2635 Merge pull request #65576 from stewart-yu/stewart-kubelet-read#02
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>.

[kubeadm]fix DynamicKubeletConfig feature to beta

**What this PR does / why we need it**:
As [PR](https://github.com/kubernetes/kubernetes/pull/64275) get merged,  DynamicKubeletConfig feature convert to  `beta` in v1.11, and set to `true` in default.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #[https://github.com/kubernetes/kubeadm/issues/957](https://github.com/kubernetes/kubeadm/issues/957)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-07-14 03:04:43 -07:00
Russ Cox
2bd91dda64 kubernetes: fix printf format errors
These are all flagged by Go 1.11's
more accurate printf checking in go vet,
which runs as part of go test.

Lubomir I. Ivanov <neolit123@gmail.com>
applied ammend for:
  pkg/cloudprovider/provivers/vsphere/nodemanager.go
2018-07-11 00:10:15 +03:00
Lucas Käldström
52f0591ad9 Automated rename from MasterConfiguration to InitConfiguration 2018-07-09 04:55:02 +03:00
Lucas Käldström
0be8955466 autogenerated 2018-07-08 21:33:56 +03:00
Lucas Käldström
495ac9883d Make kubeadm support {un,}marshalling ComponentConfig structs as different YAML documents 2018-07-08 21:32:28 +03:00
Lucas Käldström
5e6be9de77 autogenerated 2018-07-08 09:55:33 +03:00
Lucas Käldström
3594d2ca39 Update unit tests 2018-07-08 09:50:10 +03:00
Lucas Käldström
35673da7c5 Start using the new path in the internal config for the ComponentConfig structs 2018-07-08 09:49:34 +03:00
Lucas Käldström
7e488e7c07 autogenerated 2018-07-04 14:08:02 +03:00
Lucas Käldström
c9b52ede7e Automated bump from v1alpha2 references to v1alpha3 2018-07-04 14:07:53 +03:00
stewart-yu
37fdd1d4c5 fix DynamicKubeletConfig feature to beta 2018-07-04 08:52:27 +08:00
Di Xu
b3242c4be6 kubeadm: remove redundant flags settings for kubelet 2018-07-01 21:42:43 +08:00
Kubernetes Submit Queue
e8f35c02a9 Merge pull request #65354 from hanxiaoshuai/fix06222
Automatic merge from submit-queue (batch tested with PRs 65349, 65354, 65402). 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>.

fixtodo: Move these kubelet start/stop functions to phases/kubelet

**What this PR does / why we need it**:
fixtodo: Move these kubelet start/stop functions to phases/kubelet
**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-06-30 10:50:05 -07:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
hangaoshuai
95797f13ca fixtodo: Move these kubelet start/stop functions to phases/kubelet 2018-06-22 15:20:18 +08:00
Lucas Käldström
f126f78266 autogenerated 2018-06-12 19:00:15 +03:00
Lucas Käldström
5d96a719fb kubeadm: Fix a couple of small-ish bugs for v1.11 2018-06-12 18:59:34 +03:00
Davanum Srinivas
2072dc3ce8 Ensure directory is created for kubelet configuration 2018-06-07 15:39:40 -04:00
Lucas Käldström
7a87cf1c28 autogenerated 2018-06-06 23:41:10 +03:00
Lucas Käldström
1a0de9442e Add a 'kubeadm upgrade node config' command and finish up the kubelet integration work 2018-06-06 23:17:04 +03:00
Kubernetes Submit Queue
7d782400db Merge pull request #64792 from luxas/patch_node_crisocket
Automatic merge from submit-queue (batch tested with PRs 63717, 64646, 64792, 64784, 64800). 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>.

kubeadm: Upload CRISocket information in kubeadm init/join

**What this PR does / why we need it**:

As a side-effect, `kubeadm join` will become blocking on the kubelet doing the TLS bootstrap. This partially also fixes problems when users run `kubeadm join` and it returns successfully without anything happening as the kubelet is actually unhealthy. If that happens now `kubeadm join` will exit with a non-zero code.

What this PR does is it uploads the CRISocket information to the Node API object as a workaround until we have something like https://github.com/kubernetes/kubernetes/issues/64460 in place that will solve this problem for real. This way we won't lose the CRISocket information which we would otherwise do.
This can be used for `kubeadm upgrade` or `kubeadm reset` in future releases.

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

**Special notes for your reviewer**:
Depends on https://github.com/kubernetes/kubernetes/pull/64624

**Release note**:

```release-note
[action required] TODO
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
2018-06-06 01:24:17 -07:00
Lucas Käldström
0cb6f0f0fc autogenerated 2018-06-06 01:31:20 +03:00
Lucas Käldström
041858232c kubeadm: Upload CRISocket information and hence make kubeadm join blocking 2018-06-06 01:05:49 +03:00
liz
b42564a5cb Kubeadm-initialised kubelet uses provided hostname if present
If --node-name is passed in to `kubeadm init`, `--hostname-override` will be
passed to kubelet.
2018-06-04 14:25:56 -04:00
liz
3da1228186 Bazel artefacts 2018-06-04 14:04:02 -04:00
leigh schrandt
b7df5cd2f8 kubeadm: Set the kubelet --resolv-conf flag conditionally on init
Fixes https://github.com/kubernetes/kubeadm/issues/845
2018-06-03 00:50:22 -06:00
Lubomir I. Ivanov
2a63ba1db6 kubeadm: conditionally set the kubelet cgroup driver for Docker
Add a new utility file - util/cgroupdriver.go.
Currently it only contains the public function GetCgroupDriverDocker().
The function uses 'docker info' to obtain the cgroup driver
for Docker.

On a later stage this file can contain more methods for different
CRI.

Use GetCgroupDriverDocker() in phases/kubelet/flags.go
to conditionally set the 'cgroup-driver' argument. On error
print a warning and don't set the argument value.

Add unit tests in cgroupdriver_test.go.
2018-05-30 20:29:21 +03:00
Lucas Käldström
8bcbc1e9bd autogenerated 2018-05-29 17:52:22 +03:00
Lucas Käldström
fd47f8b20c Update unit tests to use the new NodeRegistration object 2018-05-29 17:52:10 +03:00
Lucas Käldström
b48f23b786 kubeadm: Move .NodeName and .CRISocket to a common sub-struct 2018-05-29 17:51:39 +03:00
Lucas Käldström
60b0eeb2a4 autogenerated 2018-05-22 09:31:28 +03:00
Lucas Käldström
0aa0f3208a kubeadm: Write kubelet config file to disk and persist in-cluster. Also write runtime environment file and fixup the kubelet phases command 2018-05-22 09:12:25 +03: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
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
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Lucas Käldström
f7c494fe5b kubeadm: Fix a couple of upgrade/downgrade-related bugs 2017-12-02 00:27:07 +02:00
xiangpengzhao
e89927a890 Should make dir before writing file. 2017-11-22 23:01:54 +08:00
xiangpengzhao
6034ef48a9 Fix deadlock of writing file on node. 2017-11-22 15:53:20 +08:00
xiangpengzhao
7adced12a6 Refactoring writing kubeletconfig. 2017-11-22 15:53:20 +08:00
xiangpengzhao
8565ee89c5 Write marshalled kubeletconfig object to init-config-dir 2017-11-22 15:53:19 +08:00
xiangpengzhao
5322cc5e02 Auto generated BUILD files. 2017-11-22 15:53:07 +08:00
Kubernetes Submit Queue
e89bbb5ca9 Merge pull request #56014 from xiangpengzhao/join-kubelet-conf
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>.

Re-engineer the kubeadm join logic.

**What this PR does / why we need it**:
- wait for the kubelet to create `/etc/kubernetes/kubelet.conf`
- use those credentials to PATCH the node

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
ref: https://github.com/kubernetes/kubeadm/issues/28#issuecomment-345502933

**Special notes for your reviewer**:
/cc @kubernetes/sig-cluster-lifecycle-pr-reviews

**Release note**:

```release-note
NONE
```
2017-11-19 08:06:33 -08:00
xiangpengzhao
12409789a1 Re-engineer the kubeadm join logic. 2017-11-19 22:03:50 +08:00
xiangpengzhao
4453f2c777 Fix panic when assigning configmap UID of kubelet configuration. 2017-11-19 15:57:11 +08:00
xiangpengzhao
122e0e231d Add test case for phase kubelet. 2017-11-18 10:22:16 +08:00
xiangpengzhao
a4a537d2d1 Retry when update node with configmap fails. 2017-11-18 10:22:16 +08:00