Commit Graph

2724 Commits (714fcd910fb7abf8647a6f67bfb15eeed10854a1)

Author SHA1 Message Date
Kubernetes Prow Robot 36ccff1b27
Merge pull request #76821 from ereslibre/kubeadm-config-retry-on-conflict
kubeadm: improve resiliency when conflicts arise when updating the kubeadm-config configmap
2019-04-23 15:50:01 -07:00
Kubernetes Prow Robot 44f254d55e
Merge pull request #76922 from xichengliudui/small-bug
Fix two minor bugs in kubeadm
2019-04-23 07:53:35 -07:00
Kubernetes Prow Robot 0f617a3825
Merge pull request #76500 from rojkov/issue-1399
kubeadm: check all available CA certs against pinned certs
2019-04-23 07:52:21 -07:00
Rafael Fernández López bc8bafd825
kubeadm: improve resiliency when conflicts arise when updating the kubeadm-config ConfigMap
Add the functionality to support `CreateOrMutateConfigMap` and `MutateConfigMap`.

* `CreateOrMutateConfigMap` will try to create a given ConfigMap object; if this ConfigMap
  already exists, a new version of the resource will be retrieved from the server and a
  mutator callback will be called on it. Then, an `Update` of the mutated object will be
  performed. If there's a conflict during this `Update` operation, retry until no conflict
  happens. On every retry the object is refreshed from the server to the latest version.

* `MutateConfigMap` will try to get the latest version of the ConfigMap from the server,
  call the mutator callback and then try to `Update` the mutated object. If there's a
  conflict during this `Update` operation, retry until no conflict happens. On every retry
  the object is refreshed from the server to the latest version.

Add unit tests for `MutateConfigMap`

* One test checks that in case of no conflicts, the update of the
  given ConfigMap happens without any issues.

* Another test mimics 5 consecutive CONFLICT responses when updating
  the given ConfigMap, whereas the sixth try it will work.
2019-04-23 15:40:37 +02:00
Kubernetes Prow Robot 888b81b638
Merge pull request #76238 from Dieken/30s-ttl-for-coredns
change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq
2019-04-23 06:20:09 -07:00
SataQiu cd8fae5370 fix validation message: apiServerEndpoints -> apiServerEndpoint 2019-04-23 11:47:57 +08:00
Sempr 0c7d8722bf MOD: support Wildcard DNS for apiserver certSANs 2019-04-23 10:47:45 +08:00
Kubernetes Prow Robot f9a3a22e35
Merge pull request #76769 from rojkov/kubeadm-drop-NewCACertAndKey
kubeadm: drop duplicate function NewCACertAndKey
2019-04-22 03:21:43 -07:00
Kubernetes Prow Robot c0c1e148e3
Merge pull request #76859 from SataQiu/fix-kubeadm-20190420
kubeadm: use 'errors.Errorf' instead of 'fmt.Errorf'
2019-04-20 14:21:44 -07:00
Kubernetes Prow Robot c262f9c7d9
Merge pull request #76865 from fabriziopandini/fix-certs-renewal
kubeadm: fix kubeadm alpha cert renew error in case of external CA
2019-04-20 11:45:45 -07:00
fabriziopandini dc8331e385 fix-certs-renewal 2019-04-20 17:08:10 +02:00
aaa a5b88f69e9 Fix two minor bugs in kubeadm 2019-04-20 06:42:36 -04:00
aaa 81c30cbeb0 kubeadm cleanup: master -> control-plane
update pul request
2019-04-20 06:15:19 -04:00
SataQiu 62dbd0fa0d use 'errors.Errorf' instead of 'fmt.Errorf' 2019-04-20 17:10:18 +08:00
fabriziopandini d94c5bac47 kubeadm-cleanup-unused-func 2019-04-19 22:30:44 +02:00
Dmitry Rozhkov 580513ed66 kubeadm: drop duplicate function NewCACertAndKey
The function certs.NewCACertAndKey() is just a wrapper around
pkiutil.NewCertificateAuthority() which doesn't add any
additional functionality.

Instead use pkiutil.NewCertificateAuthority() directly.
2019-04-19 19:17:34 +03:00
Davanum Srinivas 7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
Kubernetes Prow Robot cee320a809
Merge pull request #76534 from ping035627/k8s-190413
Expect directory permissions to be 0700
2019-04-18 06:22:09 -07:00
PingWang e3dcd3c0a9 Expect directory permissions to be 0700 or less
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update the permissions to 0660

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

revert to 0750

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update 0750 to 0700

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-04-18 17:31:31 +08:00
Kubernetes Prow Robot a404238d1c
Merge pull request #76638 from SataQiu/clean-command-kubeadm-20190416
[kubeadm] clean up command description information for consistency and readability
2019-04-16 16:20:45 -07:00
Matthew L Daniel b0814869b0
Output missing cert or key name in DownloadCerts
Otherwise the user does not know what key `kubeadm` is expecting, which makes troubleshooting harder
2019-04-16 08:53:48 -07:00
SataQiu 3949ee0f79 clean up command description information for consistency and readability 2019-04-16 22:58:10 +08:00
Kubernetes Prow Robot 82e15dad1c
Merge pull request #76068 from yagonobre/simplify-version-bump
Simplify kubeadm bump version on TestEtcdSupportedVersion
2019-04-16 00:51:08 -07:00
Kubernetes Prow Robot a73730147c
Merge pull request #76564 from tedyu/adm-clean-all
Cleanup as many dirs as possible in CleanupDirs
2019-04-15 08:14:05 -07:00
Ted Yu 185f02dd1a Cleanup as many dirs as possible in CleanupDirs
Signed-off-by: Ted Yu <yute@vmware.com>
2019-04-15 06:10:33 -07:00
Kubernetes Prow Robot f2659bcad8
Merge pull request #76572 from mkumatag/fix_flakey
loop through next entry in stubDomainData if proxyIP == 0
2019-04-15 05:14:05 -07:00
Dmitry Rozhkov 7f8fc5d189 kubeadm: check all available CA certs against pinned certs
Currently kubeadm produces an error upon parsing multiple
certificates stored in the cluster-info configmap. Yet it
should check all available certificates in a scenario like
CA key rotation.

Check all available CA certs against pinned certificate hashes.

Fixes https://github.com/kubernetes/kubeadm/issues/1399
2019-04-15 15:08:06 +03:00
Kubernetes Prow Robot c09cfb7178
Merge pull request #76566 from tedyu/adm-rollback-err
Return aggregate error from rollbackOldManifests
2019-04-15 03:54:23 -07:00
Kubernetes Prow Robot 18533fe84f
Merge pull request #76545 from xichengliudui/update-DNSType-comments
Update DNSType comments on compute.go
2019-04-15 00:20:01 -07:00
Manjunath A Kumatagi 23153e3f04 loop through next entry in stubDomainData if proxyIP == 0 2019-04-14 20:14:01 -05:00
Kubernetes Prow Robot 299aa5d7a6
Merge pull request #76505 from rosti/fix-join-cri-detection
kubeadm: Don't error out on join with --cri-socket override
2019-04-14 14:30:00 -07:00
Ted Yu 3e0423926a Return aggregate error from rollbackOldManifests 2019-04-14 10:06:07 -07:00
SataQiu 8b7b2349c7 capitalize the first letter of the prompt for consistency 2019-04-14 19:10:51 +08:00
Kubernetes Prow Robot 0a59758c58
Merge pull request #76549 from xichengliudui/ends-with-newline
Use fmt.printf() to end with a newline
2019-04-13 15:26:00 -07:00
Rostislav M. Georgiev 2d4307db9f kubeadm: Don't error out on join with --cri-socket override
In the case where newControlPlane is true we don't go through
getNodeRegistration() and initcfg.NodeRegistration.CRISocket is empty.
This forces DetectCRISocket() to be called later on, and if there is more than
one CRI installed on the system, it will error out, while asking for the user
to provide an override for the CRI socket. Even if the user provides an
override, the call to DetectCRISocket() can happen too early and thus ignore it
(while still erroring out).
However, if newControlPlane == true, initcfg.NodeRegistration is not used at
all and it's overwritten later on.
Thus it's necessary to supply some default value, that will avoid the call to
DetectCRISocket() and as initcfg.NodeRegistration is discarded, setting
whatever value here is harmless.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-04-12 17:25:11 +03:00
Xin Wang 9870e0e7b5 Fix typo cgroupDriver -> cgroup-driver
Signed-off-by: Xin Wang <wileywang@yunify.com>
2019-04-12 06:38:53 +08:00
aaa 85901dd0e0 Update DNSType comments on compute.go
update pull request

update pull request

update pull request

update pull request
2019-04-10 11:43:18 -04:00
Dmitry Rozhkov 2d77d9a5a9 kubeadm: use correct expected key when checking test results
Resulting key needs to be compared with the expected key which
was set for the test case, not just a key.
2019-04-10 15:09:12 +03:00
aaa 980de9d38b Use fmt.printf() to end with a newline
update pull request
2019-04-10 03:27:25 -04:00
Lubomir I. Ivanov 46a3fb4bbd kubeadm: disable the kube-proxy DaemonSet on non-Linux nodes
Windows worker nodes run kube-proxy as a Windows service.
In the future the kube-proxy DaemonSet might run on Windows nodes
too, but for now a temporary measure is needed to disable it.

Add a linux node selector in the kube-proxy manifest spec.
2019-04-09 11:48:30 +03:00
Manuel Rüger 912794b302 kubeadm: Quote values on envFile
See documentation: https://github.com/kubernetes/website/blob/master/content/en/docs/setup/independent/kubelet-integration.md#workflow-when-using-kubeadm-init

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
2019-04-08 09:23:35 +02:00
Yubao Liu f7f51fab2a change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq 2019-04-07 20:41:25 +08:00
Kubernetes Prow Robot 84b561033e
Merge pull request #76175 from stealthybox/refactor-mediatype-loops
Refactor loops over `SupportedMediaTypes()` where mediaType is used to match a single SerializerInfo{}
2019-04-04 23:54:07 -07:00
Kubernetes Prow Robot a4a4b4c1db
Merge pull request #76119 from SataQiu/improve-kubeadm-20190404
Code refactor: replace repeated values with a constant
2019-04-04 22:31:43 -07:00
Kubernetes Prow Robot 990ee3c09c
Merge pull request #76116 from xichengliudui/patch-5
Fix comments and function names are different
2019-04-04 21:08:07 -07:00
leigh capili 47e52d2981 Refactor loops over SupportedMediaTypes() where mediaType is used to match a single SerializerInfo{}
We have an existing helper function for this:  runtime.SerializerInfoForMediaType()

This is common prep-work for encoding runtime.Objects into JSON/YAML for transmission over the wire or writing to ComponentConfigs.
2019-04-04 19:01:01 -06:00
qingsenLi ccac84c12b delete some unused consts in kubeadm/app/constants/constants.go 2019-04-04 19:54:51 +08:00
SataQiu 4a200a2222 replace repeated values with a constant 2019-04-04 12:42:26 +08:00
lIuDuI 6f89267125
Fix comments and function names are different 2019-04-04 10:57:20 +08:00
Kubernetes Prow Robot 2c675818ed
Merge pull request #75866 from jmkeyes/kubeadm-config-image-repository-flag
Provide imageRepository override for 'kubeadm config images' commands.
2019-04-03 11:14:37 -07:00
Kubernetes Prow Robot 7cdd26e127
Merge pull request #76071 from qingsenLi/k8s190403
fix some spelling error
2019-04-03 05:31:53 -07:00
qingsenLi 1350446417 fix some spelling error 2019-04-04 00:07:19 +08:00
Kubernetes Prow Robot 628925672c
Merge pull request #76029 from SataQiu/improve-kubeadm-20190403
Code improve: use constants instead of hard coding
2019-04-03 05:31:41 -07:00
Kubernetes Prow Robot 0ec8ce0077
Merge pull request #76038 from MengZn/patch-1
patch-reset
2019-04-03 03:24:06 -07:00
Kubernetes Prow Robot 0f3867a830
Merge pull request #75948 from xichengliudui/addconstants
Replace variables 10251 and 10252 with constants
2019-04-03 03:23:55 -07:00
MengZeLee 52d8f5e19b patch-reset
When we reset cluster, the program does not automatically delete it ($HOME/.kube/config).
We should prompt the user how to checkt
2019-04-03 14:18:49 +08:00
Yago Nobre cd605e7d14
Simplify kubeadm bump version on TestEtcdSupportedVersion 2019-04-03 01:28:07 -03:00
SataQiu 9e051bb327 code improve: use constants instead of hard coding 2019-04-03 05:58:01 +08:00
PingWang 38fe68658d Extract Method for kubeadm
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-04-02 18:45:30 +08:00
Kubernetes Prow Robot c3cc31797a
Merge pull request #75969 from rajansandeep/translationcheck
Fix translation from kube-dns to CoreDNS Config to skip invalid values
2019-04-01 22:44:35 -07:00
Kubernetes Prow Robot dd96b15e5d
Merge pull request #75931 from xichengliudui/Simplify-two-if
Simplify two if (remove redundant code)
2019-04-01 15:49:21 -07:00
Sandeep Rajan deadefd385 Fix translation to skip invalid values 2019-04-01 15:15:39 -04:00
Kubernetes Prow Robot 255a73ffc6
Merge pull request #75939 from xichengliudui/conversion-constants
Define common sentences as constants
2019-04-01 10:03:25 -07:00
Kubernetes Prow Robot 13cde9e181
Merge pull request #75950 from qingsenLi/k8s190401-fix-Certifcate
spelling error 'Certifcate'
2019-04-01 06:38:58 -07:00
qingsenLi 703a397ee3 spelling error 'Certifcate' 2019-04-02 01:14:56 +08:00
SataQiu 694a5f1cdf use constant instead of hard coding 2019-04-01 13:29:47 +08:00
Kubernetes Prow Robot 8f304510c5
Merge pull request #75900 from neolit123/fix-upgrade-plan
kubeadm: fix "upgrade plan" not defaulting to a "stable" version
2019-03-30 12:47:08 -07:00
Kubernetes Prow Robot 214340256f
Merge pull request #75874 from SataQiu/refactor-kubeadm-20190329
Refactor code about setting KubernetesVersionFlag
2019-03-29 23:53:33 -07:00
Kubernetes Prow Robot c7a8596a39
Merge pull request #75867 from SataQiu/fix-kubeadm-golint-20190329
Fix golint failures in cmd/kubeadm/app/util/system
2019-03-29 17:33:57 -07:00
Lubomir I. Ivanov d6328f1dbe kubeadm: fix "upgrade plan" not working without k8s version
If the k8s version argument passed to "upgrade plan" is missing
the logic should perform the following actions:
- fetch a "stable" version from the internet.
- if that fails, fallback to the local client version.

Currentely the logic fails because the cfg.KubernetesVersion is
defaulted to the version of the existing cluster, which
then causes an early exit without any ugprade suggestions.

See app/cmd/upgrade/common.go::enforceRequirements():
  configutil.FetchInitConfigurationFromCluster(..)

Fix that by passing the explicit user value that can also be "".
This will then make the "offline getter" treat it as an explicit
desired upgrade target.

In the future it might be best to invert this logic:
- if no user k8s version argument is passed - default to the kubeadm
version.
- if labels are passed (e.g. "stable"), fetch a version from the
internet.
2019-03-29 21:34:58 +02:00
Kubernetes Prow Robot e6d274233c
Merge pull request #75646 from bart0sh/PR0066-kubeadm-token-delete-multiple
kubeadm: implement deletion of multiple tokens
2019-03-29 11:48:24 -07:00
SataQiu 4f6003b61f refactor code about setting KubernetesVersionFlag 2019-03-29 15:51:16 +08:00
SataQiu a41c85ea07 fix golint failures in cmd/kubeadm/app/util/system 2019-03-29 12:03:25 +08:00
Joshua M. Keyes 03725f78b4 Provide imageRepository override for 'kubeadm config images' commands. 2019-03-28 20:53:39 -07:00
Kubernetes Prow Robot 91f40aec8a
Merge pull request #75847 from fabriziopandini/fix-external-etcd
kubeadm: fix join control-plane with external-etcd
2019-03-28 16:54:16 -07:00
fabriziopandini f09d6388b2 fix-external-etcd 2019-03-28 23:25:18 +01:00
Kubernetes Prow Robot c5114ee6c3
Merge pull request #75762 from SataQiu/fix-kubeadm-gates-20190327
Fix none feature gates list
2019-03-28 10:30:43 -07:00
SataQiu c9cd3db627 fix none feature gates list 2019-03-28 20:11:47 +08:00
Kubernetes Prow Robot 6a277e0c4d
Merge pull request #75784 from bart0sh/PR0069-kubeadm-use-t.Run-in-app-phases
kubeadm: use t.Run in app/phases
2019-03-28 02:34:43 -07:00
Kubernetes Prow Robot 7131617d0c
Merge pull request #74399 from RA489/runpullimagescleanup
Rename RunPullImagesCheck to PullControlPlaneImages
2019-03-27 16:01:03 -07:00
Ed Bartosh 296df304a4 kubeadm: use t.Run in app/phases
Used T.Run API for kubeadm tests in app/phases/*

This should improve testing output and make it more visible
which test is doing what.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2019-03-27 19:39:30 +01:00
Kubernetes Prow Robot 5a6c66a729
Merge pull request #72454 from rojkov/kubeadm-fallback-version
kubeadm: add final fallback to constants.CurrentKubernetesVersion
2019-03-27 11:02:50 -07:00
Ed Bartosh 405a9715f1 kubeadm: implement deletion of multiple tokens 2019-03-27 11:00:40 +01:00
Kubernetes Prow Robot 531dbd409f
Merge pull request #75445 from shinytang6/enhance/fmt
Replace all time.Now().Sub with time.Since
2019-03-26 13:55:17 -07:00
Kubernetes Prow Robot f3efd1d0b7
Merge pull request #75036 from bart0sh/PR0065-kubeadm-replace-RequiredIPVSKernelModulesAvailable-check
kubeadm: reimplement IPVS check
2019-03-25 13:24:38 -07:00
Kubernetes Prow Robot 3c9c7fca64
Merge pull request #75027 from ping035627/k8s-190306
Add some logs for kubeadm join
2019-03-25 03:23:07 -07:00
PingWang 5a8174bd45 Add some logs for kubeadm join
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-03-25 10:07:47 +08:00
Kubernetes Prow Robot 9c53f24012
Merge pull request #75179 from rosti/kill-v1alpha3
kubeadm: remove v1alpha3
2019-03-22 17:02:21 -07:00
aaa 867ad233c6 Replace variables 10251 and 10252 with constants
update pull request

update pull request
2019-03-22 00:27:53 -04:00
aaa 112da093ed Define common sentences as constants
update pull request

update pull request

update pull request

update pull request

update pull request

update pull request
2019-03-21 18:56:42 -04:00
aaa 5c8e550a29 Simplify two if
update pull request

update pull request

update pull request

update pull request

update pull request

update pull request
2019-03-21 18:32:00 -04:00
Kubernetes Prow Robot 0c93929298
Merge pull request #75178 from rosti/kill-commonconfig
kubeadm: Cleanup CommonConfiguration
2019-03-21 13:35:36 -07:00
Kubernetes Prow Robot ad4727440c
Merge pull request #75185 from ereslibre/certs-integration
kubeadm: add integration tests for certs transfer
2019-03-21 05:17:36 -07:00
shinytang6 5c9f4d9dc6 replace time.Now().Sub with time.Since 2019-03-21 18:02:55 +08:00
Kubernetes Prow Robot 4940eae478
Merge pull request #75521 from fabriziopandini/kubeadm-owners
Update kubeadm OWNERS file
2019-03-20 15:05:00 -07:00
fabriziopandini c799c8275f kubeadm-owners 2019-03-20 21:50:04 +01:00
Kubernetes Prow Robot b1e7c20a07
Merge pull request #75318 from ymlong/fix-20190313
Correcting a spelling error
2019-03-20 09:53:24 -07:00
Kubernetes Prow Robot 30071b31c7
Merge pull request #75261 from rosti/fix-fuzzer-cri
kubeadm: Fix fuzzer test for NodeRegistrationOptions
2019-03-20 05:25:05 -07:00
Kubernetes Prow Robot cad1b4dbac
Merge pull request #75252 from d-kuro/feature/fix-typo
Fixed typo
2019-03-20 05:24:49 -07:00
Kubernetes Prow Robot 5e90834abe
Merge pull request #75102 from qingsenLi/k8s190307-fix-typo
fix a typo
2019-03-20 00:54:23 -07:00
Kubernetes Prow Robot 16b5f7d3c5
Merge pull request #67487 from tianshapjq/validate-system-kube-reserved
validate systemReservedCgroup and kubeReservedCgroup
2019-03-19 21:26:22 -07:00
Kubernetes Prow Robot c7e56c7ea1
Merge pull request #74719 from vaamarnath/refactor-dir-create-for-dry-runs
kubeadm: refactored directory fetch code
2019-03-19 20:15:20 -07:00
Marques Johansson 10102cef3c Restore machine readability to the print-join-command output
The output of `kubeadm token create --print-join-command` should be
usable by batch scripts. This issue was pointed out in:

https://github.com/kubernetes/kubeadm/issues/1454
2019-03-19 17:50:04 -04:00
Kubernetes Prow Robot b61baea135
Merge pull request #75420 from fabriziopandini/fix-kubeadm-init-output
fix kubeadm init output
2019-03-18 06:07:11 -07:00
fabriziopandini fcadf143a5 fix-kubeadm-init-output 2019-03-18 12:52:41 +01:00
Kubernetes Prow Robot ebea037729
Merge pull request #75431 from fabriziopandini/fix-external-ca
fix kubeadm external CA Mode
2019-03-17 06:28:56 -07:00
fabriziopandini ff072aa639 fix-external-ca 2019-03-17 13:03:40 +01:00
Kubernetes Prow Robot fe8b1e24ee
Merge pull request #75425 from liggitt/kubeadm-insecure-port
Kubeadm insecure port
2019-03-16 17:24:55 -07:00
Jordan Liggitt d4591ea324 Revert "Stop using API server's `--insecure-port`"
This reverts commit 5b64a98689.
2019-03-16 16:24:49 -04:00
Kubernetes Prow Robot 1a24040447
Merge pull request #74781 from liggitt/http2-watch
kubelet watch-manager test, restore watch-based manager default
2019-03-16 12:52:56 -07:00
Rafael Fernández López bc26c69b61
kubeadm: Allow certain certs/keys to be missing on the secret.
Under certain circumstances, specially when using an insecure external
etcd cluster (no certificates), or when using external certificates (
no CA key), some keys inside the kubeadm-certs secret data can contain
the key with an empty value on the map.

When downloading certs just ignore those that are blank and inform the
user about it.
2019-03-15 23:34:17 +01:00
Ed Bartosh 2914171ed4 kubeadm: reimplement IPVS check
Used existing IPVS Proxier API CanUseIPVSProxier instead
of custom implementation.

Fixes kubernetes/kubeadm#975
2019-03-14 16:52:21 +02:00
RA489 8bcc82a9e4 Rename RunPullImagesCheck to PullControlPlaneImages 2019-03-14 15:37:38 +05:30
Jordan Liggitt f2a0c0342c Revert "Revert kubelet to default to ttl cache secret/configmap behavior"
This reverts commit cd1c9f9018.
2019-03-13 15:12:26 -07:00
Amarnath be8d1c24f1 kubeadm: refactored directory fetch code 2019-03-13 18:28:53 +05:30
ymlong 8be2a4c9f6 Correcting a spelling error 2019-03-13 11:15:50 +08:00
Kubernetes Prow Robot 50bf223a05
Merge pull request #75224 from neolit123/certs-print-key-on-phase
kubeadm: print key inside the upload-certs phase of init
2019-03-11 12:00:15 -07:00
Rafael Fernández López 8737720a7d
kubeadm: add integration tests for certs transfer
* Upload certificates: generate certificates and check that the kubeadm-certs
  secret is populated with the expected contents.

* Download certificates: given we have a kubeadm-certs secret, ensure that
  keys and certificates are copied on the expected target, and that depending
  on the secret nature they have the expected permissions.
2019-03-11 16:27:37 +01:00
Rostislav M. Georgiev 2c4a3ae24c kubeadm: Fix fuzzer test for NodeRegistrationOptions
The fuzzer test for NodeRegistrationOptions is defaulting the CRISocket member.
This is a left over from the times this member was statically defaulted in the
config. Now that the member is dynamically defaulted, setting CRISocket to foo
can cause issues to get undetected by the fuzzer test with this member.

The resolution is to stop setting CRISocket in the fuzzer test.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-03-11 14:09:53 +02:00
d-kuro 4f301cc97a
Fix typo 2019-03-11 13:12:46 +09:00
Lubomir I. Ivanov c5c4cd2580 kubeadm: print key inside the upload-certs phase of init
The standalone execution of upload-certs phase does not print
the key that that user should use for the newly uploaded encrypted
secret. Print this key in the upload-certs phase in both
standalone mode or if executed in the standard init workflow.

Make it possible to omit the printing if the user passes
--skip-certificate-key-print.

Also:
- Uppercase string in Printf call in copycerts.go
- Don't use V(1) for the "Skipping phase" message in uploadcerts.go
instead always print a message that the user case use
--experimental-upload-certs. This solves a problem if the user tried
the standalone phase but didn't pass --experimental-upload-certs.
2019-03-10 19:13:06 +02:00
Rafael Fernández López b57c8e2c45
kubeadm: fix join message if kubeadm-certs secret is not present
`kubeadm init phase upload-certs` requires --experimental-upload-certs
argument. Make this explicit in the error if the secret is missing.
2019-03-08 22:34:11 +01:00
Rostislav M. Georgiev 36783eb88b kubeadm: remove v1alpha3
Remove deprecated old v1alpha3 kubeadm config.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-03-08 14:54:51 +02:00
Rostislav M. Georgiev 4567e7e79e kubeadm: Cleanup CommonConfiguration
CommonConfiguration is an interface, that aims at abstracting common
configuration of InitConfiguration and JoinConfiguration. It was never widely
used and never got too much functionality attached to it. With recent
developments in the kubeadm config field, it got even more out of touch with
reality and where things are going.
Thus, the only viable solution is to remove it completely.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-03-08 14:45:30 +02:00
qingsenLi 55d34ac97e fix a typo 2019-03-08 04:05:49 +08:00
Kubernetes Prow Robot f0418ac3c2
Merge pull request #75082 from neolit123/reset-clean-status
kubeadm-reset: add means to clear the ClusterStatus
2019-03-07 05:15:02 -08:00
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
Timothy St. Clair ef31616e45 Revert "Merge pull request #74628 from hpandeycodeit/alpha_kubeconf"
This reverts commit 7053e43b2e, reversing
changes made to d58ff3bfc0.
2019-03-06 14:07:15 -06:00
Kubernetes Prow Robot c360bac6e2
Merge pull request #75032 from rosti/win-test
kubeadm: Don't hardcode temp path in a test
2019-03-06 09:51:15 -08:00
Kubernetes Prow Robot 0e2c26829c
Merge pull request #75013 from neolit123/fix-join-flags
kubeadm: amend flags for join phases
2019-03-06 09:51:04 -08: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
Rostislav M. Georgiev 5a3b1a0c7c kubeadm: Don't hardcode temp path in a test
Hardcoding a temp path of /tmp/... is not portable and can potentially cause
other issues (such as flakyness) too.
Use TempFile instead.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-03-06 12:27:31 +02:00
Kubernetes Prow Robot e15ebcd632
Merge pull request #74952 from ping035627/k8s-190305
Fix some typos
2019-03-06 02:08:02 -08:00
Kubernetes Prow Robot d7971e24f3
Merge pull request #74870 from neolit123/fix-join-phase
kubeadm: update output of init, join reset commands
2019-03-06 00:44:38 -08:00
Kubernetes Prow Robot 2b63efcd3e
Merge pull request #74671 from yagonobre/certificate-key
Add certificate-key to kubeadm upload-certs phase, and improve init output
2019-03-05 21:42:32 -08:00
Lubomir I. Ivanov 3e151ab546 kubeadm: amend flags for join phases
Certain join phases have flags that are redundant:
- getControlPlanePreparePhaseFlags():
  - amend flags (use switch / case)
  - add example for the parent command
  - rename internal function and sub-phase "manifests"
    to "control-plane"
- getControlPlaneJoinPhaseFlags():
  - amend flags
  - remove MacroCommandLongDescription
2019-03-06 04:59:35 +02: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
Yago Nobre b1936853c4
Add certificate-key to kubeadm init upload-certs phase, and improve init output 2019-03-05 14:35:52 -03:00
PingWang 55dac4804f Fix some typos
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-03-05 17:58:09 +08:00
Lubomir I. Ivanov af9e3fcfaa kubeadm: add a flag to RunInitNodeChecks to indicate sec. control-plane
Add an extra flag isSecondaryControlPlane to RunInitNodeChecks
which can be used to indicate that the node we are checking is
a secondary control-plane. In such a case we skip some tests
that are already covered by  RunJoinNodeChecks and
RunOptionalJoinNodeChecks.
2019-03-05 02:44:30 +02:00
Lubomir I. Ivanov 269a07c077 kubeadm-reset: fetch init config only if client is non-nil 2019-03-04 04:14:51 +02:00
Kubernetes Prow Robot 37f0138278
Merge pull request #71874 from neolit123/fix-kubeconfig-path
kubeadm: use DefValue for the --kubeconfig flag
2019-03-03 17:28:44 -08:00
Kubernetes Prow Robot 1f6ea0455b
Merge pull request #74780 from pytimer/kubeadm-reduce
kubeadm: reduce some functions number of parameters
2019-03-03 04:23:24 -08:00
pytimer f600348006 kubeadm: reduce some functions number of parameters 2019-03-03 15:16:19 +08:00
fabriziopandini a3ed9f0c2c join-phases-texts 2019-03-02 21:52:04 +01:00
Kubernetes Prow Robot e1b79abfec
Merge pull request #74831 from fabriziopandini/remove-discovery-flags
Remove discovery flags from kubeadm join phases (when possible)
2019-03-02 11:16:12 -08:00
fabriziopandini 5ecd74afbe remove-discovery-flags 2019-03-02 18:31:32 +01:00
Kubernetes Prow Robot d8d260a09d
Merge pull request #74755 from liggitt/kubelet-watch
Revert kubelet to default to ttl cache secret/configmap behavior
2019-03-01 19:14:14 -08:00
Kubernetes Prow Robot fc30b38021
Merge pull request #74756 from fabriziopandini/cleanup-join-phases
Cleanup join data struct
2019-03-01 14:08:58 -08:00