Commit Graph

1137 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
003c4e5155 Merge pull request #77792 from neolit123/kubeadm-psp-upgrade-fix
kubeadm: prevent PSP blocking of upgrade image prepull
2019-07-02 04:01:08 -07:00
Kubernetes Prow Robot
da0f51ffed Merge pull request #78820 from haosdent/fix_typos
Fix typos.
2019-07-01 15:09:20 -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
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
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
SataQiu
3b4dbe6e30 kubeadm: cleanup command output 2019-06-21 16:31:55 +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
SataQiu
7e2e144f1b kubeadm: cleanup deps on pkg/master/ports 2019-06-17 21:27:02 +08:00
Yassine TIJANI
c3904bbce6 move initsystem to kubeadm
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-06-17 12:21:01 +02: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
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
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
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
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
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
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
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
Ricardo Pchevuzinske Katz
82c42bb6ee Remove deprecated flag --conntrack-max from kube-proxy 2019-06-01 18:10:28 -03: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
fabriziopandini
c2faa3bfd1 kubeadm upgrade node 2019-05-29 22:06:42 +02: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
81a61ae0e3 Merge pull request #77863 from fabriziopandini/certs-expiration
Kubeadm: Add check certificate expiration command
2019-05-19 12:47: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
Sandeep Rajan
0b28419412 bump coredns version to 1.5.0 and update manifest 2019-05-17 10:03:02 -04:00
Jordan Liggitt
739a75fc32 Interrupt WaitForCertificate if desired kubelet serving cert changes 2019-05-16 15:14:47 -04: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
fabriziopandini
1c897874bf autogenerated 2019-05-15 10:26:00 +02:00
fabriziopandini
6db533dd5b refactor certs renewal 2019-05-15 10:25:50 +02: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
Yago Nobre
54a308bdd7 Improve error message when user provide invalid certificate key 2019-05-12 18:26:11 -03: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
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
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
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
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
stgleb
7bf9acd303 Change misleading log message
Secret instead of configmap for
upload certs phase
2019-04-29 03:06:11 +03:00