Commit Graph

63 Commits

Author SHA1 Message Date
Marek Counts
a9eea0a353 kubeadm-reset: add means to clear the ClusterStatus
Add ResetClusterStatusForNode() that clears a certain
control-plane node's APIEndpoint from the ClusterStatus
key in the kubeadm ConfigMap on "kubeadm reset".
2019-03-07 04:03:19 +02:00
Kubernetes Prow Robot
5ff303000a Merge pull request #72685 from yagonobre/bump-minimum
Bump minimum kubeadm supported version to v1.13
2019-03-06 08:24:10 -08:00
Yago Nobre
59d2f13850 Bump minimum kubeadm supported version to v1.12 2019-03-05 23:45:17 -03:00
Lubomir I. Ivanov
6f6b364b9c kubeadm: update output of init, join reset commands
- move most unrelated to phases output to klog.V(1)
- rename some prefixes for consistency - e.g.
[kubelet] -> [kubelet-start]
- control-plane-prepare: print details for each generated CP
component manifest.
- uppercase the info text for all "[reset].." lines
- modify the text for one line in reset
2019-03-06 03:17:35 +02:00
ducnv
e11916da8e kubeadm cleanup: master -> control-plane (cont.4) 2019-02-25 08:29:19 +07:00
Rostislav M. Georgiev
51197e4393 kubeadm: Refactor InitConfiguration init APIs
Currently ConfigFileAndDefaultsToInternalConfig and
FetchConfigFromFileOrCluster are used to default and load InitConfiguration
from file or cluster. These two APIs do a couple of completely separate things
depending on how they were invoked. In the case of

ConfigFileAndDefaultsToInternalConfig, an InitConfiguration could be either
defaulted with external override parameters, or loaded from file.
With FetchConfigFromFileOrCluster an InitConfiguration is either loaded from
file or from the config map in the cluster.

The two share both some functionality, but not enough code. They are also quite
difficult to use and sometimes even error prone.

To solve the issues, the following steps were taken:

- Introduce DefaultedInitConfiguration which returns defaulted version agnostic
  InitConfiguration. The function takes InitConfiguration for overriding the
  defaults.

- Introduce LoadInitConfigurationFromFile, which loads, converts, validates and
  defaults an InitConfiguration from file.

- Introduce FetchInitConfigurationFromCluster that fetches InitConfiguration
  from the config map.

- Reduce, when possible, the usage of ConfigFileAndDefaultsToInternalConfig by
  replacing it with DefaultedInitConfiguration or LoadInitConfigurationFromFile
  invocations.

- Replace all usages of FetchConfigFromFileOrCluster with calls to
  LoadInitConfigurationFromFile or FetchInitConfigurationFromCluster.

- Delete FetchConfigFromFileOrCluster as it's no longer used.

- Rename ConfigFileAndDefaultsToInternalConfig to
  LoadOrDefaultInitConfiguration in order to better describe what the function
  is actually doing.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-11 14:45:34 +02:00
Rostislav M. Georgiev
aa414e139e kubeadm: Bump minimum Kubernetes version to v1.12
Bump MinimumControlPlaneVersion and MinimumKubeletVersion to v1.12 and update
any related tests.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-20 16:21:49 +02:00
Lucas Käldström
5656338b6e Update unit tests after the rename 2018-11-09 14:47:45 +02:00
Lucas Käldström
731bcdc864 kubeadm: InitConfiguration.APIEndpoint -> LocalAPIEndpoint 2018-11-09 14:47:21 +02:00
fabriziopandini
fbd6d2d68a autogenerated 2018-10-27 18:04:44 +02:00
fabriziopandini
d30492ee8f kubeadm graduate kubelet-start phase 2018-10-27 18:04:33 +02:00
Christoph Blecker
97b2992dc1 Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
fabriziopandini
b4092acdb6 autogenerated 2018-10-04 13:20:20 +02:00
fabriziopandini
488ac6825b Automated bump from v1alpha3 references to v1beta1 2018-10-04 12:03:38 +02:00
k8s-ci-robot
1fbf7c5542 Merge pull request #69259 from xichengliudui/fix180929
Fix typo
2018-10-01 22:20:39 -07:00
k8s-ci-robot
2f2b445e0b Merge pull request #69058 from fabriziopandini/kubeadm-cleanup-v1alpha3-api-conversion-and-restore-fuzzer
Kubeadm cleanup v1alpha3 api conversion and restore fuzzer
2018-10-01 18:04:24 -07:00
RA489
824ed161d5 Rename the constant that refers to the kubeadm-config ConfigMap 2018-10-01 15:50:04 +05:30
xichengliudui
3e2d2ea42d fix typo 2018-09-29 06:17:20 -04:00
fabriziopandini
8e887e1eee cleanup v1alpha3 conversion to internal 2018-09-28 10:42:38 +02:00
Lubomir I. Ivanov
fb365768e0 kubeadm: update MinimumControlPlaneVersion to v1.11.0
Update MinimumControlPlaneVersion to v1.11.0. Also update related
unit tests and test configurations.
2018-09-15 05:26:40 +03:00
fabriziopandini
d9b4b1fc1a autogenerated 2018-09-04 09:10:26 +02:00
fabriziopandini
3f70af3685 upload and fetch of kubeam config v1alpha3 from cluster 2018-09-04 09:09:55 +02:00
fabriziopandini
7dfb3c7134 kubeadm config add support for more than one APIEndpoint 2018-08-27 09:00:26 +02:00
Kubernetes Submit Queue
74f44482ec Merge pull request #66973 from fabriziopandini/kubeadm-ha-upgrade
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 ha upgrade

**What this PR does / why we need it**:
This PR implements one of the actions defined by https://github.com/kubernetes/kubeadm/issues/751 (checklist form implementing HA in kubeadm). see [KEP 0015](https://github.com/kubernetes/community/blob/master/keps/sig-cluster-lifecycle/0015-kubeadm-join-master.md) for more context

With this PR, kubeadm implements a new command `kubeadm upgrade node experimental-control-plane` that managed upgrade of control plane components on a secondary control plane instance. 

The entire workflow in case of HA clusters will be:

- Upgrade the control plane
   - run `kubeadm upgrade apply` on a first control plane instance
   - run `kubeadm upgrade node experimental-control-plane` on secondary control plane instances
- Upgrade nodes

**Special notes for your reviewer**:
/CC @timothysc @luxas @chuckha  @kubernetes/sig-cluster-lifecycle-pr-reviews 

**Release note**:
```
kubeadm now has the `kubeadm upgrade node experimental-control-plane` command for upgrading secondary control plane instances created with `kubeadm join --experimental-control-plane`. 
```
2018-08-22 18:02:49 -07:00
fabriziopandini
202e67c4a7 kubeadm-ha-upgrade 2018-08-22 23:09:16 +02:00
Lucas Käldström
5224551fa1 kubeadm: Split out ClusterConfiguration from InitConfiguration
Trivial rebasement, fixed some broken tests,
and inserted some TODOs: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-08-22 11:43:02 +03:00
fabriziopandini
f9000a3f8a kubeadm-ha-phases 2018-07-12 16:45:12 +02: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
17b3b28190 Update unit tests 2018-07-08 21:32:51 +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
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
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07: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
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
Chuck Ha
125f5ac61a Replace glog.Info{f,ln} with fmt.Print{f,ln}
This follows the pattern `kubectl` uses for logging.

There are two remaining glog.Infof call that cannot be removed easily.

One glog call comes from kubelet validation which calls features.SetFromMap.
The other comes from test/e2e during kernel validation.

Mostly fixes kubernetes/kubeadm#852

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-06-04 10:34:31 -04:00
Lucas Käldström
17adbf9b08 Add unit tests for the new Bootstrap Token objects and functions 2018-05-31 22:19:47 +03:00
Lucas Käldström
c473039580 kubeadm: Initial refactor of the Bootstrap Tokens. Add the new API objects, add/move helpers and start using the new flow in the code 2018-05-31 22:19:26 +03:00
Lucas Käldström
fbfe6cf443 autogenerated 2018-05-16 10:00:25 +01:00
Lucas Käldström
e28242a245 autogenerated move to reference the v1alpha2 API inside of kubeadm 2018-05-16 09:59:41 +01:00
Lucas Käldström
8074a1987e autogenerated bazel 2018-05-14 18:12:31 +01:00
Lucas Käldström
80a31d7a5a Stop installing kubeadm types in the generic, legacy scheme 2018-05-14 18:11:30 +01:00
Lucas Käldström
68c68dfadc Rename kubeadmapiext to the more explicit kubeadmapiv1alpha1 2018-05-14 12:31:48 +03:00
liz
6560ba7bed Use apimachinery for serialising kubeadm MasterConfiguration
this ensures configmaps have kind and versions in them
2018-05-11 14:35:19 -04:00
liz
859add6603 Update generated artefacts 2018-05-11 14:35:10 -04:00
xiangpengzhao
b0bdaa3a4c Fix garbled code in kubeadm output 2018-04-16 16:56:20 +08:00
Malhar Vora
9c4706f519 Implement verbosity feature for kubeadm init
Fixes #340

Adds functionality to see logs with various level of verbosity.

Currently there are two verbosity levels: 0 and 1
2018-03-25 09:43:31 -07:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00