Commit Graph

2385 Commits (160ed26c20e8114579dd15e0a7f8bf51b916aa12)

Author SHA1 Message Date
Lubomir I. Ivanov a1a7ecaab3 kubeadm: add missing --config flag to mark-control-plane phase 2018-11-24 05:18:03 +02:00
Yago Nobre 52835fbc80
Fix kubeadm reset in case of external etcd 2018-11-23 16:27:00 -02:00
fabriziopandini 8a53031b4e Fix etcd connect for join --control-plane 2018-11-22 17:17:27 +01:00
Rostislav M. Georgiev 0110b6e8bf kubeadm: Remove forgotten debug Println
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-22 17:05:23 +02:00
k8s-ci-robot b6a0718858
Merge pull request #71323 from bart0sh/PR0043-kubeadm-init-use-commandline-options-with-config
kubeadm: override node registration options from command line (follow-up)
2018-11-22 01:46:51 -08:00
yuexiao-wang 1d38de3a29 fix test names for manifests
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-22 15:30:24 +08:00
Ed Bartosh b4b4718fc1 kubeadm: override node registration options from command line
'kubeadm init' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.
2018-11-21 21:39:07 +02:00
Rostislav M. Georgiev 037fb6103e kubeadm: config migrate handles more valid configs
kubeadm config migrate uses AnyConfigFileAndDefaultsToInternal, which can
unmarshal config from file only if InitConfiguration or JoinConfiguration are
present. Even with that in mind, it can only return a singlie config object,
with InitConfiguration taking precendence over JoinConfiguration. Thus, the
following cases were not handled properly, while they were perfectly valid for
kubeadm init/join:

- ClusterConfiguration only file caused kubeadm config migrate to exit with
  error.
- Init + Join configurations in the same file caused Init + Cluster
  configuration to be produced (ignoring JoinConfiguration). The same is valid
  when the combo is Init + Cluster + Join configurations.
- Cluster + Join configuration ignores ClusterConfiguration and only
  JoinConfiguration gets migrated.

To fix this, the following is done:
- Introduce MigrateOldConfigFromFile which migrates old config from a file,
  while ensuring that all kubeadm originated input config kinds are taken care
  of. Add comprehensive unit tests for this.
- Replace the use of AnyConfigFileAndDefaultsToInternal in
  kubeadm config migrate with MigrateOldConfigFromFile.
- Remove the no longer used and error prone AnyConfigFileAndDefaultsToInternal.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-21 13:18:39 +02:00
k8s-ci-robot 1431aeb45d
Merge pull request #71283 from Klaven/kubeadm_857
Updates to always pass spec.nodeName as --hostname-override
2018-11-20 17:31:24 -08:00
k8s-ci-robot aac9ee1793
Merge pull request #71259 from rosti/minver-bump-12
kubeadm: Bump minimum Kubernetes version to v1.12
2018-11-20 17:31:15 -08:00
k8s-ci-robot f8983a8988
Merge pull request #70633 from leblancd/kubeadm_etcd_v6_fix
Fix kubeadm etcd manifests to use brackets around IPv6 addrs
2018-11-20 15:34:24 -08:00
Marek Counts 5ad7e4ee09 Fixes kubeadm 857
updated manifest file to always pass spec.nodeName as the --hostname-override.
2018-11-20 17:44:26 -05:00
Ed Bartosh 012e46320b kubeadm: override node registration options from command line
'kubeadm join' silently ignores --node-name and --cri-socket
command line options if --config option is specified.

In some cases it's much easier for users to override these parameters
from the command line instead of updating config, especially for
multi-node automatic deployments where only node name should be changed.

Implemented setting 'name' and 'criSocket' options from the command
line even if --config command line option is used.
2018-11-20 16:26:57 +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
Ed Bartosh bab556f7a6 kubeadm: improve hostport parsing error messages
Added hostport and host/port parts to the error messages
produced by ParseHostPort API.

This should help users to better identify parsing issues.

Fixes: kubernetes/kubeadm#1159
2018-11-20 13:21:36 +02:00
k8s-ci-robot 50e02fd0cc
Merge pull request #71229 from chuckha/etcd-server
kubeadm: adds etcd server version for 1.13
2018-11-19 16:25:42 -08:00
k8s-ci-robot 956dcdd4ca
Merge pull request #71232 from liztio/sparse-cert-creation
Sparse cert creation for `kubeadm init`
2018-11-19 15:07:32 -08:00
liz 2f14e1801e
`kubeadm init` supports sparse certificates 2018-11-19 16:55:16 -05:00
k8s-ci-robot 16d6daf520
Merge pull request #71219 from neolit123/kubeadm-go-docs-1.13
kubeadm: fix issues in the v1beta1 godoc
2018-11-19 13:03:25 -08:00
liz 9e8228f14a
Move some test functions into test utils 2018-11-19 14:38:10 -05:00
Chuck Ha 679d4397cf
kubeadm: adds etcd server version for 1.13
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-19 14:34:00 -05:00
Yago Nobre c185836e64
Add flags to kubeadm init phase uploadconfig all 2018-11-19 14:02:29 -02:00
Lubomir I. Ivanov bc6837ffe3 kubeadm: fix issues in the v1beta1 godoc
- make the whole config example actually pass strict verification
(i.e. make the config work with --config)
- add print init-defaults/join defaults
- other small fixes
2018-11-19 17:26:34 +02:00
liz 440a5ad7cb
Don't allow --csr-only for CA certs or all 2018-11-16 15:22:37 -08:00
k8s-ci-robot f4fd7b0b2b
Merge pull request #71069 from fabriziopandini/kubeadm-phases-add-all-subcommands
Kubeadm - add all subcommands to phases
2018-11-16 15:17:03 -08:00
k8s-ci-robot fab7009997
Merge pull request #71135 from luxas/kubeadm_repo_flag
kubeadm: Allow customizing the image repository via flags
2018-11-16 13:20:16 -08:00
Dane LeBlanc 99887716c5 Fix kubeadm etcd manifests to use brackets around IPv6 addrs
When 'kubeadm init ...' is used with an IPv6 kubeadm configuration,
kubeadm currently generates an etcd.yaml manifest that uses IP:port
combinatins where the IP is an IPv6 address, but it is not enclosed
in square brackets, e.g.:
    - --advertise-client-urls=https://fd00:20::2:2379
For IPv6 advertise addresses, this should be of the form:
    - --advertise-client-urls=https://[fd00:20::2]:2379

The lack of brackets around IPv6 addresses in cases like this is
causing failures to bring up IPv6-only clusters with Kubeadm as
described in kubernetes/kubeadm Issues #1212.

This format error is fixed by using net.JoinHostPort() to generate
URLs as shown above.

Fixes kubernetes/kubeadm Issue #1212
2018-11-16 15:12:29 -05:00
k8s-ci-robot 7ff49c99d3
Merge pull request #71126 from rosti/warn-api-bind-override
kubeadm: Warn on API server bind address override
2018-11-16 12:04:10 -08:00
Lucas Käldström a666003b36
kubeadm: Allow customizing the image repository via flags 2018-11-16 23:52:56 +08:00
fabriziopandini 1308c7d2f5 kubeadm phases add all subcommands 2018-11-16 16:39:04 +01:00
k8s-ci-robot a5f06fdd16
Merge pull request #71066 from fabriziopandini/kubeadm-fix-validateMixedArgs
Kubeadm - Fix validateMixedArgs for phases
2018-11-16 03:57:01 -08:00
k8s-ci-robot 0908af5e09
Merge pull request #71061 from yagonobre/init-todo
Remove todo from init phase
2018-11-16 03:56:52 -08:00
Rostislav M. Georgiev b46fbbc4e6 kubeadm: Warn on API server bind address override
ChooseAPIServerBindAddress is silently overriding the requested bind IP
address for the API server if that address is deemed unsuitable. This is
currently done only if the IP is a loopback one (127.0.0.0/8; ::1/128).
It's best to at least issue a warning if such override occurs, so that there
are no surprised users by this.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-16 13:00:52 +02:00
k8s-ci-robot 973b5d291d
Merge pull request #71053 from yagonobre/upload-config-fix
Fix `kubeadm upload-config kubeadm` example
2018-11-16 01:53:50 -08:00
k8s-ci-robot dc6632ad4c
Merge pull request #71046 from liztio/certs-renew-use-api-fix
Certs renew use api fix
2018-11-16 01:53:40 -08:00
k8s-ci-robot 4b98060f4e
Merge pull request #70901 from neolit123/kubeadm-strict-config
kubeadm: enable strict config unmarhaling
2018-11-15 23:52:36 -08:00
k8s-ci-robot 8797db339d
Merge pull request #69827 from tomkukral/kadm-etcd
use etcd endpoints from advertise-client-urls
2018-11-15 17:25:17 -08:00
Lubomir I. Ivanov 2473bba9e5 kubeadm: update autogenerated bazel 2018-11-16 02:22:04 +02:00
Lubomir I. Ivanov cc60625930 kubeadm: handle strict config unmarshaling 2018-11-16 02:21:31 +02:00
liz 6afb9a117b
Fix renewing certificates via the API
Poll for events, print CSR name, and parse PEM instead of CSR
2018-11-15 14:02:47 -08:00
liz 5fc1a9a87c
Option to generate CSRs instead of issued certificates 2018-11-15 10:47:54 -08:00
Hannes Hörl 0d4b5c98f8 Bump k8s.io/uitls to 8e7ff06
The reason for the bump is the new functionality of the
k8s.io/utils/exec package which allows
- to get a hold of the process' std{out,err} as `io.Reader`s
- to `Start` a process and `Wait` for it

This should help on addressing #70890 by allowing to wrap std{out,err}
of the process to be wrapped with a `io.limitedReader`.

It also updates
- k8s.io/kubernetes/pkg/probe/exec.FakeCmd
- k8s.io/kubernetes/pkg/kubelet/prober.execInContainer
- k8s.io/kubernetes/cmd/kubeadm/app/phases/kubelet.fakeCmd
to implement the changed interface.

The dependency on 'k8s.io/utils/pointer' to the new version has also
been bumped in some staging repos:
- apiserver
- kube-controller-manager
- kube-scheduler
2018-11-15 13:25:12 +00:00
fabriziopandini 807338e96a Fix validateMixedArgs for phases 2018-11-15 11:38:18 +01:00
k8s-ci-robot 4fdac19603
Merge pull request #71059 from timothysc/kubeadmmsg
Minor update to the comment block characters for kubeadm
2018-11-14 23:20:07 -08:00
Yago Nobre 8b110e27fc
Remove todo from init phase 2018-11-15 01:43:56 -02:00
Timothy St. Clair aea4a4e0fb Minor update to the comment block characters for kubeadm 2018-11-14 20:31:11 -06:00
k8s-ci-robot e3ddaaad1d
Merge pull request #71045 from neolit123/kubeadm-go-docs-1.13
kubeadm: fix godocs indentation for v1beta1
2018-11-14 17:25:50 -08:00
k8s-ci-robot 2965d24547
Merge pull request #71043 from chuckha/etcd-doc
kubeadm: document required etcd configuration
2018-11-14 17:25:40 -08:00
k8s-ci-robot bb2fcd90f3
Merge pull request #71040 from fabriziopandini/kubeadm-phases-local-flags
Kubeadm phases - add local flags
2018-11-14 17:25:30 -08:00
Yago Nobre 606bbc0457
Fix kubeadm upload-config kubeadm example 2018-11-14 22:28:51 -02:00
k8s-ci-robot 1240274204
Merge pull request #71037 from rdodev/reset-iptables
Reset helptext alignment
2018-11-14 15:39:46 -08:00
Lubomir I. Ivanov da49adb52f kubeadm: fix godocs indentation for v1beta1 2018-11-15 00:13:58 +02:00
Chuck Ha 02ec1e84b0
kubeadm: document required etcd configuration
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-14 17:05:24 -05:00
k8s-ci-robot 0df79e4daa
Merge pull request #71008 from neolit123/kubeadm-go-docs-1.13
kubeadm: update notes and example config in v1beta1 godocs
2018-11-14 13:16:54 -08:00
fabriziopandini 1b9986b219 Kubeadm phases - add local flags 2018-11-14 20:29:52 +01:00
k8s-ci-robot ba7d3c3ba8
Merge pull request #71009 from timothysc/phaseflow
Fixup language on help message to denote phases
2018-11-14 09:26:20 -08:00
Lubomir I. Ivanov 98f3fb5059 kubeadm: remove leftover DynamicKubeletConfig constant 2018-11-14 17:32:45 +02:00
Ruben Orduz d5cd412ae0 reset helptext alignment
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
2018-11-14 09:59:48 -05:00
Timothy St. Clair ef3380b42d Fixup language on help message to denote phases
Signed-off-by: Timothy St. Clair <timothysc@gmail.com>
2018-11-13 20:16:15 -06:00
k8s-ci-robot 90295640ef
Merge pull request #71010 from neolit123/revert-68890-dnspolicy
Revert "kubeadm: Create control plane with ClusterFirstWithHostNet dns policy"
2018-11-13 18:07:33 -08:00
k8s-ci-robot 8d27e5683c
Merge pull request #70874 from rdodev/reset-iptables
iptables reset text message
2018-11-13 16:14:04 -08:00
k8s-ci-robot 48d788de6f
Merge pull request #71001 from Deepomatic/recognize_docker_1809_version
Recognize newer docker versions without -ce/-ee suffix: 18.09.0
2018-11-13 14:59:36 -08:00
Lubomir I. Ivanov 24b4280e3f
Revert "kubeadm: Create control plane with ClusterFirstWithHostNet dns policy" 2018-11-14 00:18:32 +02:00
Lubomir I. Ivanov 865904d0e1 kubeadm: update notes and example config in v1beta1 godocs 2018-11-13 23:52:42 +02:00
k8s-ci-robot bea07c0dc6
Merge pull request #70935 from neolit123/kubeadm-update-cmd-go
kubeadm: update the state in app/cmd.go
2018-11-13 13:45:41 -08:00
k8s-ci-robot 8b562218b7
Merge pull request #70876 from chuckha/idempotency
kubeadm: Adds tests to node patching
2018-11-13 13:45:31 -08:00
k8s-ci-robot 3cba75ea60
Merge pull request #70603 from chuckha/pod-infra-container-image
kubeadm: set pod-infra-container-image for the kubelet
2018-11-13 13:45:02 -08:00
Yago Nobre 7a9a8f5f35
kubeadm graduate addons phase 2018-11-13 16:33:59 -02:00
k8s-ci-robot bfb95290b9
Merge pull request #70795 from yuexiao-wang/print-join-command
kubeadm: print the join command
2018-11-13 10:11:21 -08:00
Lubomir I. Ivanov 9a37f2d878
kubeadm: set pod-infra-container-image for the kubelet
The kubelet allows you to set `--pod-infra-container-image`
(also called `PodSandboxImage` in the kubelet config),
which can be a custom location to the "pause" image in the case
of Docker. Other CRIs are not supported.

Set the CLI flag for the Docker case in flags.go using
WriteKubeletDynamicEnvFile().
2018-11-13 13:10:22 -05:00
Thomas Riccardi 068cdaa56c Recognize newer docker versions without -ce/-ee suffix
Since docker 18.09, the ServerVersion field format changed: the `-ce`
or `-ee` suffix disappeared:

- docker 18.06: `18.06.1-ce`
- docker 18.09: `18.09.0`

This was not expected by the docker_validator version regexp, which
assumed newer docker versions ended with `-[a-z]{2}`.
This made the validator return an error, whereas we expect it to
return only a warning (by recognizing it as a newer but not yet
supported docker version).

This commit relax the version regexp to also recognize `18.09.0`.
The docker validator now returns a warning, as tested.
2018-11-13 18:55:29 +01:00
Chuck Ha db3d636f91
updates license year
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-13 12:49:42 -05:00
Chuck Ha 5792eeb137
kubeadm: Adds tests to node patching
Signed-off-by: Chuck Ha <ha.chuck@gmail.com>
2018-11-13 12:48:54 -05:00
Ruben Orduz 89a5d5cadd iptables reset text message
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
2018-11-13 10:36:43 -05:00
Yago Nobre 62c9303ecf
Remove DynamicKubeletConfig from init and join workflow, also remove DynamicKubeletConfig feature gate 2018-11-13 11:56:24 -02:00
yuexiao-wang 5851fd556b kubeadm: print the join command should happen after all the phases in init have finished
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-13 19:05:10 +08:00
fabriziopandini 7f1b2a62a7 fix kubeadm upgrade 2018-11-13 09:14:16 +01:00
k8s-ci-robot bcef72bf06
Merge pull request #70877 from yagonobre/reset
Handler error when kubeconfig file not exist on kubeadm reset
2018-11-12 23:56:57 -08:00
Marek 064f74b2e8 fixes kubeadm 1221 to remove AuditPolicyConfiguration
Added conversion test and failure.
2018-11-12 14:33:26 -05:00
Yago Nobre 5e31a6bb74
Handler error when kubeconfig file not exist on kubeadm reset 2018-11-12 10:36:35 -02:00
k8s-ci-robot 99811e2540
Merge pull request #70870 from fabriziopandini/kubeadm-config-JoinControlPlane
Kubeadm config refactor JoinControlPlane
2018-11-12 00:53:09 -08:00
k8s-ci-robot 5fb8229218
Merge pull request #70024 from fabriziopandini/kubeadm-addons-config
kubeadm - addon configuration in the kubeadm config API.
2018-11-12 00:52:59 -08:00
k8s-ci-robot 04bb2171a7
Merge pull request #70885 from neolit123/phase-mark-control-plane
kubeadm: graduate the mark-control-plane-phase
2018-11-11 19:07:10 -08:00
k8s-ci-robot b99c8b994f
Merge pull request #70743 from bart0sh/PR0039-kubeadm-dont-prepull-etcd-if-not-required
kubeadm: prepull Etcd image only if required
2018-11-11 19:07:00 -08:00
Lubomir I. Ivanov c46e949799 kubeadm: update the state in app/cmd.go
- BETA->GA
- master->control-plane
- exclude @ mentions as only members can use them
2018-11-12 04:04:56 +02:00
RA489 daae2a86ea kubeadm: graduate mark-control-plane phase
Co-authored-by: Lubomir I. Ivanov <lubomirivanov@vmware.com>
2018-11-11 04:56:55 +02:00
fabriziopandini fa161370f0 autogenerated 2018-11-10 17:37:00 +01:00
fabriziopandini d484c8c087 kubeadm refactor joinControlPlane config 2018-11-10 17:36:49 +01:00
fabriziopandini 446d80693c autogenerated 2018-11-10 17:27:51 +01:00
fabriziopandini 6759334f6e add DNS struct to kubeadm config 2018-11-10 17:27:39 +01:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
k8s-ci-robot d90f868c00
Merge pull request #70793 from rosti/use-hyperkube
kubeadm: UnifiedControlPlaneImage string -> UseHyperKubeImage bool
2018-11-09 14:31:28 -08:00
k8s-ci-robot 54fe139d4e
Merge pull request #70761 from luxas/rename_apiendpoint
kubeadm v1beta1: InitConfiguration.APIEndpoint -> LocalAPIEndpoint
2018-11-09 14:31:19 -08:00
k8s-ci-robot c3d05c816d
Merge pull request #70757 from ereslibre/remove-cluster-name-from-join-configuration
kubeadm: Remove cluster name from JoinConfiguration
2018-11-09 12:46:09 -08:00
Rostislav M. Georgiev b551ad596a kubeadm: UnifiedControlPlaneImage -> UseHyperKubeImage
Up until now UnifiedControlPlaneImage existed as a string value as part of the
ClusterConfiguration. This provided an override for the Kubernetes core
component images with a single custom image. It is mostly used to override the
control plane images with the hyperkube image. This saves both bandwith and
disk space on the control plane nodes.
Unfortunately, this specified an entire image string (complete with its prefix,
image name and tag). This disables upgrades of setups that use hyperkube.
Therefore, to enable upgrades on hyperkube setups and to make configuration
more convenient, the UnifiedControlPlaneImage option is replaced with a boolean
option, called UseHyperKubeImage. If set to true, this option replaces the
image name of any Kubernetes core components with hyperkube, thus allowing for
upgrades and respecting the image repository and version, specified in the
ClusterConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-09 17:35:20 +02:00
Lucas Käldström 48c273b07e
autogenerated 2018-11-09 14:47:58 +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
k8s-ci-robot 8825843126
Merge pull request #70323 from qingsenLi/git181010
[kubeadm/app/..add other packages]Switch to github.com/pkg/errors
2018-11-09 01:02:06 -08:00
qingsenLi e94dd19e03 [kubeadm/app/..add other packages]Switch to github.com/pkg/errors 2018-11-09 18:54:03 +08:00
k8s-ci-robot 34be549935
Merge pull request #70727 from yagonobre/bootstrap-token
kubeadm graduate bootstrap-token phase
2018-11-08 17:36:24 -08:00
Rafael Fernández López 47b4e04842
kubeadm: Remove cluster name from JoinConfiguration 2018-11-08 23:29:52 +01:00
k8s-ci-robot b2b25462c1
Merge pull request #70755 from ereslibre/remove-feature-gates-from-join-configuration
kubeadm: Remove feature gates from JoinConfiguration
2018-11-08 14:27:08 -08:00
k8s-ci-robot 91d6d75303
Merge pull request #70796 from detiber/revCoreDNS
[kubeadm] Update CoreDNS Version
2018-11-08 12:13:10 -08:00
k8s-ci-robot f212b9db23
Merge pull request #70598 from dims/switch-from-sigs.k8s.io/yaml-to-ghodss/yaml
Switch to sigs.k8s.io/yaml from ghodss/yaml
2018-11-08 10:57:36 -08:00
Rafael Fernández López fb88c199cd
kubeadm: Remove feature gates from JoinConfiguration
Relay on the feature gates provided by the ClusterConfiguration
when downloaded from the cluster during the join process.
2018-11-08 19:35:50 +01:00
Jason DeTiberus 30048e2e6a
[kubeadm] Update CoreDNS Version
Resolves an issue that has been seen with ExternalName services not resolving.
2018-11-08 08:55:48 -05:00
k8s-ci-robot 16d0992534
Merge pull request #69753 from wangzhen127/diff-node-status
Update kubelet node status report logic with node lease feature
2018-11-07 20:26:45 -08:00
Yago Nobre e743f0e475
kubeadm graduate bootstrap-token phase 2018-11-08 01:01:21 -02:00
Lubomir I. Ivanov 8bc0447d8c kubeadm: use client-go's MakeCSRFromTemplate() in 'renew'
Create CSR using the mentioned function which also encodes the
type CertificateRequestBlockType.

Without that 'certs renew' is failing with:
'PEM block type must be CERTIFICATE REQUEST'
2018-11-08 01:16:33 +02:00
Zhen Wang 98fc4a107a Update kubelet node status report logic with node lease feature
When node lease feature is enabled, kubelet reports node status to api server
only if there is some change or it didn't report over last report interval.
2018-11-07 11:59:42 -08:00
Davanum Srinivas 43f523d405
Switch to sigs.k8s.io/yaml from ghodss/yaml
Change-Id: Ic72b5131bf441d159012d67a6a3d87088d0e6d31
2018-11-07 13:17:32 -05:00
Marek Counts 18dc529d05 Removed feature gates selfhosting, HA and store certs in secrets.
Added new alpha command to pivot to self hosted
Removed slelfhosting upgrade ability
Added warning message to self hosted pivot
added certs in secrets flag to new selfhosting comand
2018-11-07 11:44:54 -05:00
Ed Bartosh 328c1825d4 kubeadm: prepull Etcd image only if required
Prepull Etcd image only if external Etcd is not used and
--etcd-upgrade=false is not specified.

Fixes: kubernetes/kubeadm#1214
2018-11-07 14:59:37 +02:00
Yago Nobre 79f1b66f4e
kubeadm graduate upload-config phase 2018-11-06 11:30:46 -02:00
k8s-ci-robot c6c88f1bf1
Merge pull request #70666 from neolit123/phase-fix-hidden
kubeadm: make sure that commands are not added for hidden phases
2018-11-05 20:59:47 -08:00
k8s-ci-robot 7ac1f8974b
Merge pull request #70635 from xichengliudui/fix18110202
Modify and update the comments
2018-11-05 14:20:20 -08:00
k8s-ci-robot faed5aa974
Merge pull request #70537 from yagonobre/validate-kubeconfig
Validate kubeconfig files in case of external CA mode
2018-11-05 14:20:10 -08:00
Lubomir I. Ivanov 4a098980d6 kubeadm: make sure that commands are not added for hidden phases 2018-11-05 22:15:31 +02:00
k8s-ci-robot 1059feddbc
Merge pull request #70584 from Songjoy/fix-typo
fix typo Kubernets to Kubernetes
2018-11-05 11:42:17 -08:00
k8s-ci-robot b3441e1348
Merge pull request #69662 from ereslibre/conditional-ipvs-check
kubeadm: Perform IPVS check on join only if the cluster was set up with IPVS
2018-11-05 10:24:17 -08:00
Rostislav M. Georgiev eb6f7b1f17 kubeadm: Add configurable control plane up timeout
Until now the control plane timeout was fixed to 4 minutes and users did not
have the ability to change it. This commit allows that timeout to be configured
via the new `timeoutForControlPlane` option in the API server config (itself a
member of the ClusterConfiguration).

The default timeout is still 4 minutes.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-05 12:36:28 +02:00
xichengliudui 453197c3b7 Modify the wrong function name
Modify and update the comments

Modify and update the comments
2018-11-05 05:16:33 -05:00
k8s-ci-robot f379f7b3e8
Merge pull request #70589 from fabriziopandini/kubeadm-phase-flags
Kubeadm phases - improve flags management
2018-11-04 19:19:07 -08:00
Yago Nobre 52ef8ebd97
Update bazel 2018-11-04 19:02:12 -02:00
Yago Nobre e1320bba36
Validate kubeconfig files in case of external CA mode 2018-11-04 18:58:46 -02:00
fabriziopandini 3e5133e793 autogenerated 2018-11-04 19:47:04 +01:00
fabriziopandini d63bae610f improve flags management in phases 2018-11-04 19:46:55 +01:00
k8s-ci-robot 14120dd44a
Merge pull request #70611 from yagonobre/rsa
Fix error wrap on pki_helpers
2018-11-03 11:05:14 -07:00
Yago Nobre a80a573074
Fix error wrap on pki_helpers 2018-11-03 10:17:20 -03:00
k8s-ci-robot 474e27f914
Merge pull request #70495 from rosti/writable-to-readonly-volumes
kubeadm: Writable to ReadOnly in HostPathMount
2018-11-03 01:43:02 -07:00
k8s-ci-robot ee94a56214
Merge pull request #70551 from liztio/fix-renew-overflow
Fix overflow issue on renewal
2018-11-02 16:44:39 -07:00
k8s-ci-robot 5e76248e23
Merge pull request #70512 from neolit123/phase-wait-control-plane
kubeadm: graduate wait-control-plane phase
2018-11-02 16:44:20 -07:00
Rostislav M. Georgiev 6c9e347e31 kubeadm: Writable to ReadOnly in HostPathMount
Writable was added to HostPathMount in v1alpha1 in order to control if an extra
volume is mounted in read only or writable mode.
Usually, in Kubernetes, this option is referred to as ReadOnly, instead of
Writable and is defaulted to `false`. However, at the time, all extra volumes
to pods were defaulted to read-only. Therefore, to avoid changes to existing
v1alpha1 configs, this option had to be added with reversed meaning.

Hence, it's called `writable`.

Now, with the migration towards v1beta1, we can safely change this to ReadOnly
and get it in sync with the reset of Kubernetes.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-02 18:02:06 +02:00
k8s-ci-robot b83a947ee9
Merge pull request #70371 from rosti/control-plane-substructs
kubeadm: Control plane config moved to substructs
2018-11-02 08:38:47 -07:00
liz adf9d7a031
Fix overflow issue on renewal
Co-authored-by: Ruben Orduz <rubenoz@gmail.com>
2018-11-02 10:12:57 -04:00
Lubomir I. Ivanov cbb448113d kubeadm: graduate wait-control-plane phase 2018-11-02 15:47:23 +02:00
k8s-ci-robot 7f32ad0287
Merge pull request #70529 from SataQiu/fix-2018110101
Fix the expression of some comments
2018-11-02 05:29:05 -07:00
Songjoy e8a09871e0
fix typo Kubernets to Kubernetes
fix typo Kubernets to Kubernetes in line 239
2018-11-02 20:24:01 +08:00
Rostislav M. Georgiev d14c27a347 kubeadm: Control plane config moved to substructs
In v1alpha3's, control plane component config options were nested directly into
the ClusterConfiguration structure. This is cluttering the config structure and
makes it hard to maintain. Therefore the control plane config options must be
separated into different substructures in order to graduate the format to beta.

This change does the following:

- Introduces a new structure called ControlPlaneComponent, that contains fields
  common to all control plane component types. These are currently extra args
  and extra volumes.

- Introduce a new structure called APIServer that contains
  ControlPlaneComponent and APIServerCertSANs field (from ClusterConfiguration)

- Replace all API Server, Scheduler and Controller Manager options in
  ClusterConfiguration with APIServer, ControllerManager and Scheduler fields
  of APIServer and ControlPlaneComponent types.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-11-02 11:38:56 +02:00
k8s-ci-robot 400438a887
Merge pull request #70336 from yuexiao-wang/move-pkiutil
kubeadm: move certs/pkiutil to generic kubeadm utils
2018-11-01 22:16:45 -07:00
k8s-ci-robot 78b43cc631
Merge pull request #70388 from neolit123/phase-etcd
kubeadm: graduate etcd phase
2018-11-01 13:44:16 -07:00
k8s-ci-robot 8e9c376cb3
Merge pull request #70452 from neolit123/remove-token-test
kubeadm: remove the unit test TestRunListTokens
2018-11-01 09:53:14 -07:00
Lubomir I. Ivanov 31049f972a kubeadm: graduate the etcd phase 2018-11-01 18:29:17 +02:00
jiaxuanzhou f253171dfe simplify logic for func BuildArgumentListFromMap 2018-11-01 23:15:48 +08:00
SataQiu d32526fba4 improve the expression of some comments 2018-11-01 17:44:37 +08:00
Rafael Fernández López 242e071fa2
kubeadm: Perform IPVS check on join only if the cluster was set up with IPVS. 2018-11-01 09:43:16 +01:00
yuexiao-wang 4f0c2ecf09 move certs/pkiutil to generic kubeadm utils
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-11-01 15:05:19 +08:00
k8s-ci-robot a95c0c36e5
Merge pull request #70341 from yagonobre/fix-typos
Fix typos on cmd/kubeadm
2018-10-31 17:08:59 -07:00
fabriziopandini b56e122e66 autogenerated 2018-10-31 22:19:01 +01:00
fabriziopandini 0c31c79e7b kubeadm alpha commands 2018-10-31 22:18:39 +01:00
Yago Nobre cc670e29a1
Fix typos on cmd/kubeadm/app/cmd 2018-10-31 16:32:02 -03:00
k8s-ci-robot 587f020a1a
Merge pull request #70368 from thomasem/cmd_test_to_cmd
Swap cmd_test to cmd package in kubeadm/app/cmd/config_test.go
2018-10-31 11:50:32 -07:00
Lubomir I. Ivanov 968fdb95e3 kubeadm: move the control-plane phase to the phase runner
Remove custom flags that were previously available per
sub-phase. Rely on the config passed to 'kubeadm init' for that.

Remove redundant functions in manifests.go.

Move the audit policy settings to the control plane phase (under
API server).
2018-10-31 16:05:14 +02:00
Lubomir I. Ivanov f337f0e580 kubeadm: remove the unit test TestRunListTokens
Remove the test based on these points:

- it's apparently flaky by more than one reports and it's hard to debug.
- it's not a CLI unit test.
- it's testing API objects using a fake API server which is a bad hack...
- existing e2e tests already provide coverage for all
the `expectedError: false` cases.
2018-10-30 22:49:01 +02:00
k8s-ci-robot 739998f8fe
Merge pull request #70098 from fabriziopandini/kubeadm-graduate-kubeconfig
Kubeadm graduate kubeconfig phase
2018-10-30 12:22:48 -07:00
fabriziopandini 4f26d1de5f autogenerated 2018-10-30 16:35:37 +01:00
fabriziopandini 3cadb3ca1d kubeadm graduate kubeconfig phase 2018-10-30 16:35:29 +01:00
Rostislav M. Georgiev a3e7d7e038 kubeadm: APIServerEndpoints -> APIServerEndpoint
In the past the discovery configuration expected, that we can support multiple
API server endpoints. In practice, we always end up with a single API server
endpoint, because, even in HA setups, we use a load balancer scheme for API
servers.
Therefore, to reduce complexity and improve readability of the config, the
multiple API server endpoints support is removed from the bootstrap token
discovery join method and configuration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-10-30 16:10:28 +02:00
k8s-ci-robot 03a145de8a
Merge pull request #70271 from yuexiao-wang/switch-errors-1
[kubeadm/app/]switch to github.com/pkg/errors
2018-10-30 03:38:35 -07:00
yuexiao-wang c0a9b4d04d add BUILD
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:52 +08:00
yuexiao-wang cc303c8774 [kubeadm/app/]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:24 +08:00
k8s-ci-robot a5356359cb
Merge pull request #69518 from Pingan2017/remove-skip-preflight-checks-deprecated-info
remove flag '--skip-preflight-checks' deprecated info
2018-10-29 15:53:50 -07:00
k8s-ci-robot 8c6fbd708c
Merge pull request #70331 from ereslibre/graduate-certs
kubeadm: Graduate certs phase
2018-10-29 14:38:43 -07:00
k8s-ci-robot ab61dcda62
Merge pull request #70003 from yagonobre/kubeadm-clean-etcd-dir
Get the etcd data path from kubeadm config or etcd pod manifest on kubeadm reset
2018-10-29 14:38:22 -07:00
Rafael Fernández López 00a7240a3a
kubeadm: graduate `certs` phase 2018-10-29 17:23:31 +01:00
Thomas Maddox f4a98e83ed
Swap cmd_test to cmd package in kubeadm/app/cmd/config_test.go 2018-10-29 09:18:27 -05:00
Yago Nobre b35e22abe1
Update bazel 2018-10-28 17:04:53 -03:00
Yago Nobre 0c9e922fcd
Get etcd data dir from kubeadm config or use etcd manifest as fallback on kubeadm reset 2018-10-28 17:04:53 -03: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
k8s-ci-robot 1df4f8eaf6
Merge pull request #70028 from liggitt/move-extensions-types
move internal apps API types out of extensions package
2018-10-26 15:56:13 -07:00
Marc Power eb818f95d1 Bind coredns containers to linux nodes to avoid Windows scheduling 2018-10-26 11:47:17 -07:00
yuexiao-wang f15410692e [kubeadm/app/util]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-26 15:17:21 +08:00
Jordan Liggitt d0577ace6b fixup extensions->apps references 2018-10-25 21:12:57 -04:00
k8s-ci-robot 584a86736e
Merge pull request #70071 from xichengliudui/fix18102203
Fix grammatical errors and repeat words
2018-10-25 07:12:20 -07:00
k8s-ci-robot abb8f66ff4
Merge pull request #70186 from yuexiao-wang/switch-errors
[kubeadm/app/cmd]switch to github.com/pkg/errors
2018-10-25 05:55:19 -07:00
yuexiao-wang f9084c6ce6 [kubeadm/app/cmd]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-25 15:05:04 +08:00
k8s-ci-robot eff7492d38
Merge pull request #70182 from SataQiu/fix-20181024
Fix incorrect return value of kubeadm pre-flight checks
2018-10-24 16:58:22 -07:00
fabriziopandini 4505aa2108 autogenerated 2018-10-24 12:57:42 +02:00
fabriziopandini a3d90cc824 kubeadm graduate kubelet-start phase 2018-10-24 12:57:31 +02:00
SataQiu 23e67a1b80 fix incorrect return value of kubeadm pre-flight checks 2018-10-24 18:00:31 +08:00
k8s-ci-robot dad07683b1
Merge pull request #69013 from ibrasho-forks/switch-to-http.Error
Update usages of http.ResponseWriter.WriteHeader to use http.Error
2018-10-23 15:31:55 -07:00
k8s-ci-robot 6617394faf
Merge pull request #70056 from bart0sh/PR0035-kubeadm-certsapi-handling-err
kubeadm: fix missing error handling
2018-10-23 02:08:40 -07:00
k8s-ci-robot 46ec13cf7d
Merge pull request #70027 from bart0sh/PR0031-kubeadm-sort-volumes
kubeadm: sort pod Volumes and VolumeMounts
2018-10-22 22:46:42 -07:00
k8s-ci-robot 15c15bedb7
Merge pull request #70048 from bart0sh/PR0032-kubeadm-add-NumCPUCheck
kubeadm: check required number of CPUs on master
2018-10-22 21:18:38 -07:00
k8s-ci-robot db4c86f560
Merge pull request #70055 from bart0sh/PR0034-kubeadm-upgrade-misc-fixes
2 minor fixes for kubeadm upgrade
2018-10-22 11:19:28 -07:00
xichengliudui 7946697e82 Fix grammatical errors and repeat words 2018-10-21 09:50:54 -04:00
Ed Bartosh daa111156f kubeadm: fix missing error handling
Handled error returned from CertificateSigningRequests().Get()
2018-10-21 11:26:42 +03:00
Ed Bartosh 149fbe3874 kubeadm: don't prepull etcd image on upgrade
Skipped prepulling etcd image if external etcd is used.

Fixes: kubernetes/kubeadm#1136
2018-10-21 10:07:02 +03:00
Ed Bartosh 1ada4b23b7 kubeadm: fix typo: missing round bracket 2018-10-21 00:42:08 +03:00
k8s-ci-robot 7cbb999518
Merge pull request #70023 from SataQiu/fix-20181019
clean up redundant code for kubeadm join
2018-10-20 11:17:53 -07:00
k8s-ci-robot a6e273214b
Merge pull request #69617 from rosti/config-defaults-split
kubeadm: Introduce config print init/join-defaults
2018-10-20 08:04:53 -07:00
Ed Bartosh d230b24612 kubeadm: check required number of CPUs on master
Implemented preflight check to ensure that number of CPUs
on the master node is not less than required.
2018-10-20 17:54:54 +03:00
k8s-ci-robot 0bf8a51f4b
Merge pull request #69666 from fabriziopandini/kubeadm-graduate-preflight
Kubeadm graduate preflight phase
2018-10-20 05:58:53 -07:00
k8s-ci-robot 2dc9acc23b
Merge pull request #69922 from xichengliudui/fix181017
Delete repeated words and fix misspellings
2018-10-20 01:47:53 -07:00
k8s-ci-robot b47510c1bb
Merge pull request #69886 from bart0sh/PR0030-kubeadm-fix-1054-upgrade-same-version
kubeadm: skip upgrade if manifest is not changed
2018-10-19 14:52:46 -07:00
Ed Bartosh ebb0af9e8f kubeadm: sort pod Volumes and VolumeMounts
Order of Volumes and VolumeMounts in the pod objects created by
kubeadm is undefined as they're represended as maps in the
controlPlaneHostPathMounts struct.

This influences 'kubeadm upgrade' logic in a way that even when
manifest of the component is not changed kubeadm tries to upgrade
it because most of the time current and new pods are not equal
due to the different order of Volumes and VolumeMounts.

For example 'kubeadm apply diff' almost always shows difference
in Volumes and VolumeMounts because of this:
     volumeMounts:
+    - mountPath: /etc/kubernetes/pki
+      name: k8s-certs
+      readOnly: true
     - mountPath: /etc/ssl/certs
       name: ca-certs
+      readOnly: true
+    - mountPath: /etc/pki
+      name: etc-pki
+      readOnly: true
+    - mountPath: /usr/share/ca-certificates
+      name: usr-share-ca-certificates
       readOnly: true
     - mountPath: /etc/ca-certificates
       name: etc-ca-certificates
       readOnly: true
-    - mountPath: /etc/pki
-      name: etc-pki
-      readOnly: true
-    - mountPath: /etc/kubernetes/pki
-      name: k8s-certs
-      readOnly: true
-    - mountPath: /usr/share/ca-certificates
-      name: usr-share-ca-certificates
-      readOnly: true

Sorting Volumes and VolumeMounts should fix this issue and help
to avoid unnecessary upgrades.
2018-10-19 18:22:47 +03:00
SataQiu 41937c21c0 clean up redundant code 2018-10-19 22:20:25 +08:00
yuexiao-wang 8af042af6d fix reference to controlManagerExtraAargs
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-19 20:22:34 +08:00
k8s-ci-robot b7c2d923ef
Merge pull request #69927 from SataQiu/fix-20181017
remove duplicate root check for kubeadm
2018-10-19 01:26:30 -07:00
k8s-ci-robot 52de5c55e3
Merge pull request #69883 from chrisohaver/coredns-default
Make CoreDNS default in kubeup and update CoreDNS version/manifest in kubeup and kubeadm
2018-10-18 18:39:12 -07:00
k8s-ci-robot 125cb7b1ad
Merge pull request #69846 from andrewrynhard/fix-kubeadm-join-taints
kubeadm: Fix node join taints
2018-10-18 14:44:19 -07:00
Chris O'Haver 0cfb4bbe2c make coredns kubeup default, update manifest 2018-10-18 14:52:38 -04:00
Rostislav M. Georgiev 91049ef77b kubeadm: Introduce config print init/join-defaults
In order to improve the UX of kubeadm, it was decided to introduce the
following subcommands:

- `kubeadm config print` - this is currently only a placeholder for subcommands
  that deal printing of some kind of configuration.
- `kubeadm config print init-defaults` - prints the default combination of
  InitConfiguration and ClusterConfiguration. Selected component configs can be
  printed too if the `--component-configs` command line switch is used.
- `kubeadm config print join-defaults` - prints the default JoinConfiguration.
  This command also supports the use of `--component-configs`.
- `kubeadm config print-defaults` is deprecated in favor of
  `kubeadm config print init/join-defaults`.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-10-18 14:21:02 +03:00
fabriziopandini 22da6a66a2 autogenerated 2018-10-18 11:52:15 +02:00
fabriziopandini abac950cd7 kubeadm graduate preflight phase 2018-10-18 11:52:04 +02:00
SataQiu 8d4f4d3d70 remove duplicate kubeadm root check 2018-10-17 18:07:10 +08:00
Ed Bartosh ad0179897d kubeadm: skip upgrade if manifest is not changed
When doing upgrades kubeadm generates new manifest and
waits until kubelet restarts correspondent pod.

However, kubelet won't restart pod if there are no changes
in the manifest. That makes kubeadm stuck waiting for
restarted pod.

Skipping upgrade if new component manifest is the same as
current manifest should solve this.

Fixes: kubernetes/kubeadm#1054
2018-10-17 11:07:51 +03:00
k8s-ci-robot 1e4ad048fa
Merge pull request #67763 from rosti/join-discovery-split
kubeadm: Split discovery from JoinConfiguration
2018-10-16 19:25:47 -07:00
k8s-ci-robot ee4346651c
Merge pull request #69800 from xichengliudui/fix181015
Fixing grammatical errors
2018-10-16 17:53:20 -07:00
Andrew Rynhard 197fd02dca
Fix node join taints 2018-10-16 14:24:53 -07:00
k8s-ci-robot d169696b2e
Merge pull request #69622 from fabriziopandini/kubeadm-add-phase-runner
kubeadm refactor cmd init
2018-10-16 13:01:42 -07:00
Rostislav M. Georgiev 576b8d3f4f kubeadm: Split discovery from JoinConfiguration
This change splits out discovery fields from JoinConfiguration by performing
the following changes:

- Introduce a BootstrapTokenDiscovery structure, that houses configuration
  options needed for bootstrap token based discovery.

- Introduce a FileDiscovery structure, that houses configuration options
  (currently only a single option) needed for KubeConfig based discovery.

- Introduce a Discovery structure, that houses common options (such as
  discovery timeout and TLS bootstrap token) as well as pointer to an instance
  of either BootstrapTokenDiscovery or FileDiscovery structures.

- Replace the old discovery related JoinConfiguration members with a single
  Discovery member.

This change is required in order to cleanup the code of unnecessary logic and
make the serialized JoinConfiguration more structured (and therefore, more
intuitive).

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-10-16 15:25:32 +03:00
fabriziopandini 68b4286ae0 cmd init refactor 2018-10-16 11:38:42 +02:00
xichengliudui 0dba66a2a1 Delete repeated words and fix misspellings
Delete repeated words and fix misspellings
2018-10-16 01:05:05 -04:00
k8s-ci-robot 2f8b585d9c
Merge pull request #69330 from vaikas-google/json-patch
Add support for JSON patch in fake client
2018-10-15 15:04:32 -07:00
Tomáš Kukrál a031d03501
use etcd endpoint from advertise-client-urls
It makes more sense to use advertised etcd endpoints instead of using
listened client URLS.

I'm solving this use case: Listen on localhost and public IP but I don't
want to add multiple endpoints to kube-apiservers because it's targeting
same etcd server.
2018-10-15 21:23:13 +02:00
k8s-ci-robot b11211ed8c
Merge pull request #69645 from neolit123/kubeadm-set-version-fix
kubeadm: modify SetKubernetesVersion
2018-10-15 11:40:42 -07:00
xichengliudui a20fbf0b5a Fix syntax error
Fixing grammatical errors
2018-10-15 06:52:55 -04:00
Ibrahim AshShohail 2fb3ba71f1
Update usages of http.ResponseWriter.WriteHeader to use http.Error
Signed-off-by: Ibrahim AshShohail <me@ibrasho.com>
2018-10-14 05:58:00 +03:00
k8s-ci-robot 653b027200
Merge pull request #69646 from zhouhaozz/delete-cert
certs: Delete useless code
2018-10-13 08:47:13 -07:00
Lubomir I. Ivanov fa9940c71c kubeadm: modify SetKubernetesVersion
Without this patch SetKubernetesVersion does not set
a version in all locations where it's called, because
the passed config to it always has a default version
stable-1.

This always triggers the != "" check and the function
returns without setting a version.

Validate against DefaultKubernetesVersion and "" instead.

This fixes all cases where fetching a version from the internet
is not needed at all - e.g. "kubeadm token create".

Also make SetKubernetesVersion default to version.Get().String()
and add unit tests for the function.
2018-10-13 17:16:22 +03:00
k8s-ci-robot e4200cea9c
Merge pull request #69354 from yujuhong/rm-jwt
GCP: Remove the deprecated google-json-key support
2018-10-12 17:16:46 -07:00
k8s-ci-robot f22334f14d
Merge pull request #69720 from fabriziopandini/kubeadm-add-etcd-ports-constant
Kubeadm - Add etcd ports constant
2018-10-12 16:02:01 -07:00
k8s-ci-robot 7d45044c11
Merge pull request #69684 from fabriziopandini/kubeadm-add-phase-runner2
kubeadm add phase runner
2018-10-12 14:48:56 -07:00
fabriziopandini 6a8ace5c65 add phase runner 2018-10-12 17:55:10 +02:00
fabriziopandini 66e846fa26 Add etcd ports constant 2018-10-12 09:33:07 +02:00
k8s-ci-robot 709ac9ce85
Merge pull request #69624 from bart0sh/PR0029-kubeadm-token-mix-config-with-print-join-command
kubeadm: allow usage --config with --print-join-command
2018-10-11 11:06:58 -07:00
k8s-ci-robot 8f620950e2
Merge pull request #69614 from mitar/patch-1
Adding more kernel config paths
2018-10-11 03:36:22 -07:00
Ville Aikas a363b15385 Add support for JSON patch in fake client 2018-10-11 08:13:50 +00:00
Zhou Hao 081cf49671 certs: Delete useless code
Signed-off-by: Zhou Hao <zhouhao.oci@gmail.com>
2018-10-11 09:16:48 +08:00
k8s-ci-robot 8a4022fd49
Merge pull request #69517 from SataQiu/fix-2018100801
cleanup: delete duplicate lines
2018-10-10 16:46:45 -07:00
k8s-ci-robot 77742ea94c
Merge pull request #69301 from neolit123/kubeadm-version-stable
kubeadm: handle stable-1 as the default version
2018-10-10 12:01:18 -07:00
k8s-ci-robot ccf6611c65
Merge pull request #69586 from neolit123/kubeadm-cleanup-init
kubadm: remove misleading message in `init`
2018-10-10 06:03:24 -07:00
k8s-ci-robot c487e67290
Merge pull request #69575 from fabriziopandini/Kubeadm-api-doc
kubeadm - improve api config documentation
2018-10-10 06:03:04 -07:00
Ed Bartosh eacff9436e kubeadm: allow usage --config with --print-join-command
kubeadm token create  --print-join-command --config <path>
fails with Error: can not mix '--config' with arguments [print-join-command]

As print-joint command can't be put into the configuration file it
should be possible to use those 2 options at the same time.

Added print-join-command options to the list of exceptions in
ValidateMixedArguments check to allow its usage with --config option.

Fixes: kubernetes/kubeadm#1166
2018-10-10 16:00:55 +03:00
Mitar 3f8ef7c6f8
Adding more kernel config paths 2018-10-10 00:37:14 -07:00
Lubomir I. Ivanov 28c936ea7f kubadm: remove misleading message in `init`
The message right before the kubelet boots up the control
plane is misleading because the image pulling is now part of
preflight.

Remove the message.
2018-10-09 22:27:12 +03:00
fabriziopandini 17cf652783 kubeadm-improve-apidoc 2018-10-09 17:40:05 +02:00
Pingan2017 e734553d3d remove --skip-preflight-checks deprecated info 2018-10-08 17:23:46 +08:00
SataQiu 6b7951a2d0 cleanup: delete duplicate lines 2018-10-08 17:14:22 +08:00
RA489 8729cade98 util/config` packages; filenames and methods should be updated to use new names 2018-10-08 14:12:17 +05:30
Guoliang Wang 187e2e01c9 Move scheduler cache interface and implementation to pkg/scheduler/internal/cache 2018-10-06 20:48:59 +08:00
Christoph Blecker 97b2992dc1
Update gofmt for go1.11 2018-10-05 12:59:38 -07:00
k8s-ci-robot b836fa432e
Merge pull request #69420 from ereslibre/fix-kubeadm-panic
kubeadm: do not panic if etcd local alpha phase is called when an external etcd config is used
2018-10-05 10:55:30 -07:00
Rostislav M. Georgiev f0d82fb5f4 kubeadm: Allow mixing Init and Join Configurations
This change allows mixing InitConfiguration/ClusterConfiguration with
JoinConfiguration in a single YAML file, by performing the following changes:

- Replace the explicit error in `DetectUnsupportedVersion` with a warning.
- Modify `NodeConfigFileAndDefaultsToInternalConfig` to use only
  `JoinConfiguration`.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-10-05 10:46:23 +03:00
Rafael Fernández López 503c6c7b85
kubeadm: do not panic if etcd local alpha phase is called when an external etcd config is used
If etcd local alpha phase is called manually while the kubeadm configuration
points to an external etcd cluster kubeadm panics.
2018-10-05 07:55:17 +02:00
Lubomir I. Ivanov 505413581e kubeadm: handle stable-1 as the default version
The default version in kubeadm is now `stable-1`. This will
pull a version from the `stable-1.txt` endpoint which might
end up being newer than the version of the client by a magnitude
of MINOR or even a MAJOR release.

To be able to prevent this scenario add the new helper function:
validateStableVersion()

This function determines if the remote version is newer than the
local client version and if that's the case it returns `stable-X.xx`
that conforms with the version of the client. If not it returns
the remote version.
2018-10-05 00:02:57 +03:00
fabriziopandini b4092acdb6 autogenerated 2018-10-04 13:20:20 +02:00