Commit Graph

36 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
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -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
deadefd385 Fix translation to skip invalid values 2019-04-01 15:15:39 -04:00
Rafael Fernández López
30dc43ff86
kubeadm: set priority class name to system-cluster-critical for all master components
Remove the deprecated `scheduler.alpha.kubernetes.io/critical-pod` pod annotation and use
the `priorityClassName` first class attribute instead, setting all master components to
`system-cluster-critical`.
2019-02-12 17:50:36 +01:00
fabriziopandini
446d80693c autogenerated 2018-11-10 17:27:51 +01:00
yuexiao-wang
c0a9b4d04d add BUILD
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-10-30 16:23:52 +08:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07: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
Lucas Käldström
8074a1987e
autogenerated bazel 2018-05-14 18:12:31 +01:00
Kubernetes Submit Queue
c444954d9c
Merge pull request #58828 from rajansandeep/configtranslate
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>.

Kube-dns configmap translation to CoreDNS

**What this PR does / why we need it**:
Translation of kube-dns ConfigMap (StubDomains and UpstreamNameserver) to equivalent Proxy in CoreDNS.

**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 kubernetes/kubeadm#662

**Special notes for your reviewer**:

Currently, the translation is done as follows:
Example ConfigMap of kube-dns.
```
apiVersion: v1
data:
  federations: |
    {"foo" : "foo.feddomain.com"}
  stubDomains: |
    {"abc.com" : ["1.2.3.4"], "my.cluster.local" : ["2.3.4.5"]}
  upstreamNameservers: |
    ["8.8.8.8", "8.8.4.4"]
kind: ConfigMap
metadata:
  creationTimestamp: 2018-01-22T20:21:56Z
  name: kube-dns
  namespace: kube-system
```

CoreDNS Corefile after translation.

```
   .:53 {
        errors
        health
        kubernetes cluster.local  in-addr.arpa ip6.arpa {
           upstream  8.8.8.8 8.8.4.4
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
        }
       federation cluster.local {
           foo foo.feddomain.com
        }
        prometheus :9153
        proxy .  8.8.8.8 8.8.4.4
        cache 30
    }
    abc.com:53 {
        errors
        cache 30
        proxy . 1.2.3.4
    }
    my.cluster.local:53 {
        errors
        cache 30
        proxy . 2.3.4.5
    }
```



**Release note**:

```release-note
Kubeadm: CoreDNS supports migration of the kube-dns configuration to CoreDNS configuration when upgrading the service discovery from kube-dns to CoreDNS as part of Beta. 
```
2018-03-05 06:56:48 -08:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Sandeep Rajan
8107f15571 use caddy for translation 2018-02-13 16:21:23 -05:00
Sandeep Rajan
6d8459166d kube-dns configmap translate 2018-02-13 16:21:23 -05:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
xiangpengzhao
88f609fe4d Auto generate BUILD files. 2017-12-19 11:44:19 +08:00
xiangpengzhao
41281b727f Auto generated BUILD files. 2017-11-19 17:39:57 +08:00
madhukar32
359d81419c kubeadm: change in logic of getDNSIP 2017-11-15 23:11:28 +13:00
Dr. Stefan Schimanski
bec617f3cc Update generated files 2017-11-09 12:14:08 +01:00
Sandeep Rajan
f3dc622032 adding coredns as a featuregate 2017-11-07 12:32:42 -05:00
Dr. Stefan Schimanski
cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Kubernetes Submit Queue
7c9e614cbb Merge pull request #52873 from ixdy/bazel-cleanup
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>..

bazel: build/test almost everything

**What this PR does / why we need it**: Miscellaneous cleanups and bug fixes. The main motivating idea here was to make `bazel build //...` and `bazel test //...` mostly work. (There's a few reasons these still don't work, but we're a lot closer.)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

/assign @BenTheElder @mikedanese @spxtr
2017-09-24 00:04:36 -07:00
Jeff Grafton
02fb4200dc Use buildozer to delete licenses() rules 2017-09-21 15:53:22 -07:00
Jeff Grafton
532bd482df Use buildozer to remove deprecated automanaged tags 2017-09-21 15:53:22 -07:00
Serguei Bezverkhi
834a02e673 Switching to apps/v1beta2
Closes https://github.com/kubernetes/kubeadm/issues/390
2017-09-15 18:48:17 -04:00
Lucas Käldström
6bc8ab3725
kubeadm: Use kube-dns manifests based on the kubernetes version 2017-08-20 11:30:07 +03:00
Lucas Käldström
8c5c3ca197
autogenerated bazel 2017-08-15 15:52:49 +03:00
Andrew Rynhard
8947726f6a Update bazel 2017-08-14 08:15:54 -07:00
Andrew Rynhard
bbbf530504 Refactor addons into multiple packages 2017-08-14 07:57:20 -07:00