Commit Graph

579 Commits

Author SHA1 Message Date
SataQiu
5be47eaf27 kubeadm: update references to legacy artifacts locations 2021-07-21 12:13:05 +08:00
Kubernetes Prow Robot
656d00e894
Merge pull request #103496 from neolit123/1.22-add-defaulting-v1beta3-imagepull
kubeadm: statically default ImagePullPolicy in v1beta3
2021-07-06 22:11:48 -07:00
Lubomir I. Ivanov
f01d251e38 kubeadm: statically default ImagePullPolicy in v1beta3
Instead of dynamically defaulting NodeRegistration.ImagePullPolicy,
which is common when doing defaulting depending on host state - e.g.
hostname, statically default it in v1beta3/defaults.go.

- Remove defaulting in checks.go
- Add one more unit test in checks_test.go
- Adapt v1beta2 conversion and fuzzer / round tripping tests

This also results in the default being visible when calling:
"kubeadm config print ...".
2021-07-05 21:48:06 +03:00
Lubomir I. Ivanov
94414bea47 kubeadm: fix godoc formatting for v1beta3
Fix indentation of entries in the changelog and the migration steps.
2021-07-05 20:52:18 +03:00
XinYang
c2a8cd359f
re-order the imports in kubeadm
Signed-off-by: XinYang <xinydev@gmail.com>

Update cmd/kubeadm/app/cmd/join.go

Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2021-07-04 16:41:27 +08:00
Lubomir I. Ivanov
622f69bf8d kubeadm: update v1beta3's godoc changelog 2021-07-02 00:12:25 +03:00
Lubomir I. Ivanov
11d444b00e kubeadm: remove versioned copies of the bootstrap token API and utils
Given bootstraptoken/v1 is now a separate GV, there is no need
to duplicate the API and utilities inside v1beta3 and the internal
version.

v1beta2 must continue to use its internal copy due, since output/v1alpha1
embeds the v1beta2.BootstrapToken object. See issue 2427 in k/kubeadm.
2021-07-02 00:11:49 +03:00
Lubomir I. Ivanov
14fa296bb3 kubeadm: use the bootstraptoken/v1 API across the code base
- Make v1beta3 use bootstraptoken/v1 instead of local copies
- Make the internal API use bootstraptoken/v1
- Update validation, /cmd, /util and other packages
- Update v1beta2 conversion
2021-07-02 00:11:49 +03:00
Lubomir I. Ivanov
5b7bda90c0 kubeadm: introduce apis/bootstraptoken/v1
Package bootstraptoken contains an API and utilities wrapping the
"bootstrap.kubernetes.io/token" Secret type to ease its usage in kubeadm.

The API is released as v1, since these utilities have been part of a
GA workflow for 10+ releases.

The "bootstrap.kubernetes.io/token" Secret type is also GA.
2021-07-02 00:11:49 +03:00
Lubomir I. Ivanov
70a524659a kubeadm: add {Init|Join}Configuration.Patches.Directory to v1beta3
Add {Init|Join}Configuration.Patches, which is a structure that
contains patch related options. Currently it only has the "Directory"
field which is the same option as the existing --experimental-patches
flag.

The flags --[experimental-]patches value override this value
if both a flag and config is passed during "init" or "join".
2021-06-23 22:24:10 +03:00
Lubomir I. Ivanov
a4402122b4 kubeadm: add the --patches flag and deprecate --experimental-patches
The feature of "patches" in kubeadm has been in Alpha for a few
releases. It has not received major bug reports from users.
Deprecate the --experimental-patches flag and add --patches.

Both flags are allowed to be mixed with --config.
2021-06-23 22:22:41 +03:00
Kubernetes Prow Robot
c864f2357d
Merge pull request #102901 from wangyysde/add-support-imagePullPolicy-fix524
kubeadm: add support of imagePullPolicy to kubeadm
2021-06-22 07:43:59 -07:00
caodonghui
25f479c2ac fix'--log-file only works if --logtostderr=false' 2021-06-22 09:32:26 +08:00
wangyysde
459fe7d08a add support of imagePullPolicy to kubeadm
Signed-off-by: wangyysde <net_use@bzhy.com>
2021-06-22 07:13:25 +08:00
Mike Spreitzer
a3e464490a Fix some typos and omissions in kubeadm APIs 2021-06-14 20:38:43 -04:00
Kubernetes Prow Robot
4aae71695a
Merge pull request #102366 from cndoit18/fix-time-format
fix(timezone): Change the time zone in the api data to UTC
2021-06-11 06:54:59 -07:00
Kubernetes Prow Robot
e52b7be7d7
Merge pull request #101600 from KofClubs/fix-cri-socket-kubeadm
kubeadm: disallow the mixture of --cri-socket and --config
2021-06-11 00:04:58 -07:00
Kubernetes Prow Robot
faa36554c5
Merge pull request #102770 from pacoxu/kubeadm-example
kubeadm: use a suggested example in v1beta2/3 docs
2021-06-10 08:23:47 -07:00
pacoxu
654ec0866a kubeadm: use a suggested example in v1beta2/3 docs
Co-authored-by: SataQiu <shidaqiu2018@gmail.com>
2021-06-10 18:24:59 +08:00
Michaël Lévesque-Dion
a94aa0ea9a Update version of go-flow-levee for verify-govet-levee check. 2021-06-08 12:02:46 -04:00
cndoit18
51717256f9
fix(timezone): the timezone is standardized to UTC
Signed-off-by: cndoit18 <cndoit18@outlook.com>
2021-06-03 23:55:39 +08:00
Kubernetes Prow Robot
e7d8fb2e16
Merge pull request #101925 from neolit123/1.22-kubeadm-add-optional-fields
kubeadm: add "+optional" to fields with "omitempty" in v1beta3
2021-05-28 10:16:24 -07:00
Lubomir I. Ivanov
ac161866aa kubeadm: add SkipPhases in {Init|Join}Configuration for v1beta3
- Add the field SkipPhases in the public v1beta3 as a []string (omitempty)
- Add the field in the internal type
- Run generators
- Adapt v1beta2 converter for JoinConfiguration
2021-05-28 18:12:06 +03:00
Zhang Zhanpeng
5c2841c8cd Forbid the use of --config and --cri-socket at the same time
Signed-off-by: Zhang Zhanpeng <zhanpeng.zhang@daocloud.io>
2021-05-27 12:54:13 +08:00
Lubomir I. Ivanov
93f79103e5 kubeadm: add "+optional" to fields with "omitempty" in v1beta3
Add the "+optional" generator tag to all fields in v1beta3 structs
that have "omitempty" in JSON tags.
2021-05-25 20:05:43 +03:00
SataQiu
7a3827e8e3 kubeadm: add datapolicy tags for v1beta3 token fields 2021-05-21 11:47:17 +08:00
Lubomir I. Ivanov
8b9d0dceb1 kubeadm: remove the ClusterStatus object from v1beta3
- Remove the object form v1beta3 and internal type
- Deprecate a couple of phases that were specifically designed / named to
modify the ClusterStatus object
- Adapt logic around annotation vs ClusterStatus retrieval
- Update unit tests
- Run generators
2021-05-17 19:27:36 +03:00
Lubomir I. Ivanov
0bdfe05cf2 kubeadm: remove ClusterConfiguration.DNS.Type from v1beta3
Kubeadm no longer supports kube-dns and CoreDNS is the only
supported DNS server. Remove ClusterConfiguration.DNS.Type
from v1beta3 that is used to set the DNS server type.
2021-05-11 01:31:01 +03:00
Kubernetes Prow Robot
347730b6b4
Merge pull request #101537 from neolit123/1.22-remove-hyperkube
kubeadm: remove deprecated hyperkube image support in v1beta3
2021-05-10 10:49:48 -07:00
Kubernetes Prow Robot
3dd0597843
Merge pull request #101598 from neolit123/1.22-kubeadm-remove-clusterconfiguration-defaulting
kubeadm: simplify fuzzing of ClusterConfiguration
2021-05-08 01:23:17 -07:00
Lubomir I. Ivanov
8eca7298b1 kubeadm: simplify fuzzing of ClusterConfiguration
- Pin the ClusterConfiguration when fuzzing
the internal InitConfiguration that embeds it. Kubeadm includes
separate constructs for this embedding in the internal type
and this round trip is not viable.
- Remove the artificial calls to SetDefaults_ClusterConfiguration()
in v1beta{2|3}'s converters from public to internal InitConfiguration.
- Make sure the internal InitConfiguration.ClusterConfiguration is
defaulted in initconfiguration.go instead.
2021-04-29 03:34:03 +03:00
Lubomir I. Ivanov
81d5b18dfb kubeadm: remove deprecated hyperkube image support in v1beta3
The hyperkube image support was deprecated. Remove the field
ClusterConfiguration.UseHyperKubeImage from the new v1beta3 API.
2021-04-29 02:10:45 +03:00
maruiyan
8a2a304246 change marsheller to marchaler 2021-04-28 17:00:01 +08:00
Lubomir I. Ivanov
4cba7dcc43 kubeadm: enable v1beta3 accross the code base
- scheme: switch to:
utilruntime.Must(scheme.SetVersionPriority(v1beta3.SchemeGroupVersion))
- change all imports in the code base from v1beta2 to v1beta3
- rename all import aliases for kubeadmapiv1beta2 to "kubeadmapiv".
this allows smaller diffs when changing the default public API.
2021-04-20 03:47:27 +03:00
Lubomir I. Ivanov
02b455b565 kubeadm: add v1beta3 copied from v1beta2
Add a new versioned API v1beta3.
2021-04-20 03:47:27 +03:00
Lubomir I. Ivanov
66f0ce244c kubeadm: remove the deprecated v1beta1 API 2021-04-15 00:12:41 +03:00
Kubernetes Prow Robot
be7d3aeb97
Merge pull request #100935 from lojies/kubeadmcodecleanup
code cleanup for cmd/kubeadm
2021-04-12 13:18:15 -07:00
卢振兴10069964
a1452b9115 code cleanup for cmd/kubeadm 2021-04-09 09:44:06 +08:00
Lubomir I. Ivanov
80bca50feb kubeadm: remove mentions of cgroup-driver from godocs
The v1beta1/2 API doc.go files include an example
flag for the kubelet binary "cgroup-driver" under
"kubeletExtraArgs".

This flag is deprecated and should not be in the examples.
Add "v" instead which is one of the flags we know will
not be deprecated soon.
2021-03-24 18:14:35 +02:00
Kubernetes Prow Robot
a6bfc7d7a9
Merge pull request #99646 from rajansandeep/remove-kube-dns
[kubeadm]: Remove the deprecated kube-dns as an option in kubeadm
2021-03-04 14:41:12 -08:00
Sandeep Rajan
62542bb1ec add validation to indicate kube-dns is no longer supported 2021-03-04 14:57:52 -05:00
Kubernetes Prow Robot
504b86ced7
Merge pull request #99471 from neolit123/1.21-default-systemd-cgroup-driver
kubeadm: set the kubelet cgroup driver to "systemd" during "init"
2021-03-04 11:00:38 -08:00
Sandeep Rajan
b8a1bd6a6c remove the deprecated kube-dns as an option in kubeadm 2021-03-04 12:12:54 -05:00
Kubernetes Prow Robot
b0ba6c0b76
Merge pull request #98984 from SataQiu/fix-kubeadm-20210211
kubeadm: skip validating pod subnet against node-cidr-mask when allocate-node-cidrs is set to be false
2021-03-03 01:53:20 -08:00
Lubomir I. Ivanov
b6ff320507 kubeadm: set the kubelet cgroup driver to "systemd" during "init"
The kubeadm documentation instructs users to set the container
runtime driver to "systemd", since kubeadm manages a kubelet via
the systemd init system. The kubelet default however is "cgroupfs".
For new clusters set the driver to "systemd" unless the user
is explicit about it. The same defaulting would not happen
during "upgrade".
2021-03-02 18:39:39 +02:00
pacoxu
3c33ceab04 log a warning if ipv6 site-local addresses is using as it shouldn't be deprecated
Signed-off-by: pacoxu <paco.xu@daocloud.io>
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2021-03-02 21:51:28 +08:00
SataQiu
2ba178c92c kubeadm: skip validating pod subnet against node-cidr-mask when allocate-node-cidrs is set to be false 2021-03-01 11:19:47 +08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
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