Commit Graph

2416 Commits (42aba643290c19a63168513bd758822e8014a0fd)

Author SHA1 Message Date
Kubernetes Prow Robot 739af85d7a
Merge pull request #74064 from vanduc95/cleanup-kubeadm-cont.2-20190214
kubeadm cleanup: master -> control-plane (cont.2)
2019-02-21 10:43:07 -08:00
Kubernetes Prow Robot 62ba022249
Merge pull request #74329 from ping035627/k8s-190221
Delete unuse const and fix some typos
2019-02-21 08:04:10 -08:00
Kubernetes Prow Robot 2721ca28ee
Merge pull request #74256 from rojkov/kubeadm-refactor-drop-newK8sVersionStr
kubeadm: drop applyFlags.newK8sVersionStr field
2019-02-21 08:03:58 -08:00
PingWang ac132aae60 Delete unuse const and fix some typos
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-02-21 11:09:09 +08:00
vanduc95 ae1ec8826a kubeadm cleanup: master -> control-plane (cont.2) 2019-02-21 10:02:24 +07:00
Kubernetes Prow Robot c06ca11b5d
Merge pull request #70896 from ksubrmnn/overlay_dsr
Adding Windows Overlay support to Kube Proxy
2019-02-20 12:53:13 -08:00
Kubernetes Prow Robot b4a2b63561
Merge pull request #73907 from yagonobre/init-upload-certs
Add kubeadm init upload encrypted certs phase
2019-02-20 11:33:44 -08:00
Kubernetes Prow Robot b0f6857f92
Merge pull request #74277 from neolit123/fix-join-phase
kubeadm/join: expose the KubeConfigPath() method to joinData
2019-02-20 07:44:57 -08:00
Lubomir I. Ivanov 5db0c61788 kubeadm/join: expose the KubeConfigPath() method to joinData
This fixes the following error:
"error execution phase control-plane-join/etcd:
control-plane-join phase invoked with an invalid data struct"

The problem here is that joinData cannot be type-asserted
to the interface type under controlplanejoin.go (controlPlaneJoinData)
because joinData lacks KubeConfigPath.

Given we use KubeConfigPath in more than one place for join
it makes sense to define define the method and make it return:
kubeadmconstants.GetAdminKubeConfigPath()
2019-02-20 14:17:53 +02:00
Kubernetes Prow Robot 7b203c6809
Merge pull request #74137 from rajansandeep/readinessprobe
Add readinessProbe to CoreDNS
2019-02-19 16:24:04 -08:00
Kubernetes Prow Robot 2911e86e0e
Merge pull request #73452 from RA489/graduate-control-plane-join-phase
kubeadm: graduate control plane join phase
2019-02-19 09:55:23 -08:00
Kubernetes Prow Robot cd07a336f1
Merge pull request #73775 from yagonobre/init-certs
Remove todos from init upload certs
2019-02-19 08:37:18 -08:00
Sandeep Rajan 37c3d68a91 Add readinessProbe 2019-02-19 10:14:12 -05:00
Dmitry Rozhkov 45ed7ae051 kubeadm: drop applyFlags.newK8sVersionStr field
The structure `applyFlags` is meant to keep a user's
input from command line and as such should be immutable.

Use either a variable or the validated `InitConfig.KubernetesVersion`
field instead.
2019-02-19 15:42:32 +02:00
Rostislav M. Georgiev f64baf755e kubeadm: Don't load deprecated configs
Currently kubeadm supports a couple of configuration versions - v1alpha3 and
v1beta1. The former is deprecated, but still supported.

To discourage users from using it and to speedup conversion to newer versions,
we disable the loading of deprecated configurations by all kubeadm
sub-commands, but "kubeadm config migrate".

v1alpha3 is still present and supported at source level, but cannot be used
directly with kubeadm and some of its internal APIs.

The added benefit to this is, that users won't need to lookup for an old
kubeadm binary after upgrade, just because they were stuck with a deprecated
config version for too long.

To achieve this, the following was done:

- ValidateSupportedVersion now has an allowDeprecated boolean parameter, that
  controls if the function should return an error upon detecting deprecated
  config version. Currently the only deprecated version is v1alpha3.

- ValidateSupportedVersion is made package private, because it's not used
  outside of the package anyway.

- BytesToInitConfiguration and LoadJoinConfigurationFromFile are modified to
  disallow loading of deprecated kubeadm config versions. An error message,
  that points users to kubeadm config migrate is returned.

- MigrateOldConfig is still allowed to load deprecated kubeadm config versions.

- A bunch of tests were fixed to not expect success if v1alpha3 config is
  supplied.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-19 12:27:39 +02:00
Yago Nobre 79fd5f25a7 Add kubeadm init upload encrypted certs phase 2019-02-19 02:52:21 -03:00
RA489 6bbed9fef0 kubeadm: graduate control plane join phase 2019-02-19 11:09:00 +05:30
Yago Nobre 3a6c80c372 Remove todos from init certs phase 2019-02-18 21:33:19 -03:00
Kubernetes Prow Robot 9891824352
Merge pull request #74212 from rojkov/kubeadm-drop-applyFlags-newK8sVersion
kubeadm: drop applyFlags.newK8sVersion field
2019-02-18 10:37:42 -08:00
Kubernetes Prow Robot c923a68470
Merge pull request #74024 from rosti/optimize-config-migrate
kubeadm: Replace MigrateOldConfigFromFile
2019-02-18 10:37:32 -08:00
Dmitry Rozhkov a49dc107a3 kubeadm: drop applyFlags.newK8sVersion field
since it's not a command line flag. Use a variable instead.
2019-02-18 17:04:30 +02:00
Dmitry Rozhkov 193d0f21c4 kubeadm: use non-formatting constructor for new error 2019-02-18 09:51:53 +02:00
Kubernetes Prow Robot 16e08f3e53
Merge pull request #73408 from Klaven/component-base-flags
Move flag util pkgs to k8s.io/component-base/cli
2019-02-15 16:46:08 -08:00
Kubernetes Prow Robot f47fbbfd32
Merge pull request #74131 from rojkov/kubeadm-refactor-SessionIsInteractive
kubeadm: unhide the logic for non-interactiveness
2019-02-15 14:05:30 -08:00
Kubernetes Prow Robot 256106e5d1
Merge pull request #74053 from SataQiu/fix-golint-20190214
Fix golint failures on cmd/kubeadm/app/util/config
2019-02-15 12:43:45 -08:00
Kubernetes Prow Robot 07da603b59
Merge pull request #74054 from vanduc95/cleanup-kubeadm-20190214
kubeadm cleanup: master -> control-plane (cont.1)
2019-02-15 07:53:15 -08:00
Marek Counts 160ed26c20 autogen files to support new project structure. 2019-02-15 10:29:31 -05:00
Marek Counts 7744f90830 Moved flag and globalflag
Moved all flag code from `staging/src/k8s.io/apiserver/pkg/util/[flag|globalflag]` to `component-base/cli/[flag|globalflag]` except for the term function because of unwanted dependencies.
2019-02-15 10:28:13 -05:00
Dmitry Rozhkov 339a9c1c1b kubeadm: unhide the logic for non-interactiveness
Currently we maintain the state of the mode of interactiveness
by updating flags.nonInteractiveMode even if the flag hasn't been
set by the user.

Since the computation of the mode is done only once it's easier
and less error prone to calculate the mode in the function
sessionIsInteractive() without mutating any flags.
2019-02-15 14:37:27 +02:00
Kubernetes Prow Robot b6ca168911
Merge pull request #74072 from bart0sh/PR0061-kubeadm-fix-failed-to-load-admin-kubeconfig
kubeadm: fix kubeadm reset logic
2019-02-14 17:05:41 -08:00
vanduc95 46247b2c93 kubeadm cleanup: master -> control-plane (cont.) 2019-02-15 06:49:31 +07:00
Kubernetes Prow Robot 08d0522730
Merge pull request #73844 from rojkov/kubeadm-restructure-upgradeVariables
kubeadm: restructure upgradeVariables
2019-02-14 07:25:36 -08:00
Ed Bartosh 7a8de82dfd kubeadm: fix kubeadm reset logic
If /etc/kubeadm/amdin.conf doesn't exist kubeadm reset fails
with the error:
    failed to load admin kubeconfig: open /root/.kube/config: no such file or directory

Fixed by properly checking if file exists before using it.
2019-02-14 12:57:25 +02:00
Rostislav M. Georgiev f73ac0da3e kubeadm: Replace MigrateOldConfigFromFile
MigrateOldConfigFromFile is a function, whose purpose is to migrate one config
into another. It is working OK for now, but it has some issues:

- It is incredibly inefficient. It can reload and re-parse a single config file
  for up to 3 times.

- Because of the reloads, it has to take a file containing the configuration
  (not a byte slice as most of the rest config functions). However, it returns
  the migrated config in a byte slice (rather asymmetric from the input
  method).

- Due to the above points it's difficult to implement a proper interface for
  deprecated kubeadm config versions.

To fix the issues of MigrateOldConfigFromFile, the following is done:

- Re-implement the function by removing the calls to file loading package
  public APIs and replacing them with newly extracted package private APIs that
  do the job with pre-provided input data in the form of
  map[GroupVersionKind][]byte.

- Take a byte slice of the input configuration as an argument. This makes the
  function input symmetric to its output. Also, it's now renamed to
  MigrateOldConfig to represent the change from config file path as an input
  to byte slice.

- As a bonus (actually forgotten from a previous change) BytesToInternalConfig
  is renamed to the more descriptive BytesToInitConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-14 11:52:33 +02:00
Kubernetes Prow Robot 30c7df5cd8
Merge pull request #73987 from vanduc95/cleanup-kubeadm-20190213
kubeadm cleanup: master -> control-plane
2019-02-13 23:07:11 -08:00
Kubernetes Prow Robot d01b01beb2
Merge pull request #74032 from tedyu/master
Use Set to check whether flag name is allowed flag
2019-02-13 20:33:17 -08:00
Kubernetes Prow Robot 5b600c5ce3
Merge pull request #73988 from SataQiu/kubeadm-cleanup-20190213
kubeadm cleanup: master -> control-plane :)
2019-02-13 20:32:57 -08:00
SataQiu 19c7f4cb0b fix golint failures on cmd/kubeadm/app/util/config 2019-02-14 12:11:24 +08:00
vanduc95 0e8941f7ec kubeadm cleanup: master -> control-plane 2019-02-14 09:18:42 +07:00
Ted Yu 71134a0d05 Use Set to check whether flag name is allowed flag
Signed-off-by: Ted Yu <yute@vmware.com>
2019-02-13 13:01:21 -08:00
Kubernetes Prow Robot 07428f7e5d
Merge pull request #73992 from SataQiu/golint-fix-20190213
Fix golint failures on cmd/kubeadm/app
2019-02-13 12:16:20 -08:00
Kubernetes Prow Robot a20c186d80
Merge pull request #73942 from rumshenoy/cleanup_constants
Move all constants to a single `const (`
2019-02-13 10:59:53 -08:00
Kubernetes Prow Robot 2bfbbc3141
Merge pull request #73998 from yagonobre/fix-mixed-args
Allow the usage of --kubeconfig-dir and --config flags on kubeadm init
2019-02-13 09:45:28 -08:00
SataQiu 7edea2b77f kubeadm cleanup: master -> control-plane 2019-02-13 23:13:31 +08:00
Yago Nobre 277dfbbdeb Add --kubeconfig-dir to validate mixed arguments whitelist, and refactor ValidateMixedArguments 2019-02-13 04:06:26 -02:00
SataQiu a957c83181 fix golint failures on cmd/kubeadm/app 2019-02-13 12:02:28 +08:00
Kubernetes Prow Robot 2981fb7a01
Merge pull request #73950 from SataQiu/cleanup-kubeadm-20190212
kubeadm cleanup: master -> control-plane
2019-02-12 12:40:11 -08:00
Kubernetes Prow Robot 51f5164f89
Merge pull request #73945 from neolit123/kubeadm-tests-non-linux
kubeadm: remove nodefs.inodesFree test defaulting on non-Linux
2019-02-12 12:40:01 -08:00
Ramya Shenoy 26392c0acd Move all constants to a single `const (`
[#1400]
2019-02-12 09:52:11 -08:00
Rafael Fernández López 30dc43ff86
kubeadm: set priority class name to `system-cluster-critical` for all master components
Remove the deprecated `scheduler.alpha.kubernetes.io/critical-pod` pod annotation and use
the `priorityClassName` first class attribute instead, setting all master components to
`system-cluster-critical`.
2019-02-12 17:50:36 +01:00