Commit Graph

143 Commits

Author SHA1 Message Date
Paco Xu
b1ee8c8b82 kubeadm: no need to check if target coredns version is not changed 2023-02-25 21:53:28 +08:00
SataQiu
d4cafe4738 kubeadm: optimize and make the usage consistent about apierrors.IsNotFound 2022-10-13 23:23:53 +08:00
Paco Xu
4daf5f903b kubeadm: cleanup master related taint and tolerations 2022-08-25 22:22:20 +08:00
SataQiu
299e745127 kubeadm: add the preferred pod anti-affinity for CoreDNS Deployment 2022-06-15 14:38:12 +08:00
wangyysde
e863ebb6b5 add print-manifest flag to print addon manifests to STDOUT
Signed-off-by: wangyysde <net_use@bzhy.com>
2022-06-08 13:45:37 +08:00
Paco Xu
1385bd3a06 kubeadm: fix ut failures of dualstack GA 2021-09-14 13:16:40 +08:00
Paco Xu
a0cc3f1c9a cleanup: DualStack GA for kubeadm 2021-09-04 22:38:14 +08:00
XinYang
72fd01095d
re-order imports for kubeadm
Signed-off-by: XinYang <xinydev@gmail.com>
2021-08-17 22:40:46 +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
Antonio Ojea
74feb07594 kubeadm: CoreDNS permissions for endpointslices
Signed-off-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
Co-authored-by: pacoxu <paco.xu@daocloud.io>
2021-06-15 13:03:48 +08: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
Sandeep Rajan
b8a1bd6a6c remove the deprecated kube-dns as an option in kubeadm 2021-03-04 12:12:54 -05:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Lubomir I. Ivanov
3b5e698cb2 kubeadm: trim leading "v" when running CoreDNS migration preflight
During upgrade the coredns migration library seems to require
that the input version doesn't have the "v" prefix".

Fixes a bug where the user cannot run commands such as
"kubeadm upgrade plan" if they have `v1.8.0` installed.

Assuming this is caused by the fact that previously the image didn't
have a "v" prefix.
2021-01-11 18:21:19 +02:00
Kubernetes Prow Robot
80be1d6c72
Merge pull request #96429 from rajansandeep/coredns180-kubeadm
[kubeadm]: Bump CoreDNS version to 1.8.0
2020-12-29 13:19:48 -08:00
Sandeep Rajan
2eabd9d832 fix migration logic
modify addon test to cover the entire migration logic
2020-12-02 12:53:07 -05:00
Paco Xu
4525f3fef8 coredns dep.Severity is newdefault, not newDefault
Signed-off-by: pacoxu <paco.xu@daocloud.io>
2020-11-27 18:17:02 +08:00
Sandeep Rajan
40862c3b60 bump coredns to 1.8.0 2020-11-16 15:22:05 -05:00
Lubomir I. Ivanov
fb7ddf88e9 kubeadm: mark the "master" label/taint as deprecated
- Mark the "node-role.kubernetes.io/master" key for labels
and taints as deprecated.
- During "kubeadm init/join" apply the label
"node-role.kubernetes.io/control-plane" to new control-plane nodes,
next to the existing "node-role.kubernetes.io/master" label.
- During "kubeadm upgrade apply", find all Nodes with the "master"
label and also apply the "control-plane" label to them
(if they don't have it).
- During upgrade health-checks collect Nodes labeled both "master"
and "control-plane".
- Rename the constants.ControlPlane{Taint|Toleraton} to
constants.OldControlPlane{Taint|Toleraton} to manage the transition.
- Mark constants.OldControlPlane{{Taint|Toleraton} as deprecated.
- Use constants.OldControlPlane{{Taint|Toleraton} instead of
constants.ControlPlane{Taint|Toleraton} everywhere.
- Introduce constants.ControlPlane{Taint|Toleraton}.
- Add constants.ControlPlaneToleraton to the kube-dns / CoreDNS
Deployments to make them anticipate the introduction
of the "node-role.kubernetes.io/control-plane:NoSchedule"
taint (constants.ControlPlaneTaint) on kubeadm control-plane Nodes.
2020-11-10 22:10:13 +02:00
Lubomir I. Ivanov
4bb75a462f kubeadm: remove the CoreDNS check for supported image digests
The isCoreDNSVersionSupported() check assumes that
there is a running kubelet, that manages the CoreDNS containers.

If the containers are being created it is not possible to fetch
their image digest. To workaround that, a poll can be used in
isCoreDNSVersionSupported() and wait for the CoreDNS Pods
are expected to be running. Depending on timing and CNI
yet to be installed this can cause problems related to
addon idempotency of "kubeadm init", because if the CoreDNS
Pods are waiting for another step they will never get running.

Remove the function isCoreDNSVersionSupported() and assume that
the version is always supported. Rely on the Corefile migration
library to error out if it must.
2020-09-04 05:27:04 +03:00
zounengren
fc0bda5a3c fix kubeadm update coredns with skip pending pod 2020-09-03 10:42:59 +08:00
Sandeep Rajan
04038fc791 update coredns version to 1.7.0 2020-07-09 11:01:45 -04:00
Sandeep Rajan
4dc635d542 remove kube-dns translation for federation 2020-07-01 14:34:23 -04:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Rostislav M. Georgiev
fbfd44f337 kubeadm: Fix panic in isCoreDNSVersionSupported
A narrow assumption of what is contained in the `imageID` fields for the
CoreDNS pods causes a panic upon upgrade.
Fix this by using a proper regex to match a trailing SHA256 image digest
in `imageID` or return an error if it cannot find it.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2020-03-26 20:26:32 +02:00
Sandeep Rajan
fcd229e4bd ensure coredns running when migration fails
add an additional check for coredns image sha

add a check to see if migration is required
2020-03-11 11:32:32 -04:00
Sandeep Rajan
ca5d394f6a fix the coredns preflight check for unsupported plugins 2020-02-26 15:08:05 -05:00
Yu-Ju Hong
bcd975aa65 Replace Beta OS/arch labels with the GA ones
Beta OS/arch labels have been deprecated since 1.14.
This change replaces these labels with the GA ones.
2020-02-13 09:38:51 -08:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
SataQiu
803161d621 kubeadm: kube-dns is deprecated and will not be supported in a future version 2019-12-24 10:11:24 +08:00
Peter Grant
0e4469cddd persist deployed DNS configuration during kubeadm upgrade
Signed-off-by: Peter Grant <9246508+pickledrick@users.noreply.github.com>
2019-12-12 08:55:15 +11:00
Sandeep Rajan
f931dad722 bump coredns version and update manifest 2019-11-12 13:05:09 -05:00
Sandeep Rajan
16191db353 skip deployment update if migration fails 2019-11-06 10:55:54 -05:00
Sandeep Rajan
7074f28dd2 retain corefile when migration fails 2019-10-29 12:11:59 -04: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
Sandeep Rajan
6bb9eeeb1c move the corefile backup into a single configmap with a corefile-backup data key 2019-08-20 13:20:18 -04:00
Sandeep Rajan
6821d21260 add the ability to migrate coredns configmap 2019-08-15 10:09:32 -04:00
SataQiu
9657240197 update caddy vendor dependency to v1.0.1 2019-07-09 12:03:25 +08:00
Benjamin Elder
13813bc560 cleanup bespoke ipv6 checking in kubeadm 2019-07-03 16:26:08 -07:00
Rostislav M. Georgiev
7ba7bdaa22 kubeadm: Don't use "//pkg/apis/core".Resource helper
This helper is used in tests and pulls in unnecessary dependency, which should
not be used if kubeadm is to move to staging.
Replace with direct use of the GroupResource type.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-06-14 16:14:43 +03:00
Sandeep Rajan
77466d4a65 [kubeadm] Add the upstream option in CoreDNS configmap 2019-06-11 21:19:43 -04:00
Lubomir I. Ivanov
a49bc480b9 kubeadm: revert CoreDNS to 1.3.1 2019-05-30 23:31:54 +03:00
Sandeep Rajan
0b28419412 bump coredns version to 1.5.0 and update manifest 2019-05-17 10:03:02 -04: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
Kubernetes Prow Robot
888b81b638
Merge pull request #76238 from Dieken/30s-ttl-for-coredns
change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq
2019-04-23 06:20:09 -07:00
Manjunath A Kumatagi
23153e3f04 loop through next entry in stubDomainData if proxyIP == 0 2019-04-14 20:14:01 -05:00
Yubao Liu
f7f51fab2a change default 5s ttl to 30s for coredns to be same with kube-dns/dnsmasq 2019-04-07 20:41:25 +08:00
Kubernetes Prow Robot
c3cc31797a
Merge pull request #75969 from rajansandeep/translationcheck
Fix translation from kube-dns to CoreDNS Config to skip invalid values
2019-04-01 22:44:35 -07:00