Commit Graph

3190 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
da0f51ffed
Merge pull request #78820 from haosdent/fix_typos
Fix typos.
2019-07-01 15:09:20 -07:00
Kubernetes Prow Robot
de8fb1c9f8
Merge pull request #79449 from neolit123/kubeadm-docker-validator
kubeadm: don't use the Docker SDK in util/system/docker_validator*
2019-07-01 11:07:32 -07:00
Dan Williams
8739ade3fa kubelet: add CNI cache dir option and plumb through to CNI and kubenet
libcni 0.7.0 caches ADD operation results and allows the runtime to
retrieve these from the cache. In case the user wants a different
cache directory than the defaul, plumb that through like we do
for --cni-bin-dir and --cni-conf-dir.
2019-07-01 12:14:07 -05:00
Kubernetes Prow Robot
c52df2a637
Merge pull request #79218 from neolit123/kubeadm-1.16-owners
kubeadm: update OWNERS for 1.16
2019-07-01 07:23:47 -07:00
Lubomir I. Ivanov
668d69799a kubeadm: prevent PSP blocking of upgrade image prepull
If the cluster has a PSP that blocks Pods from running as root
the DS that handles upgrade prepull will fail to create its Pods.

Workaround that by adding a PodSecurityContext with RunAsUser=999.
2019-07-01 16:15:54 +03:00
Kubernetes Prow Robot
7db459a11b
Merge pull request #79498 from SataQiu/fix-kubeadm-20190628
kubeadm: fix bug for --cri-socket flag processing logic
2019-07-01 06:09:20 -07:00
Lubomir I. Ivanov
cb56f91cc6 kubeadm: don't use the Docker SDK in util/system/docker_validator*
Instead of creating a Docker client and fetching an Info object
from the docker enpoint, call the "docker info" command
and populate a local dockerInfo struct from JSON output.

Also
- add unit tests.
- update import boss and bazel.

This change affects "test/e2e_node/e2e_node_suite_test.go"
as it consumes this Docker validator by calling
"system.ValidateSpec()".
2019-07-01 15:18:37 +03:00
Kubernetes Prow Robot
dd8a000a77
Merge pull request #79493 from odinuge/kube-cmd-double-print
Remove duplicate error messages from cli commands
2019-06-28 13:57:41 -07:00
SataQiu
62c7f4317f kubeadm: fix bug for --cri-socket flag processing logic 2019-06-28 10:42:37 +08:00
Odin Ugedal
7caf51daa4
Remove duplicate error messages from cli commands
Since we never use the cobras "SilenceErrors" or "SilenceUsage",
a command executed with "cmd.Execute()" will never return an error
without printing it.

The current behavior results in all error messages being printed twice:

Example:

$ kubectl abc
Error: unknown command "abc" for "kubectl"
Run 'kubectl --help' for usage.
unknown command "abc" for "kubectl"

This applies to all cli commands using Cobra. To verify, follow the code
path of the Execute function:

https://github.com/spf13/cobra/blob/c439c4fa0937/command.go#L793
Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-06-27 21:55:14 +02:00
Lubomir I. Ivanov
f87223fbf8 kubeadm: update OWNERS for 1.16
- comment out Liz and Chuck until further notice.
Feel free to come back to kubeadm!!
- Add SataQiu as reviewer. Welcome.
- Add ereslibre as approver. Congrats!
2019-06-27 00:01:05 +03:00
Benjamin Elder
c33ab5c78f fix KubeletConfiguration apiVersion 2019-06-25 23:59:32 -07:00
Yassine TIJANI
d3620dfa29 move jws to k8s.io/cluster-bootstrap
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-25 13:48:13 +02:00
SataQiu
33b980272b kubeadm: add --control-plane-endpoint flag 2019-06-25 11:27:40 +08:00
Kubernetes Prow Robot
896c901684
Merge pull request #78929 from SataQiu/fix-kubeadm-20190612
[kubeadm] cleanup deps on pkg/version
2019-06-24 19:28:35 -07:00
Kubernetes Prow Robot
6f0f62b2c4
Merge pull request #77211 from dixudx/bootstrap_token_refactor
Bootstrap token refactor
2019-06-24 13:36:36 -07:00
Kubernetes Prow Robot
a5c727e26f
Merge pull request #79327 from SataQiu/cleanup-experimental-1.16
kubeadm: cleanup ExperimentalControlPlane and ExperimentalUploadCerts
2019-06-24 11:24:40 -07:00
Kubernetes Prow Robot
ddc4ed0365
Merge pull request #79335 from rosti/kubeadm-nuke-normalizer
kubeadm: Stop using //pkg/util/normalizer
2019-06-24 08:02:11 -07:00
Kubernetes Prow Robot
d1f342fb59
Merge pull request #79220 from rosti/fix-MarshalClusterConfigurationToBytes
kubeadm: Retire MarshalClusterConfigurationToBytes
2019-06-24 08:01:58 -07:00
Kubernetes Prow Robot
bc8ea43277
Merge pull request #78026 from Klaven/norm_kube_version
seperation of network call in KubernetesReleaseVersion
2019-06-24 06:27:57 -07:00
Rostislav M. Georgiev
94c56c81ba kubeadm: Retire MarshalClusterConfigurationToBytes
MarshalClusterConfigurationToBytes has capabilities to output the component
configs, as separate YAML documents, besides the kubeadm ClusterConfiguration
kind. This is no longer necessary for the following reasons:

- All current use cases of this function require only the ClusterConfiguration.
- It will output component configs only if they are not the default ones. This
  can produce undeterministic output and, thus, cause potential problems.
- There are only hacky ways to dump the ClusterConfiguration only (without the
  component configs).

Hence, we simplify things by replacing the function with direct calls to the
underlaying MarshalToYamlForCodecs. Thus marshalling only ClusterConfiguration,
when needed.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-06-24 15:17:19 +03:00
Rostislav M. Georgiev
615e425d26 kubeadm: Stop using //pkg/util/normalizer
Stop using //pkg/util/normalizer. Use local versions of LongDesc and Examples,
that do not require any external dependencies (other than the Go standard
library).

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-06-24 14:40:55 +03:00
SataQiu
c794929d1d kubeadm: cleanup ExperimentalControlPlane and ExperimentalUploadCerts 2019-06-24 11:52:57 +08:00
Brad Beam
b646ac4a0e fix: Use correct function to remove etcd member
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
2019-06-23 22:39:34 -05:00
Kubernetes Prow Robot
d9b5aa2ea9
Merge pull request #79267 from SataQiu/fix-kubeadm-20190621
kubeadm: cleanup command output
2019-06-23 09:27:53 -07:00
Cheikhrouhou ines
81800964d8 fix typo heathcheck 2019-06-22 11:37:34 +02:00
Kubernetes Prow Robot
eee3e976d8
Merge pull request #78294 from vllry/kp-remove-resource-container
Remove deprecated flag --resource-container from kube-proxy
2019-06-22 00:38:12 -07:00
Marek Counts
eb6eb11748 added comment 2019-06-21 09:42:34 -04:00
Marek Counts
b66c4e8d45 updates based off reviews 2019-06-21 09:42:34 -04:00
Marek Counts
bf376e863c update to remove unused test
commit will be squashed before merge
2019-06-21 09:42:33 -04:00
Marek Counts
c8045049f3 updated tests to prevent false positive
one test also proved it did not call the internet
but this was not fool proof as it did not return a string
and thus could be called with something expecting to fail.
2019-06-21 09:42:33 -04:00
Marek Counts
aad2b573c6 seperation of network calls when getting version
updated the network calls to be package local so tests could pass their
own implementation. A public interface was not provided as it would not
be likely this would ever be needed or wanted.
2019-06-21 09:42:33 -04:00
SataQiu
3b4dbe6e30 kubeadm: cleanup command output 2019-06-21 16:31:55 +08:00
Di Xu
5056161d4d auto-generated 2019-06-20 17:06:26 +08:00
Di Xu
af9ae4c11a refactor bootstrap token utils 2019-06-20 15:43:44 +08:00
Lubomir I. Ivanov
14408bec87 kubeadm: improve the kubeconfig file validation phase
When a kubeconfig file is read from disk it may lack the
propper mapping between contexts and clusters.

In such a case the kubeconfig phase backend will panic,
without throwing a sensible error.

Add nil checks for a couple of map operations in
validateKubeConfig().
2019-06-19 15:12:22 +03:00
SataQiu
10ddd7caf0 kubeadm: cleanup deps on pkg/version 2019-06-18 11:01:30 +08:00
Kubernetes Prow Robot
56066c820d
Merge pull request #79099 from SataQiu/fix-kubeadm-20190617
kubeadm: cleanup deps on pkg/master/ports
2019-06-17 09:42:28 -07:00
Kubernetes Prow Robot
d3bbe03b08
Merge pull request #79032 from yastij/move-initsystem
move initsystem to kubeadm
2019-06-17 09:42:15 -07:00
SataQiu
7e2e144f1b kubeadm: cleanup deps on pkg/master/ports 2019-06-17 21:27:02 +08:00
Kubernetes Prow Robot
1b6189ea68
Merge pull request #78695 from dims/sort-list-of-component-config-API-objects-in-cli
Sort kubeadm CLI default params for component config API objects
2019-06-17 05:54:23 -07:00
Yassine TIJANI
c3904bbce6 move initsystem to kubeadm
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-17 12:21:01 +02:00
Vallery Lancey
dc0f14312e Removed deprecated --resource-container flag from kube-proxy. 2019-06-16 08:36:42 -07:00
Kubernetes Prow Robot
a444f0fa1d
Merge pull request #79019 from rosti/kubeadm-nuke-ValidateDNS1123Subdomain
kubeadm: Replace ValidateDNS1123Subdomain with IsDNS1123Subdomain
2019-06-15 19:14:08 -07:00
Kubernetes Prow Robot
b2990bf796
Merge pull request #79025 from rosti/kubeadm-nuke-apiResource
kubeadm: Don't use "//pkg/apis/core".Resource helper
2019-06-15 12:56:34 -07:00
Kubernetes Prow Robot
30b1fbc809
Merge pull request #79021 from rosti/kubeadm-nuke-rbachelpers
kubeadm: Don't use RBAC helpers
2019-06-15 12:56:08 -07:00
Kubernetes Prow Robot
5e5394ae0d
Merge pull request #78803 from aerostitch/kubeadm_minor_typo
kubeadm: fix minor typo in a comment
2019-06-14 19:24:09 -07:00
Kubernetes Prow Robot
54f7e5269c
Merge pull request #78625 from Nordix/issue-1591-kubeadm-service-cidr
Fix kubeadm service-cidr mapping to service-cluster-ip-rage for kube-controller-manager.
2019-06-14 11:52:35 -07:00
Kubernetes Prow Robot
10fb09da4d
Merge pull request #78615 from mysunshine92/fix-kubeadm
kubeadm:fix typo in controlplane.go
2019-06-14 07:58:51 -07:00
Rostislav M. Georgiev
7ba7bdaa22 kubeadm: Don't use "//pkg/apis/core".Resource helper
This helper is used in tests and pulls in unnecessary dependency, which should
not be used if kubeadm is to move to staging.
Replace with direct use of the GroupResource type.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-06-14 16:14:43 +03:00
Kubernetes Prow Robot
8f57a7bb49
Merge pull request #78575 from SataQiu/fix-kubeadm-20190531
kubeadm: improve kubelet-config-x.y ConfigMap logic
2019-06-14 05:33:04 -07:00
Kubernetes Prow Robot
fadb63c7eb
Merge pull request #78556 from neolit123/kubeadm-certs-order
kubeadm: apply deterministic order to certificate phases
2019-06-14 05:32:24 -07:00
Rostislav M. Georgiev
4ac6d7f501 kubeadm: Replace ValidateDNS1123Subdomain
ValidateDNS1123Subdomain is a simple wrapper around IsDNS1123Subdomain, however
it's the only reason for us to pull k8s.io/kubernetes/pkg/apis/core/validation
as a dependency.
To avoid unnecessary dependencies, replace the use of ValidateDNS1123Subdomain
with IsDNS1123Subdomain.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-06-14 14:40:14 +03:00
Rostislav M. Georgiev
c394d0fd80 kubeadm: Don't use RBAC helpers
RBAC construction helpers are part of the Kubernetes internal APIs. As such,
we cannot use them once we move to staging.
Hence, replace their use with manual RBAC rule construction.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-06-14 14:08:31 +03:00
Kubernetes Prow Robot
c6bc1639c3
Merge pull request #72178 from dims/remove-ovirt-photon-cloudstack-cloud-providers
Remove ovirt/cloudstack/photon cloud providers
2019-06-13 19:12:19 -07:00
Kubernetes Prow Robot
4f29960cb2
Merge pull request #78915 from ereslibre/retry-configmap-get-on-unauthorized
kubeadm: Add ability to retry ConfigMap get if certain errors happen
2019-06-12 13:00:19 -07:00
Rafael Fernández López
26c9965a97
kubeadm: Add ability to retry ConfigMap get if certain errors happen
During the control plane joins, sometimes the control plane returns an
expected error when trying to download the `kubeadm-config` ConfigMap.
This is a workaround for this issue until the root cause is completely
identified and fixed.

Ideally, this commit should be reverted in the near future.
2019-06-12 17:49:27 +02:00
Sandeep Rajan
77466d4a65 [kubeadm] Add the upstream option in CoreDNS configmap 2019-06-11 21:19:43 -04:00
Haosdent Huang
7ce6e71891 Fix typos. 2019-06-11 01:52:14 +08:00
Davanum Srinivas
e0821ca3dd
Remove ovirt/cloudstack/photon cloud providers
Change-Id: Iddb80bdc2a9d75d444b8a3cfe0b142acb78e9097
2019-06-10 12:50:53 -04:00
Joseph Herlant
5ca6eaaba3
kubeadm: fix minor typo in a comment 2019-06-07 15:56:33 -07:00
Arvinderpal Wander
7634cc01c5 Fix kubeadm service-cidr mapping to service-cluster-ip-rage for
kube-controller-manager.

If a service CIDR that overlaps with the cluster CIDR is
specified to kube-controller-manager then kube-controller-
manager will incorrectly allocate node CIDRs that overlap
with the service CIDR. The fix ensure that kubeadm
maps the --service-cidr to --service-cluster-ip-range for use
by kube-controller-manager.

As per docs, --allocate-node-cidrs must be true for
--service-cluster-ip-range to be considered. It does not make
sense for --cluster-cidr to be unspecified but for
--service-cluster-ip-range and --allocate-node-cidrs to be
set, since the purpose of these options is to have the
controller-manager do the per node CIDR allocation. Also
note that --service-cluster-ip-range is passed to the
api-server, so the presence of *just*
--service-cluster-ip-range should not imply that
--allocate-node-cidrs should be true.

Resolves: kubernetes/kubeadm/issues/1591
2019-06-05 06:53:32 -07:00
Davanum Srinivas
401a30c73a
Sort kubeadm CLI default params for component config API objects
Change-Id: If4ba57d528f925de9d536b18c0e6d71fc6d63659
2019-06-04 09:55:45 -04:00
fabriziopandini
dbb82ba99a fix-kubeadm-upgrade-node 2019-06-04 14:57:30 +02:00
Kubernetes Prow Robot
16aeec2485
Merge pull request #78545 from neolit123/kubeadm-revert-coredns-1.3.1
kubeadm: revert CoreDNS to 1.3.1
2019-06-03 14:51:29 -07:00
Kubernetes Prow Robot
71fe27eff5
Merge pull request #78586 from rosti/fix-deprecation-msg
kubeadm: Fix deprecation message for a flag
2019-06-02 05:12:12 -07:00
Kubernetes Prow Robot
79dc1d4c49
Merge pull request #78585 from neolit123/kubeadm-fix-upgrade-node
kubeadm: fix conditional control-plane upgrade
2019-06-02 03:02:14 -07:00
Kubernetes Prow Robot
cc30c0d9a4
Merge pull request #78399 from rikatz/remove-deprecated-conntrack-max
Remove deprecated flag --conntrack-max from kube-proxy
2019-06-01 17:26:14 -07:00
Kubernetes Prow Robot
9c807d483e
Merge pull request #78611 from odinuge/kubeadm-err-check
Fix error handling for loading initCfg in kubeadm
2019-06-01 15:38:14 -07:00
Ricardo Pchevuzinske Katz
82c42bb6ee Remove deprecated flag --conntrack-max from kube-proxy 2019-06-01 18:10:28 -03:00
Kubernetes Prow Robot
c81ae93159
Merge pull request #78542 from neolit123/kubeadm-mixed-cert-key
kubeadm: disallow the mixture of --config and --certificate-key
2019-06-01 09:51:07 -07:00
yameiwang
5cad3f969c kubeadm:fix typo in controlplane.go 2019-06-01 20:26:08 +08:00
Kubernetes Prow Robot
5d1409a4bf
Merge pull request #78189 from ksubrmnn/initsystem
Use Service Control Manager as the Windows Initsystem
2019-05-31 22:02:34 -07:00
Odin Ugedal
2fc9b3a670
Fix error handling for loading initCfg in kubeadm
This fixes possible problems when kubeadm upgrade can't load the
InitConfig properly. Some new code introduced in
https://github.com/kubernetes/kubernetes/pull/75499 is placed between
the loading of the config and the error handling, hiding possible
errors.

This error cannot be ignored (as is the case now), since the cfg ptr.
returned from the configutil function will be nil in the case of an
error.

Signed-off-by: Odin Ugedal <odin@ugedal.com>
2019-06-01 02:08:46 +02:00
Rostislav M. Georgiev
a402610d37 kubeadm: Fix deprecation message for a flag
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-05-31 17:07:21 +03:00
Lubomir I. Ivanov
aede153310 kubeadm: fix conditional control-plane upgrade
When a node is not a control-plane properly skip "control-plane"
upgrade phase.
2019-05-31 16:25:46 +03:00
SataQiu
d79a5181f8 kubeadm: improve kubelet-config-x.y ConfigMap logic 2019-05-31 18:26:39 +08:00
Lubomir I. Ivanov
2413713c4e kubeadm: apply deterministic order on certificate phases
The existing logic already creates a proper "tree"
where a CA is always generated before the certs that are signed
by this CA, however the tree is not deterministic.

Always use the default list of certs when generating the
"kubeadm init phase certs" phases. Add a unit test that
makes sure that CA always precede signed certs in the default
lists.

This solves the problem where the help screen for "kubeadm
init" cert sub-phases can have a random order.
2019-05-31 04:04:13 +03:00
Lubomir I. Ivanov
a49bc480b9 kubeadm: revert CoreDNS to 1.3.1 2019-05-30 23:31:54 +03:00
Lubomir I. Ivanov
d6f1dff1ce kubeadm: disallow the mixture of --config and --certificate-key
Similar to --token, do not allow the mixture of --config and
--certificate-key.

If the user has fed a config, it is expected that the certificate
key should also be provided in the config and not from
the command line.
2019-05-30 22:35:41 +03:00
Kubernetes Prow Robot
44a3bf4755
Merge pull request #78452 from fabriziopandini/rename-ha-flags
kubeadm: rename-ha-flags
2019-05-30 02:25:13 -07:00
Kubernetes Prow Robot
de81752082
Merge pull request #78408 from fabriziopandini/upgrade-node-ha
kubeadm: upgrade node for HA
2019-05-30 00:32:58 -07:00
Kubernetes Prow Robot
4eab931f15
Merge pull request #78403 from rosti/v1beta2-doc-updates
kubeadm: Update v1beta2 doc.go
2019-05-30 00:32:20 -07:00
ksubrmnn
4d7ee1cd5a Use system calls to manage Windows services 2019-05-29 17:33:47 -07:00
fabriziopandini
67d76c46c7 autogenerated 2019-05-29 22:06:52 +02:00
fabriziopandini
c2faa3bfd1 kubeadm upgrade node 2019-05-29 22:06:42 +02:00
Kubernetes Prow Robot
6a0db7b189
Merge pull request #77739 from rosti/initclustersplit-v1beta2
kubeadm: Remove ClusterConfiguration from InitConfiguration in v1beta2
2019-05-29 07:58:28 -07:00
Kubernetes Prow Robot
ddb0b017f8
Merge pull request #78081 from yagonobre/reset-preflight
Graduate kubeadm reset phases
2019-05-29 03:10:24 -07:00
Rostislav M. Georgiev
5671ea9cf1 kubeadm: Remove ClusterConfiguration from InitConfiguration in v1beta2
Ever since v1alpha3, InitConfiguration is containing ClusterConfiguration
embedded in it. This was done to mimic the internal InitConfiguration, which in
turn is used throughout the kubeadm code base as if it is the old
MasterConfiguration of v1alpha2.

This, however, is confusing to users who vendor in kubeadm as the embedded
ClusterConfiguration inside InitConfiguration is not marshalled to YAML.
For this to happen, special care must be taken for the ClusterConfiguration
field to marshalled separately.

Thus, to make things smooth for users and to reduce third party exposure to
technical debt, this change removes ClusterConfiguration embedding from
InitConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-05-29 12:13:37 +03:00
Kubernetes Prow Robot
6118b8aa73
Merge pull request #77848 from yagonobre/certificate-key-command
Add kubeadm alpha certs certificate-key command
2019-05-28 22:20:48 -07:00
Yago Nobre
960083130b
kubeadm: graduate reset phases 2019-05-28 23:32:04 -03:00
fabriziopandini
f3b5cb2145 rename-ha-flags 2019-05-28 22:16:03 +02:00
Kubernetes Prow Robot
2f7eaa1ee3
Merge pull request #78053 from ksubrmnn/crisocket
Implement CRI detection for Windows
2019-05-28 07:17:58 -07:00
Rostislav M. Georgiev
de1bd55e96 kubeadm: Update v1beta2 doc.go
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-05-27 18:02:17 +03:00
Yago Nobre
0a005e3dac
Add kubeadm certificate-key command 2019-05-27 11:29:31 -03:00
yameiwang
7e1badd7fd fix typo worklow->workflow 2019-05-25 07:05:37 +08:00
ksubrmnn
310bafe658 Implement CRI detection for Windows 2019-05-23 09:54:53 -07:00
Marc Carré
7e2b4aa562
kubeadm errors now ignorable via v1beta2 config files (generated diff)
This commit contains only changes generated by the build process.
Nothing here was manually changed.

Changes made to:
```
cmd/kubeadm/app/apis/kubeadm/validation/BUILD
cmd/kubeadm/app/cmd/BUILD
```
were generated by running:
````
./hack/update-bazel.sh
```
2019-05-23 16:22:18 +09:00
Marc Carré
e706d27262
kubeadm errors now ignorable via v1beta2 config files
Specifically, IgnorePreflightErrors in {Init,Join}Configuration's NodeRegistrationOptions can be used to achieve this.
See also: https://docs.google.com/document/d/1XnP67oO1i9VcDIpw42IzptnJsc5OQM-HTf8cVcjCR2w/edit
2019-05-23 16:22:17 +09:00
Kubernetes Prow Robot
81a61ae0e3
Merge pull request #77863 from fabriziopandini/certs-expiration
Kubeadm: Add check certificate expiration command
2019-05-19 12:47:10 -07:00
Kubernetes Prow Robot
c854f72dcb
Merge pull request #77507 from cuericlee/patch-1
unexpected deleting of contents of mount points due to symbolic link …
2019-05-19 09:23:10 -07:00
fabriziopandini
e4d87b0804 autogenerated 2019-05-18 16:28:44 +02:00
fabriziopandini
919826531c certs-expiration 2019-05-18 16:28:33 +02:00
Kubernetes Prow Robot
648cb98a44
Merge pull request #78030 from rajansandeep/bump1.5.0
Bump CoreDNS version to 1.5.0 and update manifest
2019-05-17 21:52:52 -07:00
Kubernetes Prow Robot
e4cfb55b71
Merge pull request #77989 from ksubrmnn/kubeadm
Use os package for Windows IsPrivilegedUserCheck
2019-05-17 10:12:34 -07:00
Sandeep Rajan
0b28419412 bump coredns version to 1.5.0 and update manifest 2019-05-17 10:03:02 -04:00
Kubernetes Prow Robot
628e0d8333
Merge pull request #77946 from Klaven/deprecate_from
Deprecation of the kubeadm config upload command
2019-05-17 00:26:44 -07:00
Kubernetes Prow Robot
a6b546eb72
Merge pull request #77936 from liggitt/shorten-cert-wait
Interrupt WaitForCertificate if desired kubelet serving cert changes
2019-05-17 00:26:19 -07:00
Kubernetes Prow Robot
afd928b8bc
Merge pull request #77931 from fabriziopandini/etcd-supportedversion-1.16
Kubeadm: Add etcd supported version for v1.16
2019-05-16 20:40:16 -07:00
ksubrmnn
aa8efc5b94 Check User SIDs via os package 2019-05-16 12:24:26 -07:00
Jordan Liggitt
739a75fc32 Interrupt WaitForCertificate if desired kubelet serving cert changes 2019-05-16 15:14:47 -04:00
Kubernetes Prow Robot
d823fa23c6
Merge pull request #77847 from yagonobre/reset-phase
Add phase runner to kubeadm reset
2019-05-16 06:05:56 -07:00
Kubernetes Prow Robot
e1770e698e
Merge pull request #77780 from fabriziopandini/refactor-renewal-package
Kubeadm: Refactor renewal package
2019-05-16 02:55:46 -07:00
Marek Counts
c55eaa9b5a Deprecation of the kubeamd config upload command
This also deprecated all the sub commands.
2019-05-15 14:03:40 -04:00
fabriziopandini
545e494c5c Add etcd supported version for v1.16 2019-05-15 16:29:47 +02:00
fabriziopandini
1c897874bf autogenerated 2019-05-15 10:26:00 +02:00
fabriziopandini
6db533dd5b refactor certs renewal 2019-05-15 10:25:50 +02:00
SataQiu
4fcfb97179 improve validation message for join command 2019-05-15 12:46:45 +08:00
Eric
56ce743f7b kubeadm: fix a bug related to volume unmount if the kubelet run directory is a symbolic link
unexpected deleting of contents of mount points due to symbolic link of KubeletRunDirectory
2019-05-14 20:33:34 +08:00
Yago Nobre
97e22fb9b1
Update bazel 2019-05-14 03:06:50 -03:00
Yago Nobre
d92b0e2147
Add phase runner to kubeadm reset 2019-05-14 01:21:36 -03:00
stgleb
79b46f47f6 Fix typo in IPVS acronym 2019-05-13 20:33:37 +03:00
Kubernetes Prow Robot
f5a1ceb1fc
Merge pull request #77768 from yagonobre/upload-certs
Improve error message when user provide invalid certificate key
2019-05-12 19:24:08 -07:00
Kubernetes Prow Robot
ce6d65fbb9
Merge pull request #77400 from Klaven/arg_validation
updated phase runner to enable custom arg validation
2019-05-12 16:48:08 -07:00
Yago Nobre
54a308bdd7
Improve error message when user provide invalid certificate key 2019-05-12 18:26:11 -03:00
Kubernetes Prow Robot
b03367bd88
Merge pull request #77188 from SataQiu/fix-kubeadm-20190428
Make KubernetesDir a true constant
2019-05-11 08:02:12 -07:00
Marek Counts
2b69699f67 updated phase runner to enable custom arg validation
currently sub phases cannot have custom arg validation and container commands can have args.
This removes phase container commands from taking args and enables custom args on the leaf phases
2019-05-10 09:19:47 -04:00
SataQiu
e28c7b1b59 skip cri detection for kubeadm token create 2019-05-09 23:44:17 +08:00
SataQiu
d46bd0dc7a make KubernetesDir a true constant 2019-05-09 17:16:59 +08:00
Kubernetes Prow Robot
eda5a296a8
Merge pull request #77513 from ereslibre/upload-cluster-configuration-after-upgrade
kubeadm: upload the `ClusterConfiguration` during the upgrade
2019-05-08 17:15:13 -07:00
Kubernetes Prow Robot
09c4e10333
Merge pull request #74021 from andrewsykim/move-features-component-base
Move feature gate package from k8s.io/apiserver to k8s.io/component-base
2019-05-08 13:06:34 -07:00
Daniel (Shijun) Qian
5268f69405 fix duplicated imports of k8s code (#77484)
* fix duplicated imports of api/core/v1

* fix duplicated imports of client-go/kubernetes

* fix duplicated imports of rest code

* change import name to more reasonable
2019-05-08 10:12:47 -07:00
Andrew Kim
c919139245 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate 2019-05-08 10:01:50 -04:00
Kubernetes Prow Robot
f9c9ecdbb6
Merge pull request #77180 from fabriziopandini/renew-embedded-certs
kubeadm: renew certificates embedded in kubeconfig files
2019-05-06 15:30:06 -07:00
Rafael Fernández López
b6f4bb349b
kubeadm: upload the ClusterConfiguration during the upgrade
During the upgrade process, `kubeadm` will take the current
`ClusterConfiguration`, update the `KubernetesVersion` to the latest
version, and call to `UploadConfiguration`.

This change makes sure that when the mutation happens, not only the
`ClusterStatus` is mutated, but the `ClusterConfiguration` object
inside the `kubeadm-config` ConfigMap as well; it will contain the
new `KubernetesVersion`.
2019-05-06 18:21:55 +02:00
fabriziopandini
3076644f0b autogenerated 2019-05-06 16:48:35 +02:00
fabriziopandini
cf7f8acae2 renew-embedded-certs 2019-05-06 16:48:24 +02:00
Kubernetes Prow Robot
0a83ed51b4
Merge pull request #77345 from rosti/omitempty-v1beta2
kubeadm: Fix omitempty in v1beta2
2019-05-04 12:13:37 -07:00
Kubernetes Prow Robot
f29138c372
Merge pull request #77012 from rosti/certkey-v1beta2
kubeadm: Add certificateKey field to v1beta2 config
2019-05-03 15:11:39 -07:00
Kubernetes Prow Robot
7defecbc2c
Merge pull request #76327 from neolit123/kubeproxy-node-selector
kubeadm: disable the kube-proxy DaemonSet on non-Linux nodes
2019-05-03 04:08:18 -07:00
Rostislav M. Georgiev
81e3adc53b kubeadm: Fix omitempty in v1beta2
There are a couple of problems with regards to the `omitempty` in v1beta1:

- It is not applied to certain fields. This makes emitting YAML configuration
  files in v1beta1 config format verbose by both kubeadm and third party Go
  lang tools. Certain fields, that were never given an explicit value would
  show up in the marshalled YAML document. This can cause confusion and even
  misconfiguration.

- It can be used in inappropriate places. In this case it's used for fields,
  that need to be always serialized. The only one such field at the moment is
  `NodeRegistrationOptions.Taints`. If the `Taints` field is nil, then it's
  defaulted to a slice containing a single control plane node taint. If it's
  an empty slice, no taints are applied, thus, the cluster behaves differently.
  With that in mind, a Go program, that uses v1beta1 with `omitempty` on the
  `Taints` field has no way to specify an explicit empty slice of taints, as
  this would get lost after marshalling to YAML.

To fix these issues the following is done in this change:

- A whole bunch of additional omitemptys are placed at many fields in v1beta2.
- `omitempty` is removed from `NodeRegistrationOptions.Taints`
- A test, that verifies the ability to specify empty slice value for `Taints`
  is included.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-05-03 12:59:41 +03:00
Rostislav M. Georgiev
1826e445fe kubeadm: Add certificateKey field to v1beta2 config
This change introduces config fields to the v1beta2 format, that allow
certificate key to be specified in the config file. This certificate key is a
hex encoded AES key, that is used to encrypt certificates and keys, needed for
secondary control plane nodes to join. The same key is used for the decryption
during control plane join.
It is important to note, that this key is never uploaded to the cluster. It can
only be specified on either command line or the config file.
The new fields can be used like so:

---
apiVersion: kubeadm.k8s.io/v1beta2
kind: InitConfiguration
certificateKey: "yourSecretHere"
---
apiVersion: kubeadm.k8s.io/v1beta2
kind: JoinConfiguration
controlPlane:
  certificateKey: "yourSecretHere"
---

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-05-02 11:47:07 +03:00
Dmitry Rozhkov
a6d7920f44 kubeadm: do unit testing of actual public function
Even though CreateServiceAccountKeyAndPublicKeyFiles() function is
an interface function it's not unittested. Instead it wraps a couple
of internal functions which are used only inside CreateServiceAccountKeyAndPublicKeyFiles()
and those internal functions are tested.

Rewrite the function to do only what it's intended to do and add unit
tests for it.
2019-05-02 10:23:51 +03:00
Àbéjídé Àyodélé
a2b0cb62a1 Clean up kubeadm.
These are based on recommendation from
[staticcheck](http://staticcheck.io/).

- Remove unused struct fields
- Remove unused function
- Remove unused variables
- Remove unused constants.
- Miscellaneous cleanups
2019-05-01 22:16:06 +00:00
Kubernetes Prow Robot
a6558c6f10
Merge pull request #77257 from stgleb/remove_todo
Remove todo and change comment
2019-04-30 05:47:37 -07:00
stgleb
758d89c256 Remove todo and change comment 2019-04-30 13:34:25 +03:00
Kubernetes Prow Robot
b5d9aa58e3
Merge pull request #77218 from neolit123/chroot-fix-flakes
kubeadm: remove flaky unit tests for chroot
2019-04-29 14:36:26 -07:00
Kubernetes Prow Robot
ad645fbb13
Merge pull request #77191 from stgleb/fix_log
Change misleading log message
2019-04-29 14:36:13 -07:00
Kubernetes Prow Robot
35b278447c
Merge pull request #76920 from sempr/master
MOD: support wildcard DNS for apiserver certSANs
2019-04-29 14:36:01 -07:00
Lubomir I. Ivanov
96e907348a kubeadm: remove flaky unit tests for chroot
This unit test contains some hacks are causing the bazel-test
e2e job to flake very often. Instead of maintaining this
unit test remove it completely. It has little benefits
WRT testing app/util/chroot*.go.
2019-04-29 20:49:09 +03:00
Dmitry Rozhkov
358659ef4d kubeadm: remove duplicated token.parsePEMCerts()
The function parsePEMCerts() duplicates ParseCertsPEM() from
the "k8s.io/client-go/util/cert" package.
2019-04-29 14:32:38 +03:00
stgleb
7bf9acd303 Change misleading log message
Secret instead of configmap for
upload certs phase
2019-04-29 03:06:11 +03:00
Kubernetes Prow Robot
c88b7cdd58
Merge pull request #76862 from fabriziopandini/fix-upgrade-certs-renew
kubeadm: fix certs renewal during upgrade
2019-04-27 12:30:20 -07:00
Chen Zhiwei
79c436f48f use new method to detect cgroup driver 2019-04-27 08:39:18 +00:00
fabriziopandini
137137cbaa fix-upgrade-certs-renew 2019-04-27 09:58:17 +02:00
Kubernetes Prow Robot
3148eb750d
Merge pull request #76390 from rojkov/ecdsa-v2
kubeadm: add support for ECDSA keys
2019-04-26 19:56:23 -07:00
Kubernetes Prow Robot
332d62a94a
Merge pull request #76710 from rosti/introduce-v1beta2
kubeadm: Introduce v1beta2 config
2019-04-26 10:38:27 -07:00
Kubernetes Prow Robot
59a86822cb
Merge pull request #77051 from chenzhiwei/bump-docker-version
Bump minimum docker version to 1.13.1 in kubeadm
2019-04-26 07:10:29 -07:00
Sempr
81e896e16f MOD: minor comment update for error message 2019-04-26 09:13:11 +08:00
Rostislav M. Georgiev
9e1ac76c1a kubeadm: Introduce v1beta2 config
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-04-25 17:10:04 +03:00
Chen Zhiwei
d4aaacfc18 Bump minimum docker version to 1.13.1 in kubeadm 2019-04-25 13:57:50 +00:00
fabriziopandini
d41c77f4d4 add-v1.15-etcd-version 2019-04-25 15:19:21 +02:00
Kubernetes Prow Robot
85015461b7
Merge pull request #76578 from SataQiu/fix-kubeadm-issue-1493
[kubeadm] fix kubelet config bug for kubeadm init phase
2019-04-25 04:34:46 -07:00
Dmitry Rozhkov
d125f3bddc kubeadm: add support for ECDSA keys
kubeadm still generates RSA keys when deploying a node, but also
accepts ECDSA keys if they already exist pregenerated in the
directory specified in --cert-dir.
2019-04-25 12:52:42 +03:00
SataQiu
5b74f3d8ad fix kubelet config bug for kubeadm init phase 2019-04-24 22:05:10 +08:00
Kubernetes Prow Robot
3ba70b9b5e
Merge pull request #76923 from SataQiu/fix-kubeadm-20190423
Fix validation message: apiServerEndpoints -> apiServerEndpoint
2019-04-24 04:04:00 -07:00
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
Kubernetes Prow Robot
098075c458
Merge pull request #74797 from fabriziopandini/fix-go-vet-1.12
kubeadm fix for go vet 1.12
2019-03-01 12:49:18 -08:00
fabriziopandini
d0d843c588 fix-go-vet-1.12 2019-03-01 15:13:17 +01:00
peibingit
d41ad755c1
Update types.go 2019-03-01 12:03:12 +08:00
Kubernetes Prow Robot
9fd7a4c2dc
Merge pull request #74751 from fabriziopandini/cleanup-join-phases-flags
cleanup-join-phases-flags
2019-02-28 17:52:30 -08:00
Jordan Liggitt
cd1c9f9018 Revert kubelet to default to ttl cache secret/configmap behavior 2019-02-28 17:54:22 -05:00
fabriziopandini
4c27d6a213 cleanup-join-phases 2019-02-28 23:37:25 +01:00
fabriziopandini
d102dac411 cleanup-join-phases-flags 2019-02-28 22:25:35 +01:00
Dmitry Rozhkov
bb8f4ac84f kubeadm: use Infoln instead of Infof where appropriate 2019-02-28 16:12:34 +02:00
Kubernetes Prow Robot
83fc13e640
Merge pull request #74511 from rojkov/kubeadm-refactor-enforceRequirements
kubeadm: move duplicated code into enforceRequirements()
2019-02-28 03:06:57 -08:00
Kubernetes Prow Robot
7053e43b2e
Merge pull request #74628 from hpandeycodeit/alpha_kubeconf
Removed alpha kubeconfig command
2019-02-27 14:40:16 -08:00
Himanshu Pandey
94b5945d53 Removed alpha kubeconfig command 2019-02-27 10:08:42 -08:00
Kubernetes Prow Robot
86c274043a
Merge pull request #74630 from xichengliudui/fixleftoverproblem
Fix the legacy of #74479
2019-02-26 19:40:36 -08:00
Kubernetes Prow Robot
c6b2a87cdb
Merge pull request #74168 from ereslibre/join-download-certs
kubeadm: Join download certs
2019-02-26 16:50:24 -08:00
Kubernetes Prow Robot
e64336e94b
Merge pull request #74590 from vanduc95/cleanup-kubeadm-cont.6-20190226
kubeadm cleanup: master -> control-plane (cont.6)
2019-02-26 15:30:03 -08:00
Rafael Fernández López
d30b14d586
kubeadm: Implement certificate download for join
This implements the certificate download for the join process. If certificates
have been uploaded during init (or explicitly on any master node) and the secret
is still present in the cluster, the join process will try to download the secret
data, decrypting it with the provided key in the new `--certificate-key` flag.
2019-02-26 22:00:11 +01:00
Kubernetes Prow Robot
d476f20d79
Merge pull request #74479 from ping035627/k8s-190223
Add port constants
2019-02-26 12:44:47 -08:00
Kubernetes Prow Robot
be8a9b9637
Merge pull request #74422 from liggitt/client-version-methods
Remove deprecated versionless client interface methods
2019-02-26 12:44:24 -08:00
Kubernetes Prow Robot
c487757e88
Merge pull request #74410 from pytimer/kubeadm-fix
kubeadm: reduce the number of fetch configuration when reset
2019-02-26 12:44:14 -08:00
Kubernetes Prow Robot
6de09f69cb
Merge pull request #74584 from cqy0532/fixtypo
fix typo kubeadm joiń -> kubeadm join
2019-02-26 06:38:34 -08:00
Jordan Liggitt
d1e865ee34 Update client callers to use explicit versions 2019-02-26 08:36:30 -05:00
vanduc95
3759fcd4c8 kubeadm cleanup: master -> control-plane (cont.6) 2019-02-26 18:42:27 +07:00
pytimer
3306efd619 kubeadm: reduce the number of fetch configuration when reset 2019-02-26 19:40:42 +08:00
Kubernetes Prow Robot
465f7ebf43
Merge pull request #74557 from vanduc95/cleanup-kubeadm-cont.5-20190225
kubeadm cleanup: master -> control-plane (cont.5)
2019-02-26 03:10:20 -08:00
cqy0532
0a0fea60a0 fix typo kubeadm joiń -> kubeadm join 2019-02-26 17:26:41 +08:00
Kubernetes Prow Robot
4e8e3c2f02
Merge pull request #74559 from zhouxiaoninga/fixtypes
Fix typo joiń -> join
2019-02-25 23:12:11 -08:00
Kubernetes Prow Robot
8326ea71a3
Merge pull request #74403 from ping035627/k8s-190222
Code cleanup and refactoring
2019-02-25 20:28:09 -08:00
vanduc95
0296cfb2b8 kubeadm cleanup: master -> control-plane (cont.5) 2019-02-26 09:04:54 +07:00
PingWang
1a439cc646 Add port constants
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

use pkg/master/ports constants

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

update-bazel

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-02-26 09:18:15 +08:00
zhouxiaoning
802c751053 纠正join 2019-02-26 09:10:00 +08:00
Lubomir I. Ivanov
de5e17e6c3 kubeadm/phases: use common interfaces for init and join phases
The custom sub-set interfaces in init/join phases as a pattern
have isolation benefits - e.g. when a consumer imports these
but we don't want them to be able to call all methods from
the original object that satisfies a complete interface.

On the other hand these sub-set interfaces under phases/init
and phases/join are private.

Expose a couple of new common interfaces:
- InitData from phases/init/data.go
- JoinData from phases/join/data.go

Use these interfaces in init/join phases accordingly instead
of the sub-set interfaces.

Use compile-time type assertion to verify that these
interfaces can be satisfied by init.go's initData and
join.go's joinData.

Add NO-OP objects called testInitData and joinInitData
that can be used for unit testing if embedded.
2019-02-26 02:23:50 +02:00
Kubernetes Prow Robot
4b8ecd68f3
Merge pull request #74509 from ping035627/k8s-190225-1
Fix typos
2019-02-25 15:15:51 -08:00
Kubernetes Prow Robot
b22da83307
Merge pull request #74473 from vanduc95/cleanup-kubeadm-cont.4-20190223
kubeadm cleanup: master -> control-plane (cont.4)
2019-02-25 15:15:30 -08:00
Dmitry Rozhkov
226843fe28 kubeadm: move duplicated code into enforceRequirements()
and to a new function getK8sVersionFromUserInput().

Also drop applyPlanFlags.ignorePreflightErrorsSet field which is not
a command line option.
2019-02-25 16:26:20 +02:00
PingWang
88d6e89279 Fix typos
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-02-25 17:12:44 +08:00
RA489
a0ee4b471d Refactor etcd client function have same signatures in etcd.go 2019-02-25 12:54:12 +05:30
ducnv
e11916da8e kubeadm cleanup: master -> control-plane (cont.4) 2019-02-25 08:29:19 +07:00
Kubernetes Prow Robot
5312ade3d1
Merge pull request #74457 from neolit123/fix-kubeproxy-winkernel
kubeadm: fix issue with missing kubeproxy fields in test data
2019-02-23 14:05:15 -08:00
Lubomir I. Ivanov
b2cc473388 kubeadm: fix issue with missing kubeproxy fields in test data 2019-02-23 19:13:16 +02:00
Ed Bartosh
f8d235be9e kubeadm: fix url validation code
Fixed nil pointer dereference in url validation code that
caused kubeamd panic:

  panic: runtime error: invalid memory address or nil pointer dereference
  [signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xa7930c]

  goroutine 1 [running]:
  kubeadm/validation.ValidateURLs(0x40000bafe0, 0x2, 0x2, 0x1, 0x40002967b0, 0x0, 0x40002967b0, 0xf302a0)
    kubeadm/validation/validation.go:324 +0xcc
  kubeadm/validation.ValidateEtcd(0x400000b490, 0x4000296720, 0x0, 0x0, 0x0)
    kubeadm/validation/validation.go:291 +0x1f0
      ...

Fixes: kubernetes/kubeadm#1419

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2019-02-23 16:48:22 +01:00
Kubernetes Prow Robot
8993fbc543
Merge pull request #74328 from daixiang0/delete-blank
delete all duplicate empty blanks
2019-02-23 01:43:58 -08:00
Kubernetes Prow Robot
b5566c7818
Merge pull request #71896 from awly/client-go-keyutil
client-go: extract new keyutil package from util/cert
2019-02-23 01:43:16 -08:00
Kubernetes Prow Robot
1d2d2d0ab2
Merge pull request #74390 from vanduc95/cleanup-kubeadm-cont.3-20190222
kubeadm cleanup: master -> control-plane (cont.3)
2019-02-22 23:27:40 -08:00
Kubernetes Prow Robot
e4302c96e1
Merge pull request #74428 from bart0sh/PR0063-kubeadm-remove-dead-code
kubeadm: remove dead code
2019-02-22 19:19:27 -08:00
vanduc95
57d04cafee kubeadm cleanup: master -> control-plane (cont.3) 2019-02-23 10:19:26 +07:00
Kubernetes Prow Robot
65cdd7e74a
Merge pull request #74400 from rojkov/kubeadm-refactor-etcdClient
kubeadm: simplify creating etcdClient
2019-02-22 19:19:16 -08:00
Xiang Dai
36065c6dd7 delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-23 10:28:04 +08:00
Ed Bartosh
39871f565d kubeadm: remove dead code
Removed unused functions and variables from
the kubeadm codebase.
2019-02-22 23:01:14 +01:00
PingWang
8fef7221a1 Code cleanup and refactoring
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-02-22 16:48:00 +08:00
Kubernetes Prow Robot
9e53b85d28
Merge pull request #74112 from pytimer/kubeadm-reset
kubeadm: Remove etcd members from the etcd cluster when reset the nodes
2019-02-22 00:19:40 -08:00
Dmitry Rozhkov
926d9012a4 kubeadm: simplify creating etcdClient
There is no need to overshadow `client` with a transitive variable
used solely for transfering its value to `etcdClient`.
2019-02-22 09:41:46 +02:00
Kubernetes Prow Robot
9dbc8912d9
Merge pull request #74355 from brb/kubeadm-support-kernel-5
kubeadm: Support >= 5.0 Linux kernel
2019-02-21 17:47:40 -08:00
pytimer
83f5296a14 kubeadm: Remove etcd member from the etcd cluster when reset the control plane node 2019-02-22 09:13:01 +08:00
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
Martynas Pumputis
148b222d97 kubeadm: Support >= 5.0 Linux Kernel
Signed-off-by: Martynas Pumputis <m@lambda.lt>
2019-02-21 17:31:15 +01: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
xichengliudui
fb7bc5c4ea Fix the legacy of #74479 2019-02-20 17:09:30 -05: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
Andrew Lytvynov
18458392ca Extract new keyutil package from client-go/util/cert
This package contains public/private key utilities copied directly from
client-go/util/cert. All imports were updated.

Future PRs will actually refactor the libraries.

Updates #71004
2019-02-19 09:48:59 -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
Lubomir I. Ivanov
363c778d45 kubeadm: use DefValue for the --kubeconfig flag
- Rename FindExistingKubeConfig to GetKubeConfigPath

- Cobra supports a DefValue option which can be used
to differentiate between the cases where the user set a flag
and when a flag was unset, while still adding a default value.
Use this in options/generic.go for the kubeconfig flag.

- Remove the GetKubeConfigPath() logic from `reset` and `upgrade`
as these are node level kubeadm commands.

- Default kubeconfig values to "" everywhere where GetKubeConfigPath
is used. This allows to search for existing kubeconfig locations.
2019-02-19 17:35:37 +02: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
Lubomir I. Ivanov
19e89c32f5 kubeadm: remove nodefs.inodesFree test defaulting on non-Linux
Add test files that exclude the field in question
under KubeletConfiguration -> evictionHard for non-Linux.

Add runtime abstraction for the test files in initconfiguration_tests.go
2019-02-12 14:19:47 +02:00
SataQiu
ab9709ff70 kubeadm cleanup: master -> control-plane 2019-02-12 17:31:35 +08:00
Rostislav M. Georgiev
0dfc1d6ded kubeadm: Don't dump backtrace on reset
The current code logs an error and full blown backtrace if we fail to remove
the containers upon reset. This creates unneeded, huge and rather scary log
message. Fix that by leaving just the error message.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-12 11:24:11 +02:00
Kubernetes Prow Robot
aa00afe231
Merge pull request #73649 from ojmhetar/coredns-priorityclass
Add priority class to CoreDNS pods
2019-02-11 22:55:45 -08:00
Davanum Srinivas
1d430a4a73
Remove unnecessary prefixes from various .import-restrictions files
Found using script:
https://gist.github.com/dims/384dea60754042f61d79233603034038

Just run using:
`find . -name .import-restrictions | xargs python ~/junk/sanitize-import-boss.py`

The removed entries are either packages that got moved/renamed/deleted
but are still not cleaned up from .import-restrictions files.

Change-Id: I92c400f74e6f012cc75539311ed4de280e25e918
2019-02-11 16:47:28 -05: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
Kubernetes Prow Robot
a1cc48bf59
Merge pull request #73837 from neolit123/preflight-docker-cgroup
kubeadm: add a preflight check for Docker and cgroup driver
2019-02-09 08:45:11 -08:00
Lubomir I. Ivanov
3b3b79fe2c autogenerated bazel 2019-02-08 19:31:22 +02:00
Lubomir I. Ivanov
1d032c40d3 kubeadm: add a preflight check for Docker and cgroup driver
systemd is the recommended driver as per the setup of running
the kubelet using systemd as the init system. Add a preflight
check that throws a warning if this isn't the case.
2019-02-08 19:31:22 +02:00
Kubernetes Prow Robot
b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Kubernetes Prow Robot
395e4c05ba
Merge pull request #73745 from rosti/refactor-JoinConfigFileAndDefaultsToInternalConfig
kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
2019-02-08 06:54:16 -08:00
Rostislav M. Georgiev
09f753a94c kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
Currently JoinConfigFileAndDefaultsToInternalConfig is doing a couple of
different things depending on its parameters. It:

- loads a versioned JoinConfiguration from an YAML file.
- returns defaulted JoinConfiguration allowing for some overrides.

In order to make code more manageable, the following steps are taken:

- Introduce LoadJoinConfigurationFromFile, which loads a versioned
  JoinConfiguration from an YAML file, defaults it (both dynamically and
  statically), converts it to internal JoinConfiguration and validates it.

- Introduce DefaultedJoinConfiguration, which returns defaulted (both
  dynamically and statically) and verified internal JoinConfiguration.
  The possibility of overwriting defaults via versioned JoinConfiguration is
  retained.

- Re-implement JoinConfigFileAndDefaultsToInternalConfig to use
  LoadJoinConfigurationFromFile and DefaultedJoinConfiguration.

- Replace some calls to JoinConfigFileAndDefaultsToInternalConfig with calls to
  either LoadJoinConfigurationFromFile or DefaultedJoinConfiguration where
  appropriate.

- Rename JoinConfigFileAndDefaultsToInternalConfig to the more appropriate name
  LoadOrDefaultJoinConfiguration.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-02-08 14:00:02 +02:00
Dmitry Rozhkov
6ac76f9859 kubeadm: restructure upgradeVariables 2019-02-08 11:45:33 +02:00
Kubernetes Prow Robot
eac19a3ab9
Merge pull request #73616 from dims/move-part-of-kubelet-apis-well-known-lables
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
2019-02-07 19:44:34 -08:00
Kubernetes Prow Robot
7d1dc61920
Merge pull request #73678 from ereslibre/do-not-create-etcd-datadir-dryrun
kubeadm: do not create etcd datastore if we are in dryrun mode
2019-02-07 15:49:53 -08:00
Kubernetes Prow Robot
5b6a23f3af
Merge pull request #73798 from MalloZup/remove-wrong-string
kubeadm: improve ux on infoMsg kubeconfig
2019-02-07 10:20:34 -08:00
Ojas M
ebb5b9436f Add priorityClassName to kubeadm kubedns manifest 2019-02-07 09:21:05 -08:00
Ojas M
b41bafac7c Add priorityClassName to kubeadm coredns manifest 2019-02-06 15:23:37 -08:00
dmaiocchi
83b808b3b0 kubeadm: improve ux on infoMsg kubeconfig 2019-02-06 23:27:12 +01:00
Rafael Fernández López
981bf1930c
kubeadm: do not create etcd datastore if we are in dryrun mode
This allows for kubeadm tests to pass when run with an unprivileged
user.
2019-02-06 22:59:19 +01:00
Yago Nobre
e7a8ac1099
kubeadm: graduate kubelet start join phase 2019-02-06 01:35:28 -02:00
ksubrmnn
164f79e2d4 Update config tests 2019-02-05 10:39:23 -08:00
Davanum Srinivas
b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Kubernetes Prow Robot
667584cec0
Merge pull request #73728 from neolit123/kubeadm-remove-experimental-config
kubeadm: remove warning about config usage
2019-02-05 06:47:39 -08:00
Kubernetes Prow Robot
28fefba116
Merge pull request #73725 from fabriziopandini/kubeadm-organize-phases
kubeadm: organize phases cmd
2019-02-05 03:18:42 -08:00
Lubomir I. Ivanov
b9816b1231 kubeadm: remove warning about config usage 2019-02-05 03:06:25 +02:00
fabriziopandini
64a7c0c7a5 autogenerated 2019-02-05 00:36:24 +01:00
fabriziopandini
f38217c75b kubeadm-organize-phases 2019-02-05 00:36:12 +01:00