Commit Graph

3691 Commits

Author SHA1 Message Date
calvin0327
941c78f411 Update corefile-migration to v1.0.14 and update coredns to 1.8.6 2021-10-12 11:03:52 +08:00
Kubernetes Prow Robot
bf000e8770
Merge pull request #104770 from pacoxu/dual-stack-ga-kubeadm
cleanup: DualStack GA for kubeadm
2021-09-28 03:42:42 -07:00
Paco Xu
751ad37a05 kubeadm: cleanup remove some empty feature gate for dual-stack 2021-09-28 15:34:26 +08:00
Khaled Henidak (Kal)
a53e2eaeab
move IPv6DualStack feature to stable. (#104691)
* kube-proxy

* endpoints controller

* app: kube-controller-manager

* app: cloud-controller-manager

* kubelet

* app: api-server

* node utils + registry/strategy

* api: validation (comment removal)

* api:pod strategy (util pkg)

* api: docs

* core: integration testing

* kubeadm: change feature gate to GA

* service registry and rest stack

* move feature to GA

* generated
2021-09-24 16:30:22 -07:00
Kubernetes Prow Robot
91f820eee4
Merge pull request #104854 from pacoxu/kubeadm-swap-check
kubeadm: move swap on check error to warning since NodeSwap is beta
2021-09-17 04:57:13 -07:00
Kubernetes Prow Robot
8975906dfc
Merge pull request #104942 from SataQiu/kubeadm-20210912
kubeadm: do not check if the /etc/kubernetes/manifests folder is empty on joining worker nodes during preflight
2021-09-15 11:16:11 -07:00
Paco Xu
0b8433a3f5 kubeadm: remove --port from kube-scheduler manifest 2021-09-15 12:58:35 +08:00
Kubernetes Prow Robot
fa2657b8b2
Merge pull request #104624 from Haleygo/support-null-resolvConf-in-configFile
When resolvConf is "" in kubelet configuration, pod will be created with wrong dns policy
2021-09-14 14:18:59 -07:00
SataQiu
d57e442c62 kubeadm: do not check if the /etc/kubernetes/manifests folder is empty on joining worker nodes during preflight
Signed-off-by: SataQiu <shidaqiu2018@gmail.com>
2021-09-14 20:26:04 +08:00
Haleygo
46454ea9dc support null resolvConf in Kubelet Configuration 2021-09-14 16:12:52 +08:00
Paco Xu
1385bd3a06 kubeadm: fix ut failures of dualstack GA 2021-09-14 13:16:40 +08:00
Kubernetes Prow Robot
c79f7c1add
Merge pull request #104711 from claudiubelu/update-pause-3.6
update pause image references to use 3.6
2021-09-13 19:09:08 -07:00
Paco Xu
d57bad5fa9 Update cmd/kubeadm/app/preflight/checks.go
Co-authored-by: Lubomir I. Ivanov <neolit123@gmail.com>
2021-09-14 09:33:12 +08:00
Paco Xu
7007b417e5 kubeadm: move swap on check error to warning since NodeSwap is beta in 1.23 2021-09-14 09:33:12 +08:00
RA489
2a96e22c0a remove the --csr* flags from "kubeadm certs renew" 2021-09-13 14:50:33 +05:30
Paco Xu
a0cc3f1c9a cleanup: DualStack GA for kubeadm 2021-09-04 22:38:14 +08:00
Claudiu Belu
18936d4785 updates pause image references
The pause:3.6 image has been published.

Also updates older / incorrect references.
2021-08-29 21:50:05 -07:00
la3mmchen
57f2af2834 FIX: just add a missing word in output 2021-08-25 21:53:49 +02:00
Stephen Augustus
481cf6fbe7
generated: Run hack/update-gofmt.sh
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-08-24 15:47:49 -04:00
Antonio Ojea
0cd75e8fec run hack/update-netparse-cve.sh 2021-08-20 10:42:09 +02:00
XinYang
72fd01095d
re-order imports for kubeadm
Signed-off-by: XinYang <xinydev@gmail.com>
2021-08-17 22:40:46 +08:00
Lubomir I. Ivanov
096c3e8f2d kubeadm: further improve the dynamic version population
Panicing if not running in a test and if the component-base/version
variables are empty is not ideal. At some point sections
of kubeadm could be exposed as a library and if these sections
import the constants package, they would panic on the library
users unless they set the version information in component-base
with ldflags.

Instead:
- If the component-base version is empty, return a placeholder version
that should indicate to users that build kubeadm that something is not
right (e.g. they did not use 'make'). During library usage or unit
tests this version should not be relevant.
- Update unit tests to use hardcoded versions instead of the versions
from the constants package. Using the constants package for testing
is good but during unit tests these versions are already placeholders
since unit tests do not populate the actual component-base versions
(e.g. 1.23).
2021-08-12 19:54:06 +03:00
Kubernetes Prow Robot
746fea56ae
Merge pull request #104065 from pacoxu/kubeadm-patches
kubeadm: disallow the mixture of --config and --patches & remove deprecated --experimental-patches
2021-08-11 08:06:58 -07:00
Benjamin Elder
e6cb526f6b set umask on linux and darwin when testing kubeadm copycerts 2021-08-10 22:42:35 -07:00
Kubernetes Prow Robot
40c9066054
Merge pull request #103027 from Haleygo/feature/add-kubeadm-join-dryrun
kubeadm: support kubeadm join --dry-run
2021-08-10 13:02:39 -07:00
Haleygo
95e000fd65 support kubeadm join dry-run 2021-08-10 23:43:54 +08:00
Kubernetes Prow Robot
e96652ea74
Merge pull request #104015 from neolit123/1.23-use-dynamic-versions
kubeadm: dynamically populate the current/minimum k8s versions
2021-08-09 21:59:17 -07:00
Lubomir I. Ivanov
e3538edc22 kubeadm: update unit tests to support dynamic version updates
Tests under /app and /test would fail if the current/minimum k8s version
is dynamically populated from the version in the kubeadm binary.
Adapt the tests to support that.
2021-08-09 19:42:08 +03:00
Lubomir I. Ivanov
207ffa7bdc kubeadm: dynamically populate the current/minimum k8s versions
Kubeadm requires manual version updates of its current supported k8s
control plane version and minimally supported k8s control plane and
kubelet versions every release cycle.

To avoid that, in constants.go:
- Add the helper function getSkewedKubernetesVersion() that can be
used to retrieve a MAJOR.(MINOR+n).0 version of k8s. It currently
uses the kubeadm version populated in "component-base/version" during
the kubeadm build process.
- Use the function to set existing version constants (variables).

Update util/config/common.go#NormalizeKubernetesVersion() to
tolerate the case where a k8s version in the ClusterConfiguration
is too old for the kubeadm binary to use during code freeze.

Include unit tests for the new utilities.
2021-08-09 19:42:08 +03:00
Kubernetes Prow Robot
5eeaafd2b4
Merge pull request #104157 from knight42/remove-port-from-kubeadm-manifest
refactor(kubeadm): remove the flag --port from KCM manifest
2021-08-05 16:37:10 -07:00
Kubernetes Prow Robot
de4e500673
Merge pull request #104134 from ihgann/topic/ganni/optimize-kubeadm-etcd-member-add-2
kubeadm: reduce the backoff time of AddMember for etcd
2021-08-05 16:37:03 -07:00
Kubernetes Prow Robot
8df554bafd
Merge pull request #103801 from gkarthiks/master
Remove purell package usage from kubeadm
2021-08-05 14:09:56 -07:00
Ian Gann
c8431f42d9 kubeadm: Reduce the backoff time of AddMember for etcd
This change optimizes the kubeadm/etcd `AddMember` client-side function
by stopping early in the backoff loop when a peer conflict is found
(indicating the member has already been added to the etcd cluster). In
this situation, the function will stop early and relay a call to
`ListMembers` to fetch the current list of members to return. With this
optimization, front-loading a `ListMembers` call is no longer necessary,
as this functionally returns the equivalent response.

This helps reduce the amount of time taken in situational cases where an
initial client request to add a member is accepted by the server, but
fails client-side.

This situation is possible situationally, such as if network latency
causes the request to timeout after it was sent and accepted by the
cluster. In this situation, the following loop would occur and fail with
an `ErrPeerURLExist` response, and would be stuck until the backoff
timeout was met (roughly ~2min30sec currently).

Testing Done:

* Manual testing with an etcd cluster. Initial "AddMember` call was
  successful, and the etcd manifest file was identical to prior version
  of these files. Subsequent calls to add the same member succeeded
  immediately (retaining idempotency), and the resulting manifest file
  remains identical to previous version as well. The difference, this
  time, is the call finished ~2min25sec faster in an identical test in
  the environment tested with.
2021-08-05 13:11:42 -07:00
Jian Zeng
c486b229d2 refactor(kubeadm): remove the flag --port from KCM manifest
Signed-off-by: Jian Zeng <zengjian.zj@bytedance.com>
2021-08-05 19:51:02 +08:00
Kubernetes Prow Robot
90ac41bd77
Merge pull request #103813 from SataQiu/update-kubeadm-ci-bucket
kubeadm: update references to legacy artifacts locations
2021-08-05 01:44:27 -07:00
paco
b7ea7a7766 kubeadm: disallow the mixture of --config and --patches 2021-08-02 10:20:31 +08:00
paco
375ef778c4 kubeadm: remove deprecated --experimental-patches 2021-08-02 10:10:20 +08:00
Kevin Delgado
ca90849724 add kube-openapi/pkg/schemaconv to kubeadm import-restrictions 2021-07-28 01:06:15 +00:00
SataQiu
5be47eaf27 kubeadm: update references to legacy artifacts locations 2021-07-21 12:13:05 +08:00
gkarthiks
019e8f71b6 refactor: normalizing URL string locally and move out from purell package
The purell package at github.com/PuerkitoBio/purell is no longer maintained and in k/k repo under kubeadm package its been used for normalizing the URL. This commit removes the dependency on this package and creates a local function for normalizing the URL within the preflight package under cmd/kubeadm.

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

chore: add new line at end of the file

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>

fix: remove unused mod from vendor modules file

Signed-off-by: gkarthiks <github.gkarthiks@gmail.com>
2021-07-20 21:56:08 +05:30
Lubomir I. Ivanov
6cf3e36c37 kubeadm: statically default the "from cluster" InitConfiguration
During operations such as "upgrade", kubeadm fetches the
ClusterConfiguration object from the kubeadm ConfigMap.
However, due to requiring node specifics it wraps it in an
InitConfiguration object. The function responsible for that is:
  app/util/config#FetchInitConfigurationFromCluster().

A problem with this function (and sub-calls) is that it ignores
the static defaults applied from versioned types
(e.g. v1beta3/defaults.go) and only applies dynamic defaults for:
- API endpoints
- node registration
- etc...

The introduction of Init|JoinConfiguration.ImagePullPolicy now
has static defaulting of the NodeRegistration object with a default
policy of "PullIfNotPresent". Respect this defaulting by constructing
a defaulted internal InitConfiguration from
FetchInitConfigurationFromCluster() and only then apply the dynamic
defaults over it.

This fixes a bug where "kubeadm upgrade ..." fails when pulling images
due to an empty ("") ImagePullPolicy. We could assume that empty
string means default policy on runtime in:
cmd/kubeadm/app/preflight/checks.go#ImagePullCheck()

but that might actually not be the user intent during "init" and "join",
due to e.g. a typo. Similarly, we don't allow empty tokens
on runtime and error out.
2021-07-08 02:52:11 +03:00
Kubernetes Prow Robot
ac554af79b
Merge pull request #103142 from serathius/etcd-3.5.0
Upgrade etcd to 3.5.0
2021-07-07 12:40:22 -07: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
Kubernetes Prow Robot
120f6325a7
Merge pull request #103471 from pacoxu/patch-1
kubeadm: fix nil pointer in  Cfg() feature gate checking
2021-07-04 23:06:53 -07:00
Paco Xu
772344aef2
kubeadm: fix nil pointer in Cfg() feature gate checking 2021-07-05 09:59:57 +08: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
Kubernetes Prow Robot
5fe522c237
Merge pull request #101988 from vinayakankugoyal/kubeadm
Remove users and groups created as part of rootless control-plane in kubeadm.
2021-07-02 23:42:17 -07:00
Vinayak Goyal
1ae9b8f04d Update kernel components to run as non-root in kubeadm. 2021-07-02 17:37:55 -07:00