Commit Graph

506 Commits

Author SHA1 Message Date
Dmitry Rozhkov
109f5db5a3 kubeadm: allow creating a cluster with ECDSA keys
The selected key type is defined by kubeadm's --feature-gates option:
if it contains PublicKeysECDSA=true then ECDSA keys will be generated
and used.

By default RSA keys are used still.

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
2020-02-24 11:20:07 +02:00
Rafael Fernández López
b140c5d64b
kubeadm: remove ClusterStatus dependency
While `ClusterStatus` will be maintained and uploaded, it won't be
used by the internal `kubeadm` logic in order to determine the etcd
endpoints anymore.

The only exception is during the first upgrade cycle (`kubeadm upgrade
apply`, `kubeadm upgrade node`), in which we will fallback to the
ClusterStatus to let the upgrade path add the required annotations to
the newly created static pods.
2020-02-20 12:18:56 +01:00
Ed Bartosh
be7e5b47fe kubeadm config images list: update output API 2020-02-17 17:23:08 +02:00
Kubernetes Prow Robot
20dca67a8a Merge pull request #87453 from aojea/kubeadm_dual
kubeadm: dual-stack validation allow single stack
2020-02-08 14:46:06 -08:00
RA489
ad9d2d71c0 remove bash examples/comments from the v1beta1 and v1beta2 APIs 2020-02-07 11:27:02 +05:30
Antonio Ojea
6dda7adaf5
kubeadm: dual-stack validation allow single stack
It turns out that the dual-stack feature enabled doesn't mean that
the cluster MUST be dual-stack, it only indicates that it MAY be
dual-stack but CAN be single-stack.

We should relax the validation to allow single-stack clusters
with dual-stack enabled.
2020-02-05 12:23:10 +01:00
Ajay Kumar
7271a81921 validation.go: don't clamp the CIDR size calculations
removed not required import, updated build
2019-12-24 23:17:06 +05:30
Rostislav M. Georgiev
b881f19c8b kubeadm: Group centric component configs
kubeadm's current implementation of component config support is "kind" centric.
This has its downsides. Namely:
- Kind names and numbers can change between config versions.
  Newer kinds can be ignored. Therefore, detection of a version change is
  considerably harder.
- A component config can have only one kind that is managed by kubeadm.
Thus a more appropriate way to identify component configs is required.

Probably the best solution identified so far is a config group.
A group name is unlikely to change between versions, while the kind names and
structure can.
Tracking component configs by group name allows us to:
- Spot more easily config version changes and manage alternate versions.
- Support more than one kind in a config group/version.
- Abstract component configs by hiding their exact structure.

Hence, this change rips off the old kind based support for component configs
and replaces it with a group name based one. This also has the following
extra benefits:
- More tests were added.
- kubeadm now errors out if an unsupported version of a known component group
  is used.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-11-26 13:55:28 +02:00
Kubernetes Prow Robot
66e0ca800d
Merge pull request #85137 from rosti/kubeadm-amend-hyperkube-deprecation
kubeadm: Amend the hyperkube deprecation change
2019-11-13 09:28:09 -08:00
Rostislav M. Georgiev
ec4840f0b2 kubeadm: Amend the hyperkube deprecation change
The PR introducing 5bb8069 got merged accidentally (the CI robot not
respecting a hold). Hence, the feedback to that PR is merged separately.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-11-12 16:23:05 +02:00
Rostislav M. Georgiev
994df0d631 kubeadm: use versioned component configs
This change removes dependencies on the internal types of the kubelet and
kube-proxy component configs. Along with that defaulting and validation is
removed as well. kubeadm will display a warning, that it did not verify the
component config upon load.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-11-06 14:15:57 +02:00
Kubernetes Prow Robot
01d20c689f
Merge pull request #84286 from bart0sh/PR0083-kubeadm-Token-remove-ObjectMeta
kubeadm: remove ObjectMeta from output.BootstrapTooken
2019-10-31 10:21:53 -07:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02:00
Ed Bartosh
ae95985908 kubeadm: remove ObjectMeta from output.BootstrapTooken
metav1.TypeMeta is what needed to make a runtime object.
ObjectMeta is not needed and can be safely removed.
2019-10-24 14:22:09 +03:00
Kubernetes Prow Robot
9fa1bc8003
Merge pull request #83422 from yastij/remove-ipallocator
remove ipallocator in favor of k/utils net package
2019-10-22 12:52:13 -07:00
Yassine TIJANI
f984b4c7a2 remove ipallocator in favor of k/utils net package
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-10-22 18:37:13 +02:00
Kubernetes Prow Robot
a7e0b768ee
Merge pull request #78764 from bart0sh/PR0070-kubeadm-structured-output-v2
Structured output for 'kubeadm token list'
2019-10-09 14:50:54 -07:00
Marek Counts
3a050344d0 Initial deprecation of kubeadm v1beta1 apis 2019-10-06 23:26:12 +00:00
Ed Bartosh
8cee92dfa8 create new api group output.kubeadm.k8s.io
This group contains APIs for handling kubeadm
structured output.
2019-10-03 12:40:12 +03:00
Arvinderpal Wander
bacc06d8fc kubeadm --service-cluster-ip-range supports a comma seperated list
of service subnets.

Update DNS, Cert, dry-run logic to support list of Service CIDRs.
Added unit tests for GetKubernetesServiceCIDR and updated
GetDNSIP() unit test to inclue dual-sack cases.
2019-09-16 09:33:43 -07:00
Kubernetes Prow Robot
d54c5163e0
Merge pull request #81458 from fabriziopandini/kubeadm-kustomize-ux
kubeadm: kustomize-ux
2019-08-22 05:46:32 -07:00
Kubernetes Prow Robot
e6d4273395
Merge pull request #79033 from Nordix/kubeadm-ds-pod-network-cidr
Dual-Stack Integration with Kubeadm
2019-08-16 05:06:31 -07:00
fabriziopandini
a92e7975d2 kubeadm-kustomize-ux 2019-08-15 09:14:31 +02:00
Arvinderpal Wander
3ac7ae60cc kubeadm --pod-network-cidr supports a comma separated list of pod
CIDRs. This is a necesary change for dual-stack.
2019-08-09 07:20:51 -07:00
Chuck Ha
309cd1684f
kubeadm: Fix some documnetation errors
Signed-off-by: Chuck Ha <chuckh@vmware.com>
2019-08-08 11:34:19 -04:00
Chuck Ha
74ba11b0cd
[kubeadm] Adds json struct tags to exposed API types
Signed-off-by: Chuck Ha <chuckh@vmware.com>
2019-07-15 11:14:40 -04:00
Kubernetes Prow Robot
da0f51ffed
Merge pull request #78820 from haosdent/fix_typos
Fix typos.
2019-07-01 15:09:20 -07:00
Benjamin Elder
c33ab5c78f fix KubeletConfiguration apiVersion 2019-06-25 23:59:32 -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
SataQiu
c794929d1d kubeadm: cleanup ExperimentalControlPlane and ExperimentalUploadCerts 2019-06-24 11:52:57 +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
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
Haosdent Huang
7ce6e71891 Fix typos. 2019-06-11 01:52:14 +08:00
Ricardo Pchevuzinske Katz
82c42bb6ee Remove deprecated flag --conntrack-max from kube-proxy 2019-06-01 18:10:28 -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
4eab931f15
Merge pull request #78403 from rosti/v1beta2-doc-updates
kubeadm: Update v1beta2 doc.go
2019-05-30 00:32:20 -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
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
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
SataQiu
4fcfb97179 improve validation message for join command 2019-05-15 12:46:45 +08: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
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
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