Commit Graph

2682 Commits

Author SHA1 Message Date
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
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
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