Commit Graph

531 Commits

Author SHA1 Message Date
pacoxu
829b0cde81 kubeadm: promote DualStack feature gate to Beta 2021-02-22 16:03:49 +08:00
pacoxu
f681edf58e kubeadm: improve error message about node subnet size validation
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
Co-authored-by: SataQiu <1527062125@qq.com>
Co-authored-by: driazati <david.riazati@gatech.edu>
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2021-02-05 23:29:26 +08:00
chymy
081d78f635 kubeadm: APIEndpointFromString verifies ip
Signed-off-by: chymy <chang.min1@zte.com.cn>
2021-01-19 18:36:55 +08:00
Kubernetes Prow Robot
d067c2e95d
Merge pull request #97087 from SataQiu/change-ci-image-repo
kubeadm: change the default image repository for CI images from gcr.io/kubernetes-ci-images to gcr.io/k8s-staging-ci-images
2021-01-14 08:55:04 -08:00
he.qingguo
6f1c8de85c Fix typo of BoostrapToken in kubeadmin-type.go]
Signed-off-by: he.qingguo <he.qingguo@zte.com.cn>
2021-01-09 16:16:29 +08:00
SataQiu
fa04c55ee6 kubeadm: change the default image repository for CI images from gcr.io/kubernetes-ci-images to gcr.io/k8s-staging-ci-images
Signed-off-by: SataQiu <1527062125@qq.com>
2020-12-06 14:59:12 +08:00
Antonio Ojea
4e14d1b9a3 kubeadm: validate node-cidr-mask are correct 2020-10-22 17:31:10 +02:00
Antonio Ojea
7fc6b4157b kubeadm validate maximum service subnet size
Validate that the maximum service subnet size doesn't exceed the
limits.

Co-authored-by: Arvinderpal Wander <awander@gmail.com>
2020-10-22 17:30:59 +02:00
Antonio Ojea
8b52995d32 kubeadm: validate podSubnet against node-cidr-mask
the controller manager should validate the podSubnet against the node-mask
because if they are incorrect can cause the controller-manager to fail.

We don't need to calculate the node-cidr-masks, because those should
be provided by the user, if they are wrong we fail in validation.
2020-10-22 16:24:13 +02:00
Lubomir I. Ivanov
8ece27bf4b kubeadm: remove the --experimental-kustomize feature
The feature was replaced by --experimental-patches and deprecated in
1.19.
2020-09-18 03:49:53 +03:00
Kubernetes Prow Robot
a2aaae2dd5
Merge pull request #88124 from rosti/kubeadm-cc-upgrade-plan
kubeadm upgrade plan: print a component config state table
2020-07-03 05:02:47 -07:00
Lubomir I. Ivanov
144778db83 kubeadm: plumb the patches option trough init/join/upgrade
This changes adds the "patches" option in all places where
the "kustomize" option is already present.
2020-06-26 02:14:47 +03:00
Rostislav M. Georgiev
709e3c3a83 kubeadm upgrade plan: component config state table
This change enables kubeadm upgrade plan to print a state table with
information regarding known component config API groups. Most importantly this
information includes current and preferred version for each group and an
indication if a manual user upgrade is required.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-06-24 16:47:15 +03:00
Kubernetes Prow Robot
b607c7cd52
Merge pull request #86070 from rosti/kubeadm-cc-user-configs-checksum-a
kubeadm: distinguish between generated and user supplied component configs
2020-06-03 05:44:18 -07:00
Rostislav M. Georgiev
5d6cf8ecd4 kubeadm: Distinguish between user supplied and generated component configs
Until now, users were always asked to manually convert a component config to a
version supported by kubeadm, if kubeadm is not supporting its version.
This is true even for configs generated with older kubeadm versions, hence
getting users to make manual conversions on kubeadm generated configs.
This is not appropriate and user friendly, although, it tends to be the most
common case. Hence, we sign kubeadm generated component configs stored in
config maps with a SHA256 checksum. If a configs is loaded by kubeadm from a
config map and has a valid signature it's considered "kubeadm generated" and if
a version migration is required, this config is automatically discarded and a
new one is generated.
If there is no checksum or the checksum is not matching, the config is
considered as "user supplied" and, if a version migration is required, kubeadm
will bail out with an error, requiring manual config migration (as it's today).
The behavior when supplying component configs on the kubeadm command line
does not change. Kubeadm would still bail out with an error requiring migration
if it can recognize their groups but not versions.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-06-01 17:57:53 +03:00
Prasad Katti
c253ccca00 Add tests for ValidateEtcd 2020-05-27 10:40:13 -07:00
Prasad Katti
a85fc1038c Add tests for ValidateURLs (kubeadm validation) 2020-05-26 20:31:04 -07:00
Prasad Katti
b5c08caa34 Add tests for ValidateSocketPath 2020-05-25 17:28:58 -07:00
Prasad Katti
a1ac30db40 Add a kubeadm ValidateNodeRegistrationOptions test 2020-05-24 14:18:41 -07:00
Kubernetes Prow Robot
ec23b612b8
Merge pull request #91176 from prasadkatti/add_tests_validation
Update kubeadm test TestValidateToken
2020-05-17 18:35:35 -07:00
Prasad Katti
124386eaa0 Fix identation in kubeadm api docs 2020-05-17 14:05:34 -07:00
Prasad Katti
89fa53f064 Update kubeadm test TestValidateToken
- Remove some duplicate testcases
- Add token to error message
2020-05-16 23:46:18 -07:00
SataQiu
afb1ea44b9 kubeadm: do not set deprecated '--cgroup-driver' flag in kubeadm-flags.env, this value will be set in config.yaml 2020-04-27 15:32:10 +08:00
Johannes M. Scheuermann
4211c2dccc Improve error message when service cidr is to small 2020-04-23 20:18:13 +02:00
Ed Bartosh
e5d6536ade add UpgradePlan to the kubeadm.output API group 2020-03-24 12:47:42 +02:00
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