Commit Graph

60 Commits

Author SHA1 Message Date
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
4dc635d542 remove kube-dns translation for federation 2020-07-01 14:34:23 -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
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
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
Manjunath A Kumatagi
23153e3f04 loop through next entry in stubDomainData if proxyIP == 0 2019-04-14 20:14:01 -05: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
Sandeep Rajan
deadefd385 Fix translation to skip invalid values 2019-04-01 15:15:39 -04:00
aaa
112da093ed Define common sentences as constants
update pull request

update pull request

update pull request

update pull request

update pull request

update pull request
2019-03-21 18:56:42 -04:00
ducnv
e11916da8e kubeadm cleanup: master -> control-plane (cont.4) 2019-02-25 08:29:19 +07:00
Kubernetes Prow Robot
b8b689aae0
Merge pull request #72111 from rosti/reduce-initcfg
kubeadm: Reduce the usage of InitConfiguration
2019-01-29 14:01:07 -08:00
Rostislav M. Georgiev
80e2a3cf07 kubeadm: reduce the usage of InitConfiguration
For historical reasons InitConfiguration is used almost everywhere in kubeadm
as a carrier of various configuration components such as ClusterConfiguration,
local API server endpoint, node registration settings, etc.

Since v1alpha2, InitConfiguration is meant to be used solely as a way to supply
the kubeadm init configuration from a config file. Its usage outside of this
context is caused by technical dept, it's clunky and requires hacks to fetch a
working InitConfiguration from the cluster (as it's not stored in the config
map in its entirety).

This change is a small step towards removing all unnecessary usages of
InitConfiguration. It reduces its usage by replacing it in some places with
some of the following:

- ClusterConfiguration only.
- APIEndpoint (as local API server endpoint).
- NodeRegistrationOptions only.
- Some combinations of the above types, or if single fields from them are used,
  only those field.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2019-01-28 12:21:01 +02:00
Sandeep Rajan
c346ae1e49 Use forward plugin instead of proxy in the default configuration 2019-01-24 17:28:55 +05:30
fabriziopandini
c9302caf6c error-imports-cleanups 2019-01-03 13:25:18 +01:00
fabriziopandini
6759334f6e add DNS struct to kubeadm config 2018-11-10 17:27:39 +01:00
yuexiao-wang
cc303c8774 [kubeadm/app/]switch to github.com/pkg/errors
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:24 +08:00
Rostislav M. Georgiev
68ed2bdd35 kubeadm: Use GetGenericImage for kube-dns
As kube-dns transitioned to fat manifests, it's no longer required to use arch
suffixed images. This change makes use of fat manifests for kube-dns and
removes the last few calls to the GetGenericArchImage function, thus removing
GetGenericArchImage too.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-09-19 17:23:15 +03:00
Sandeep Rajan
989f6667d2 prep for 1.12 2018-08-30 11:43:36 -04:00
Lucas Käldström
52f0591ad9
Automated rename from MasterConfiguration to InitConfiguration 2018-07-09 04:55:02 +03:00
Lucas Käldström
f2dec305ad
Fix kubeadm init/upgrade --dry-run mode 2018-06-15 23:03:24 +03:00
Rostislav M. Georgiev
19d2bbbc98 kubeadm: Don't match DNS versions to K8s versions
Some code in kubeadm was designed with the intent, that in the future CoreDNS
and kube-dns versions will match to specific K8s versions. This code is not
functional, since it does not perform any version matching. As of this moment,
no version matching is planned and a lot of boilerplate code is left useless.
The solution is simple - remove the unneeded parts to simplify the flow.

Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-06-06 12:12:50 +03:00
Sandeep Rajan
fce42e0bf6 coredns to use gcr.io repo 2018-06-05 11:08:11 -04:00
Jason DeTiberus
08ba47b237
kubeadm - set CoreDNS FeatureGate to true by default 2018-05-15 14:00:00 -04:00
Kubernetes Submit Queue
de2f1faa55
Merge pull request #63782 from luxas/kubeadm_own_scheme
Automatic merge from submit-queue (batch tested with PRs 63272, 63782, 63715, 63811, 63803). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Stop installing kubeadm types in the generic, legacy scheme

**What this PR does / why we need it**:

Right now the kubeadm API types are (wrongly from a correctness perspective) installed in the "catch-all" and now legacy `pkg/api/legacyscheme`. Instead, we should use our own, kubeadm-specific `scheme` where our API types are registered. Doing this also cuts one dependency on the internal core API types.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Part of https://github.com/kubernetes/community/pull/2131

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews @sttts @liztio
2018-05-15 05:08:10 -07:00
Lucas Käldström
80a31d7a5a
Stop installing kubeadm types in the generic, legacy scheme 2018-05-14 18:11:30 +01:00
Sandeep Rajan
379c8e83da Improve coredns upgrade path 2018-05-09 12:37:22 -04:00
Sandeep Rajan
fbdeff5d4b Code Cleanup 2018-02-27 19:33:15 -05:00
Sandeep Rajan
8107f15571 use caddy for translation 2018-02-13 16:21:23 -05:00
Sandeep Rajan
d2e83a2b07 add federations translation 2018-02-13 16:21:23 -05:00
Sandeep Rajan
6d8459166d kube-dns configmap translate 2018-02-13 16:21:23 -05:00
xiangpengzhao
205cbf470e Update DNS version in kubeadm of 1.10 cycle. 2017-12-25 09:13:36 +08:00
Kubernetes Submit Queue
cfdf8ae231
Merge pull request #56565 from stewart-yu/fixTextErrorKubeadm
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix minor err in kubeadm

**What this PR does / why we need it**:
fix minor text error in kubeadm.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-12-22 06:12:38 -08:00
xiangpengzhao
7d919fbd0c Use apps/v1 API in kubeadm. 2017-12-19 11:44:19 +08:00
stewart-yu
f41f1887e2 Fix minor err in kubeadm 2017-12-18 18:36:06 +08:00
Dane LeBlanc
d626de113f Add brackets around IPv6 kube-dns liveness probe addrs
When a Kubernetes cluster is instantiated in IPv6-only mode
via 'kubeadm init ...', the liveness probes that are
configured by kubeadm for kube-dns currently use IP:port
strings of "::1:53" and "::1:10053". These IP:port strings should
instead include brackets around the ::1 IPv6 loopback address, e.g.
"[::1]:53" and "[::1]:10053".

This change adds the necessary brackets around the ::1 IPv6 loopback
address.

Without this change, the kube-dns sidecar container interprets the
bracket-less strings as IPv4 IP:port strings that have too many
colons, and the kube-dns pod is restarted about once every 2 minutes.

fixes #56543

/area ipv6
/sig network
2017-11-29 07:44:06 -05:00
xiangpengzhao
81c72826ef Move GetDNSIP to a "higher level" pkg. 2017-11-19 17:46:29 +08:00
madhukar32
359d81419c kubeadm: change in logic of getDNSIP 2017-11-15 23:11:28 +13:00