diff --git a/hack/dump-coredns-manifests.sh b/hack/dump-coredns-manifests.sh new file mode 100755 index 0000000000..50246a5389 --- /dev/null +++ b/hack/dump-coredns-manifests.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +set -o errexit +set -o pipefail +set -o nounset + +resources=( + service/kube-dns + serviceaccount/coredns + configmap/coredns + deployment.apps/coredns + clusterrole.rbac.authorization.k8s.io/system:coredns + clusterrolebinding.rbac.authorization.k8s.io/system:coredns +) + +## it turns out `--export` is going away, and it doesn't support +## RBAC objects, so here is a custom stripper for all of our needs +kubectl \ + --namespace=kube-system \ + --output=json \ + get "${resources[@]}" \ + | jq -S . \ + | jq ' + del(.metadata) | + del(.items[].metadata.uid) | + del(.items[].metadata.selfLink) | + del(.items[].metadata.generation) | + del(.items[].metadata.resourceVersion) | + del(.items[].metadata.creationTimestamp) | + del(.items[].metadata.annotations["kubectl.kubernetes.io/last-applied-configuration"]) | + del(.items[].metadata.annotations["deployment.kubernetes.io/revision"]) | + del(.items[].spec.clusterIP) | + del(.items[].secrets) | + del(.items[].status) + ' diff --git a/hack/dump-default-addons.sh b/hack/dump-default-addons.sh index 57e940d847..38fa74ed8f 100755 --- a/hack/dump-default-addons.sh +++ b/hack/dump-default-addons.sh @@ -5,10 +5,14 @@ set -o pipefail set -o nounset resources=( + daemonset.apps/kube-proxy service/kube-dns + serviceaccount/coredns + configmap/coredns + deployment.apps/coredns + clusterrole.rbac.authorization.k8s.io/system:coredns + clusterrolebinding.rbac.authorization.k8s.io/system:coredns daemonset.apps/aws-node - daemonset.apps/kube-proxy - deployment.apps/kube-dns crd.apiextensions.k8s.io/eniconfigs.crd.k8s.amazonaws.com clusterrole.rbac.authorization.k8s.io/aws-node clusterrolebinding.rbac.authorization.k8s.io/aws-node @@ -20,6 +24,7 @@ kubectl \ --namespace=kube-system \ --output=json \ get "${resources[@]}" \ + | jq -S . \ | jq ' del(.metadata) | del(.items[].metadata.uid) | @@ -28,5 +33,7 @@ kubectl \ del(.items[].metadata.resourceVersion) | del(.items[].metadata.creationTimestamp) | del(.items[].metadata.annotations["kubectl.kubernetes.io/last-applied-configuration"]) | + del(.items[].metadata.annotations["deployment.kubernetes.io/revision"]) | + del(.items[].secrets) | del(.items[].status) ' diff --git a/pkg/addons/default/assets.go b/pkg/addons/default/assets.go index c8cd97c48e..081b2c24b0 100644 --- a/pkg/addons/default/assets.go +++ b/pkg/addons/default/assets.go @@ -2,7 +2,8 @@ // sources: // assets/aws-node-1.10.yaml // assets/aws-node.yaml -// assets/coredns.yaml +// assets/coredns-1.11.json +// assets/coredns-1.12.json // DO NOT EDIT! package defaultaddons @@ -110,22 +111,42 @@ func awsNodeYaml() (*asset, error) { return a, nil } -var _corednsYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x57\x5b\x6f\xdb\x3a\x12\x7e\xf7\xaf\x20\xf4\xbc\x52\xec\x26\xe9\x66\xf9\xd6\xda\xde\xae\x81\xd6\x35\xe2\xa4\x2f\x8b\x45\x30\xa6\xc6\x16\xd7\x14\xc9\xe5\xc5\xb5\xbb\xe7\xfc\xf7\x03\xea\x66\x4a\x71\x8a\x14\x2d\x70\x8e\x9e\x24\x72\xf8\xcd\x70\x2e\xdf\x8c\x40\xf3\x2f\x68\x2c\x57\x92\x92\xc3\x64\xb4\xe7\x32\xa7\x64\x8d\xe6\xc0\x19\xbe\x63\x4c\x79\xe9\x46\x25\x3a\xc8\xc1\x01\x1d\x11\x22\xa1\x44\x4a\x98\x32\x98\x4b\xdb\x7c\x5b\x0d\x0c\x29\xd9\xfb\x0d\xa6\xf6\x64\x1d\x96\x23\x42\x04\x6c\x50\xd8\x70\x84\x10\xdc\xdb\x0c\x4a\xf8\xa6\x24\x7c\xb5\x19\x53\xe5\x15\x53\xa5\x56\x12\xa5\x8b\xb1\x08\xd9\xdf\xd9\x14\xb4\x6e\xb0\xc2\x6a\x9a\xa6\xa3\xd8\x46\xb3\x01\x96\x81\x77\x85\x32\xfc\x1b\x38\xae\x64\xb6\xbf\xb3\x19\x57\x57\x87\xc9\x06\x1d\xb4\x57\x98\x0a\x6f\x1d\x9a\x7b\x25\xb0\x67\x7f\x6c\x56\x50\x62\x24\x3a\xac\xce\x6f\x94\x72\xd6\x19\xd0\x9a\xcb\x5d\xad\x28\xcd\x71\x0b\x5e\x38\xfb\xb3\xb7\x68\xfd\x56\x7b\x87\xb6\xc2\xc6\x0b\xb4\x74\x94\x12\xd0\xfc\x83\x51\x5e\x57\x86\xa5\x24\x49\x46\x84\x18\xb4\xca\x1b\x86\xcd\x1a\xca\x5c\x2b\x2e\x2b\x5b\x52\x62\xeb\x08\xd5\x1f\x5a\xe5\xf5\x4b\x17\x8c\xf0\x79\x40\xb3\x69\xce\x0a\x6e\x5d\xf5\xf2\x15\x1c\x2b\x5e\xa7\x4f\xaa\x7c\x08\xb3\x43\xf7\x2b\xe2\xf1\x9e\xcb\x9c\xcb\x5d\x2f\x2c\x20\xa5\x72\xd5\xf1\x26\x36\x97\x70\x7b\xe1\x02\xef\x94\xd7\x39\x38\xa4\x24\x71\xc6\x63\xf2\x97\x8b\xae\x12\x78\x8f\xdb\xea\x7a\x8d\xbf\xbf\xe3\xaf\x11\x21\xcf\x33\xf7\x05\x64\xeb\x37\xff\x45\xe6\xaa\xd4\xb9\x58\xb1\xaf\xae\xd3\x61\x38\x3b\x0a\x98\x2a\xb9\xe5\xbb\x4f\xa0\xff\xd4\xea\x6f\xf5\x4e\x95\xc1\x2d\x17\x48\xc9\x6f\x95\x64\x46\x6f\xaf\xc9\xff\xab\xd7\x4a\x83\x31\xca\xd8\xee\xb3\x40\x10\xae\xe8\x3e\xcf\x89\x40\x58\xed\xdb\x4c\x28\x06\x22\x02\x20\x55\x0d\x11\x2e\x2d\x32\x6f\x30\x5a\xf7\xda\x3a\x83\x50\x46\x4b\x5b\x10\xc2\x15\x46\xf9\x5d\x41\xb8\x4c\x21\xcf\x4d\x06\x46\x03\xe1\xfa\x6d\xf5\xd2\xc9\xfe\xde\xbd\x69\xa3\x4a\x74\x05\x7a\x4b\xe8\x3f\x26\xb7\xd7\xf1\xc6\xf1\x44\x32\x72\x85\x8e\x5d\x85\x12\x14\x87\x8c\x29\xb9\xed\x04\x18\xb0\x02\xc9\xf5\x78\x54\x03\x0e\x03\x86\x47\x87\x32\xbc\xda\x41\xc1\xcd\x50\x0b\x75\x2a\xf1\x57\xf0\xf7\xa5\x94\x1f\x16\x58\x0d\x9c\x84\x48\xcd\x96\xeb\xe4\xf5\x91\xb7\x1a\x19\xad\xf8\x47\x0b\xce\xc0\x52\xf2\x66\x44\x48\xa8\x55\x87\xbb\x53\x6d\x80\x3b\x69\xa4\xe4\x5e\x09\xc1\xe5\xee\xb1\xaa\xfa\x9a\x25\xe2\x15\xda\xf8\xac\x84\xe3\xa3\x84\x03\x70\x01\x9b\x90\x32\x93\x00\x87\x02\x99\x53\xa6\x96\x29\x03\x0d\x7e\x8c\x2e\xf8\xd2\x15\x5f\x9d\xbc\x0e\x4b\x2d\x3a\x1b\x62\x87\x87\x47\xf4\x54\xbd\xac\xec\x07\x6a\xa5\xf5\x5a\xf5\xde\x2b\xfe\xe5\x20\xc2\x75\x96\x71\x65\xb8\x3b\x4d\x05\x58\xbb\x8c\x28\x25\x0d\x34\x9f\x32\xc3\x1d\x67\x20\x1a\x69\xd8\x6e\xb9\xe4\xee\x74\x36\x38\x48\xbd\x7b\xb6\x1a\x62\xf6\x3f\xcf\x0d\xe6\x33\x6f\xb8\xdc\xad\x59\x81\xb9\x0f\x01\x59\xec\xa4\xea\x96\xe7\x47\x64\x3e\x30\x5d\x7c\xb2\xc6\x5c\x37\x61\x79\x40\x53\xda\xfe\x76\x5a\x47\x69\x7e\xd4\x06\xad\x3d\x37\x86\x58\x62\x8f\x27\x4a\x92\x90\xf5\x83\xe6\xa0\x6c\x32\x10\x26\x44\x69\x34\x10\x52\x80\x2c\xe4\xb3\xcd\x03\x08\x8f\xcf\x34\xd4\xbd\x53\xfa\xe3\xeb\x35\x83\x61\xc5\x2f\xd3\x0d\x65\xfe\xf6\xa6\x59\x77\x4a\x04\x8c\xd8\x11\xad\x19\xd3\x26\x7c\xef\xf2\x5c\x49\xfb\x59\x8a\xd3\xd9\x82\xb3\xe6\x64\x7e\xe4\xd6\x75\x8e\x61\x4a\x3a\xe0\x12\x4d\x04\x37\x24\x87\xfa\xe1\x25\xec\x90\x92\xb7\xe3\x37\x37\xe3\xc9\xe4\xe6\xfa\xe6\xf6\x4d\x96\xef\x4d\x86\xcc\x64\xf7\xf3\x0f\x8b\xcf\xcb\x41\xca\xe2\xde\x5e\x35\x20\xf4\x30\xc9\x26\xd9\x75\x1f\x6b\xe5\x85\x58\x29\xc1\xd9\x89\x92\xc5\x76\xa9\xdc\xca\xa0\xc5\xaa\x6d\xd5\x4f\x6f\x14\x69\x1f\xc1\x4b\xee\x06\x6e\x2a\xb1\x54\xe6\x44\xc9\xe4\xef\xe3\x4f\x7c\x90\x97\x68\x87\xd2\x4c\x7b\x4a\x26\xe3\x71\x79\x11\xa3\x07\x01\x66\x67\x29\xf9\x37\x49\xd2\x40\xc6\xc9\xdf\x48\x52\x11\x74\x73\xab\xab\xb6\x1f\x25\xe4\x3f\xdd\x91\x83\x12\xbe\xc4\x4f\xa1\x04\x23\xbd\x67\xa7\x86\x7e\x9a\xd6\x42\x91\xfe\x32\xc8\xaf\xc0\x15\x94\xc4\x1a\x7a\x77\x81\x3c\xc4\x94\x92\x30\xe5\x9c\x1b\x87\x32\x7d\x3d\x5d\x40\x57\xca\x38\x4a\xa2\x1e\xd3\xb2\x7e\x1f\x57\x1b\xe5\x14\x53\x82\x92\xc7\xd9\xea\x47\x71\x52\xc7\xf4\x45\xac\x87\xe9\x77\xb0\x7a\x9d\xaf\x45\x2b\xd1\x19\xce\x2e\x5b\x16\xa3\x55\xad\x39\x70\x98\x92\x0e\x8f\x2e\x0e\x2d\x08\xa1\xbe\xae\x0c\x3f\x70\x81\x3b\x9c\x5b\x06\xa2\xaa\x14\x1a\x7a\xb5\x8d\xdd\xcd\x40\xc3\x86\x0b\xee\xf8\xb0\xe2\x20\xcf\x87\x04\xb4\x9c\x3f\x3c\xbd\x5f\x2c\x67\x4f\xeb\xf9\xfd\x97\xc5\x74\xde\xdb\xce\x8d\xd2\xc3\x03\x20\xc4\x85\xc0\xdd\x2b\xe5\xfe\xc9\x05\x36\x43\x5c\x3f\x8c\x82\x1f\x50\xa2\xb5\x2b\xa3\x36\x18\xe3\x15\xce\xe9\x0f\xe8\xfa\x2a\x74\x9d\x28\x83\x01\x87\x34\xe9\x40\xc9\xdd\xf8\x6e\xdc\x5b\xb6\xac\xc0\xe0\xe4\x7f\x3d\x3c\xac\xa2\x8d\x40\xe4\x1c\xc4\x0c\x05\x9c\xd6\xc8\x94\xcc\x6d\x28\xf0\x48\xc2\xf1\x12\x95\x77\xdd\xe6\x6d\xb4\x67\x3d\x63\x68\xed\x43\x61\xd0\x16\x4a\xe4\x75\x8b\x6d\x9f\x2d\x70\xe1\x0d\x46\xbb\xed\xd9\x5c\xda\xb6\xec\x67\xf5\xe8\xdd\x6c\xd4\x55\xf1\x03\x55\xc3\xda\xe9\x74\xd0\x52\x2e\xf2\x57\x75\x61\x87\xcf\x1b\x4c\xc5\x9e\x6d\x29\x0f\xe8\xb7\xf6\x74\xb7\xf9\xe2\x9c\xdc\x0c\xde\x17\x66\xac\xc1\xef\xc1\xc5\x21\xeb\xd9\x6f\xcf\x79\x4e\x0c\xcd\xa4\x0e\x6a\x12\xca\x26\xb9\xb0\x6d\x99\x01\xfd\xe2\xef\xcf\x2b\x66\xb6\x66\x1c\x4e\x9b\x01\x22\x42\xfa\xe9\xe9\xae\xd3\xda\x0e\x2a\xfd\x09\xec\x92\x75\x8d\x35\x8b\x15\x25\xb3\xe5\xfa\x69\xfa\xf1\x71\xfd\x30\xbf\x7f\x5a\x84\xc4\xed\xd8\x2e\x1d\x70\x99\x8e\x49\x6a\x48\x69\xe9\x05\xc2\x7a\xe1\x40\x60\x9a\x3f\x02\x00\x00\xff\xff\x17\xfe\xaa\x4f\x0c\x11\x00\x00") +var _coredns111Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x19\xc9\x72\x1b\xb9\xf5\xae\xaf\xe8\xea\xb3\x49\x91\xd6\x62\x85\x37\x8d\xa4\x78\x54\x65\x29\x2c\x49\x9e\x4b\xec\x9a\x7a\x44\x3f\x92\x88\xd0\x00\x82\x85\x12\xc7\xa5\x7f\x4f\xa1\xf7\x05\x68\x92\x8a\x27\x49\x55\x78\xb0\x5b\x78\x6b\xbf\xfd\xa1\x7f\x1c\x45\x51\x0c\x92\xfe\x86\x4a\x53\xc1\xe3\x59\x14\x6f\xa6\xf1\x07\x77\x4a\x0d\xa6\x3a\x9e\x45\x7f\x3f\x8a\xa2\x28\xfa\x91\xfd\x1b\x42\xce\x20\xcf\x94\x27\xee\xec\x11\xd5\x86\x12\xac\x01\x29\x1a\x48\xc0\x40\x3c\xab\xd8\x38\x46\x9c\x0b\x03\x86\x0a\xae\x5b\x80\x28\x8a\xa5\x12\x29\x9a\x35\x5a\x3d\xa6\xe2\x58\x0a\x65\x1c\xdf\xbf\x4c\xcf\x4e\x2a\xa6\x1e\x3c\x4d\x14\x48\x74\x98\x46\x59\x8c\x2b\xc4\xb7\x9a\x26\x66\xb0\x40\xd6\x93\x87\xcf\x7a\x0c\x29\xfc\x21\x38\xbc\xe8\x31\x11\xe9\x31\x11\xa9\x14\x1c\x79\x26\xf8\xd9\x2e\x70\x94\x70\xdd\x16\xfe\x7c\xa1\x47\x20\xe5\x00\x82\x5d\xa0\xe2\x68\x30\xd3\x8e\x30\xab\x0d\xaa\x91\x2e\xac\x53\xaa\x39\x40\xc2\x21\xcd\xf0\xae\x84\xc2\xeb\xfb\x47\xff\x1b\x95\x48\x1e\x1d\x32\x98\x96\x40\x6a\x04\xbd\xd5\x06\xd3\x92\x53\xc5\x27\xd6\x12\x49\xdb\x3d\xce\xea\xb5\xfb\xf3\x5f\xd3\x68\x0d\xd1\xdd\x37\x2f\xa8\xe3\x59\x74\x76\xd2\x3d\x57\xc2\x08\x22\x98\x23\xfb\x7a\x3d\xef\x92\x19\x50\x2b\x34\xf3\x92\xb8\x01\x7c\xfb\xb0\x97\x1e\x23\x43\xe4\x7b\x74\x79\xba\x3a\x44\x97\xea\xf9\x7b\xc3\xd8\x1a\x19\x12\x23\x54\x37\xb8\x7c\x71\xe2\xf5\xa4\x46\xed\xd2\xea\x72\xb9\xa4\x9c\x9a\xad\x23\xb8\x17\xbc\x19\x21\xb1\xd9\xe6\x01\x7e\x95\x07\xd3\xed\xbc\xf2\xe4\x51\x83\xdb\xe1\xb9\x7a\x49\x88\xb0\xdc\xec\x4a\xd9\x77\x65\x0f\x11\x0a\xf7\x4a\x9e\xc1\xf0\xee\x73\xd9\x1d\xdd\x07\xda\xa4\xff\xbe\x2e\xf1\x96\x94\x65\x02\xc6\xb3\xb3\x93\xe8\xc7\x37\xee\x00\xa8\x94\x50\x3a\x7f\x5e\x23\x30\xb3\xce\x9f\xeb\xf4\x8d\x8a\x74\x1f\x33\x41\x80\x45\x94\x8f\x20\x49\xd4\x18\x94\x84\x88\xca\xf3\xfc\xa1\xe0\x16\x45\x52\x24\x3a\xa2\x5c\x23\xb1\x0a\xcb\x43\x2b\xb5\x51\x08\x69\xf9\xf7\x12\x18\x33\x6b\x25\xec\x6a\xed\xe7\x97\x23\xbe\xe5\xff\xd5\xa5\x31\x9a\xb9\xc2\x59\x9d\xbe\x6e\xa3\x71\x74\x8c\x86\x1c\x2b\xd4\x82\x6d\xc6\x44\xf0\x65\x0e\x25\x40\xd6\x18\x9d\x4c\xbe\xf1\xb7\x6f\xbc\x5f\x23\xca\x98\xb9\x12\x7c\x49\x57\x77\x20\xff\xff\xc2\x05\xa4\xd4\xc7\xbe\x3c\xba\x46\xc9\xc4\x36\xc5\xdd\x39\xd4\x69\x7b\xff\x76\x73\xda\xdb\x5e\x3f\xab\xd1\xbc\xc7\xb4\x43\x7d\x46\x89\x95\x42\xad\xaf\x11\x12\x46\x39\x3e\x22\x11\x3c\x71\x56\xf8\x38\x3d\xfd\x74\x7a\x71\x72\x7e\xfa\xa9\x21\x4a\xa1\x64\x94\x40\x06\x6f\x1d\x6f\xa8\x73\xd2\xaf\x54\x1b\xa1\xb6\x5f\x68\x4a\x9d\x75\xa6\x93\x3d\x0a\x74\x0a\x86\xac\xbf\xf8\x6c\xff\x3e\xeb\xef\x8a\xd7\x66\x03\x69\xd5\x7f\xa3\xc0\xe0\x6a\xdb\xd5\x4f\x09\xc6\x28\x5f\x7d\x95\x09\x18\xec\x6b\x98\xc2\xeb\xa3\x55\x2b\x07\x99\x7e\xe8\x81\xbe\x72\xd8\x00\x65\xb0\xc8\xaa\xd8\x34\xd4\x51\xab\xce\xf2\xd0\x12\xe6\xd5\xd3\x60\x2a\x59\x5f\x15\x7f\xbc\x67\x10\xa2\x30\x8b\xf8\x27\x9a\xa2\x36\x90\x3a\xc3\x70\xcb\x58\x47\x5d\x6f\xfc\xbf\xdf\x0b\xbb\xfd\xd0\xf4\x44\xd7\x20\xbd\x48\xcd\x4e\xa1\x6e\xce\x3d\x25\xb9\x48\xf0\x32\x0c\xcf\xa2\xf4\x9f\x96\x2a\x4c\xae\xad\xa2\x7c\xf5\x48\xd6\x98\x58\x67\xed\xdb\x15\x17\xd5\xf1\xcd\x2b\x12\x6b\xf2\x82\xd3\xe7\x51\xc8\x79\x2c\x62\xf9\x09\x55\xda\x9d\xd2\xea\x9f\x8f\x3c\xaa\x42\xfe\xe6\x55\xaa\x7c\xe4\x08\x73\x18\xe2\x92\x71\x7a\xc6\x6c\x50\x59\xa0\x81\x71\xbb\xa8\x88\xbe\x3f\x5a\x94\x42\xa2\x82\x3c\x1d\xe3\x5b\x3e\x8c\xbb\x01\x66\x71\x58\xcb\x0c\x8f\x51\x6e\x5f\xe3\x01\x9c\xef\x41\xd8\x5b\x58\x81\x77\x1a\x00\x14\x59\xff\xe7\x4d\x00\x69\x72\x7e\xfa\x4e\x13\x04\x20\x7e\x0a\x1f\x76\x1f\xb3\x8b\xd5\xfe\xbb\x63\xf4\x98\x08\x6e\x80\x72\x54\xbe\x17\xf5\x24\x14\xa8\x55\xc8\x24\xf1\xc8\x0d\x36\x5e\x9b\xc6\xd9\xf8\x53\x14\x8d\xe3\x6a\xc8\xeb\x61\x7e\xef\x13\xc7\x34\x85\xac\xd4\xc6\xe7\x93\x8f\xa7\x93\xe9\xf4\xf4\xe4\xf4\xec\xe3\x38\x79\x56\x63\x24\x6a\x8c\x76\xf4\x82\xda\x8c\xa6\x9d\x6a\x85\xcf\xba\x94\x37\xdb\x4c\xc7\xd3\xf1\x89\x47\xb1\x9c\xf7\xdc\x32\x36\x17\x8c\x92\x2c\xac\x6e\x97\xf7\xc2\xcc\x15\xea\xe6\x64\xd1\x20\x61\x74\x83\x1c\xb5\x9e\x2b\xb1\xe8\xf7\x86\x02\x69\x09\x94\x59\x85\x4f\x6b\x85\x7a\x2d\x98\x1b\x58\xce\xbc\x76\x59\x1b\x23\x3f\xa3\x09\xf0\x71\xcd\x1a\xcc\xda\xa9\x75\x9c\x4f\xbd\x81\x88\x2d\x37\xae\x8b\xc9\xc5\x24\x80\xa1\xc9\x1a\xf3\x71\xe2\xd7\xa7\xa7\xb9\x2f\x5c\xbd\xf9\x18\xbb\xe2\x4a\x81\x5d\x23\x83\x6d\x3d\x29\x9c\x7b\xc5\xc4\x12\x15\x15\x49\x8d\x36\xf5\xa3\x69\x4b\x08\x6a\xdd\x34\xcf\xd4\x8b\x68\x68\x8a\xc2\x9a\x9a\xe1\x59\x3f\xdc\x3d\x3e\x0a\x0f\x4e\xb5\xa6\x9e\x65\xbb\xfc\x05\x5c\x51\xa5\xca\xdc\xbf\xde\xf6\xc4\xfb\x45\x47\xbe\xad\x7c\x5f\x77\xfc\x44\xd5\x3c\x8b\xbb\x57\x3d\xb7\xa8\xff\x64\xf5\xdc\x7a\xb4\x43\xc1\x14\x8d\xa2\x64\x2f\xfb\x85\x14\xdc\xab\xba\xb8\x95\xcc\x2a\x82\xbe\x21\x28\xca\xf3\x3d\xa5\x26\x04\xcd\x66\xb0\x54\xa8\xac\x72\x4c\x3f\x4d\xee\xe8\xfe\x89\xe5\x46\x13\xd4\x43\xac\x89\xb4\x19\xdf\xc9\x24\x0d\xd9\xa1\x96\x1e\x14\xbe\x57\xc6\x64\x8b\x30\x35\xdb\x2b\xc1\x0d\xbe\x86\xea\x51\x0c\x8c\x89\x97\xb9\xa2\x1b\xca\x70\x85\x37\x9a\x00\x83\x62\x70\x5a\x02\xd3\xe8\x7d\x51\x02\x12\x16\x94\x51\x43\x83\x56\x76\xac\x93\x64\xa0\xd5\xc6\xf7\x37\x4f\xbf\xff\x72\x7b\x7f\xfd\xfb\xe3\xcd\xc3\x6f\xb7\x57\x37\xfe\x7e\xeb\xf1\x70\x46\x9d\x28\x21\x87\xb8\x03\x63\x01\x86\x07\xb8\x13\x92\xbf\x71\xb6\x7d\x10\xc2\xfc\x95\x32\x2c\xf6\xb1\x59\x64\x94\xc5\xbd\x7c\x60\x50\xa5\x94\x67\xf6\xbc\x43\xad\x5d\x67\x2a\x8b\x7f\x82\x9b\xe3\x06\x78\xc4\xc4\xca\x57\xd4\x3c\x1c\xaa\xbe\xe6\x74\xf2\xd1\x6c\x04\xb3\x29\xde\x09\xcb\x0f\xad\x87\xa9\xa3\xa9\x54\x6c\x34\xf8\x50\xb0\xd6\x65\x99\x2f\xe9\x6a\x94\x4b\x0e\x21\x97\xf6\x0c\x59\xd0\x9b\xe0\x83\xa3\x4f\x27\x38\x5c\x0d\xac\xcd\x73\x8d\x4b\xb0\xac\xdb\xf1\x63\xa9\xa8\xc8\xf2\x82\x81\xd6\xf7\x85\xfe\xb9\x6b\x47\x6e\x2b\x18\x11\x45\x0d\x25\xc0\xba\x84\xca\xad\x5d\xca\xd4\x02\x2e\xd9\x0b\x6c\x7b\x6b\xab\xce\x37\x12\x54\x25\xef\x24\xd7\x63\x54\x01\x7a\x14\xfd\x4c\xed\xce\x74\xba\x7d\xc5\x18\x5e\x9a\xdb\x88\xf7\x83\x5d\xb3\x19\x5c\x9f\x15\x10\x9c\x77\x7a\xfd\xc9\xa4\x4b\x20\x98\x1b\xb6\x03\xdb\x8e\x67\xb6\x2c\x06\xfb\xab\xc2\xa4\x97\x49\x22\xb8\xce\x62\xc0\x13\xb7\xcd\x49\xfe\xe6\x95\xba\x42\x7a\x90\xf7\xf3\xe8\xdb\x53\x33\x52\x5d\xc0\x05\x0a\x63\xe1\xb6\x3b\x91\x38\x13\x9e\x7e\xf4\xcf\x3d\xed\x0f\x3c\xdd\x5f\x70\x77\x2c\xed\x52\x8e\xcd\xa1\xad\xa5\x1a\x16\xc3\x03\x76\x14\x5a\x23\xbc\xfa\x76\xe7\xa8\x03\x87\xaf\x66\x96\x0f\xfb\xe6\xc8\x07\x29\x9f\xf6\xb9\x26\x54\x0b\x20\x63\xb0\x66\x2d\x14\xfd\x23\x8b\xb9\xf1\xf3\x45\xb6\x13\xfa\xee\x0e\x8b\xcb\xfc\x07\xc1\x76\x7e\x33\xfb\xaf\xdd\x10\x2e\x84\x30\xda\x28\x90\x92\xf2\x55\xf9\x8a\xa3\x22\xce\x76\xdc\xc5\xe6\x05\x6a\xd6\x71\x5b\x7d\x27\xa8\x2c\xeb\x44\x7e\xeb\xed\x40\xd2\xcf\x4a\x58\xd9\x0f\xd5\xb8\xe9\xc7\x56\xcc\xb4\x06\xa9\x0e\x11\xf2\x44\x0a\xea\xfa\x8b\xbf\xfe\x78\xbe\x65\x25\xbd\xb3\xea\xc6\x53\x87\x75\xd8\xa0\x5a\x78\xe4\x33\xaa\x7b\x85\xfd\x05\x0c\x59\xb7\x38\xf9\x2c\xfa\xa7\x9a\xc5\xf5\x8f\xc3\x5f\x66\x85\x26\xa0\xf6\x51\xf3\xe4\x4f\x4a\x97\x5f\x28\x4f\x5c\x3c\xbe\xff\x4b\xb3\x4f\x74\xfb\x12\xc7\x1a\x61\xcb\x9b\xd7\x9f\xfd\x61\xf9\x7f\x3e\x33\x05\xc3\x07\x5c\x76\xac\x59\x04\xde\xa0\xe7\x9a\x5f\x07\x86\xea\xdc\x01\xca\x68\xbb\xf8\x07\x12\x33\x50\x29\x76\x7c\xd4\x8c\x76\x2d\xe3\x3b\xbf\x63\xf4\xc2\xfa\xa8\x48\x93\x4a\xf4\x17\x97\xdc\x47\x6f\x47\xff\x0a\x00\x00\xff\xff\x48\xb8\xdf\xe8\x58\x21\x00\x00") -func corednsYamlBytes() ([]byte, error) { +func coredns111JsonBytes() ([]byte, error) { return bindataRead( - _corednsYaml, - "coredns.yaml", + _coredns111Json, + "coredns-1.11.json", ) } -func corednsYaml() (*asset, error) { - bytes, err := corednsYamlBytes() +func coredns111Json() (*asset, error) { + bytes, err := coredns111JsonBytes() if err != nil { return nil, err } - info := bindataFileInfo{name: "coredns.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + info := bindataFileInfo{name: "coredns-1.11.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var _coredns112Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe4\x59\x5b\x53\x23\xbb\x11\x7e\xe7\x57\x4c\xcd\xf3\xda\xd8\xdc\x96\xf8\x8d\x03\x64\x0f\x55\x0b\x71\x01\x7b\x5e\xb2\x5b\xa7\xda\x9a\xb6\xad\xa0\x91\x94\x96\xc6\xe0\xb3\xc5\x7f\x4f\x69\xee\x17\xcd\xd8\x10\x4e\x92\xaa\xf8\x61\x77\x90\x5a\xdd\x3d\xdd\x5f\xdf\x34\x3f\x0f\x82\x20\x04\xcd\x7f\x43\x32\x5c\xc9\x70\x16\x84\x9b\x69\xf8\xc9\xad\x72\x8b\xb1\x09\x67\xc1\xdf\x0f\x82\x20\x08\x7e\xa6\xff\xf6\x11\xa7\x3b\x4f\x5c\x46\x6e\xed\x01\x69\xc3\x19\x56\x1b\x31\x5a\x88\xc0\x42\x38\x2b\xd9\x38\x46\x52\x2a\x0b\x96\x2b\x69\x1a\x1b\x41\x10\x6a\x52\x31\xda\x35\x26\x66\xcc\xd5\xa1\x56\x64\x1d\xdf\xbf\x4c\x4f\x8f\x4b\xa6\x1e\x3a\xc3\x08\x34\x3a\x4a\x4b\x09\x86\x25\xe1\x6b\x75\x26\x14\xb0\x40\xd1\x91\x87\x4f\x66\x0c\x31\xfc\xa1\x24\x3c\x9b\x31\x53\xf1\x21\x53\xb1\x56\x12\x65\x2a\xf8\x29\x59\xe0\x28\x92\xa6\x29\xfc\xe9\xdc\x8c\x40\xeb\x01\x82\x64\x81\x24\xd1\x62\xaa\x1d\x13\x89\xb1\x48\x23\x93\x5b\xa7\x50\x73\xe0\x88\x84\x38\xa5\xbb\x54\x84\x57\x77\x0f\xfe\x37\x2a\x88\x3c\x3a\xa4\x7b\x46\x03\xab\x08\xcc\xd6\x58\x8c\x0b\x4e\x25\x9f\xd0\x68\x64\x4d\xf7\x38\xab\x57\xee\xcf\x7e\x75\xa3\xd5\x44\xb7\xdf\x3c\x3f\x1d\xce\x82\xd3\xe3\xf6\x3a\x29\xab\x98\x12\xee\xd8\xb7\xab\x79\xfb\x98\x05\x5a\xa1\x9d\x17\x87\x6b\x9b\xaf\x9f\xf6\xd2\x63\x64\x99\x7e\x8f\x2e\x8f\x97\x6f\xd1\xa5\x7c\xfe\x51\x33\xb6\x41\x81\xcc\x2a\x6a\x83\xcb\x87\x13\xaf\x27\x0d\x1a\x17\x56\x17\xcb\x25\x97\xdc\x6e\xdd\x81\x3b\x25\xeb\x08\x09\xed\x36\x03\xf8\x65\x06\xa6\x9b\x79\xe9\xc9\x83\x1a\xb7\xb7\xc7\xea\x05\x63\x2a\x91\x76\x57\xc8\xbe\x2b\x7a\x98\x22\xdc\x2b\x78\x06\xe1\xdd\xe5\xb2\x1b\xdd\x6f\xb4\x49\xf7\x7d\x5d\xe0\x2d\xb9\x48\x05\x8c\x67\xa7\xc7\xc1\xcf\xef\xd2\x6d\x20\x91\x22\x93\x3d\xaf\x11\x84\x5d\x67\xcf\x55\xf8\x06\x79\xb8\x8f\x85\x62\x20\x02\x2e\x47\x10\x45\x34\x06\xd2\x10\x70\x7d\x96\x3d\xe4\xdc\x82\x40\xab\xc8\x04\x5c\x1a\x64\x09\x61\xb1\x98\x68\x63\x09\x21\x2e\xfe\x5e\x82\x10\x76\x4d\x2a\x59\xad\xfd\xfc\x32\xc2\xd7\xec\xbf\x2a\x35\x06\x33\x97\x38\xcb\xd5\x97\x6d\x30\x0e\x0e\xd1\xb2\x43\x42\xa3\xc4\x66\xcc\x94\x5c\x66\xbb\x0c\xd8\x1a\x83\xe3\x49\xf6\x97\x50\x4a\x67\x4f\x84\x42\x41\x54\xac\x42\xb4\x00\x01\x92\xe1\x77\xf9\xfa\x5d\x76\x53\x49\x01\xad\x4b\x25\x97\x7c\x75\x0b\xfa\xff\x0f\x55\xa0\xb5\x39\xf4\x85\xdb\x15\x6a\xa1\xb6\x31\xee\x0e\xb5\x56\x75\xfc\xb7\x6b\xd8\xde\xf6\xfa\xa8\x7a\xf4\x1e\xd3\x0e\x95\x23\x52\x2b\x42\x63\xae\x10\x22\xc1\x25\x3e\x20\x53\x32\x72\x56\x38\x9a\x9e\x7c\x3e\x39\x3f\x3e\x3b\xf9\x5c\x13\x45\xa8\x05\x67\x90\xee\x37\x96\x37\xdc\x39\xe9\x57\x6e\xac\xa2\xed\x57\x1e\x73\x67\x9d\xe9\x64\x8f\x3c\x1e\x83\x65\xeb\xaf\x3e\xdb\xbf\xcf\xfa\xbb\xf0\x5a\xaf\x33\x8d\x32\x61\x09\x2c\xae\xb6\x6d\xfd\x48\x09\xc1\xe5\xea\x9b\x8e\xc0\x62\x57\xc3\x18\x5e\x1e\x12\x5a\xb9\x9d\xe9\xa7\xce\xd6\x37\x09\x1b\xe0\x02\x16\x69\xb2\x9b\xf6\x15\xde\xb2\x00\xdd\x37\x84\x79\xf5\xb4\x18\x6b\xd1\x55\xc5\x8f\xf7\x74\x87\x11\xa6\x88\x7f\xe4\x31\x1a\x0b\xb1\x33\x8c\x4c\x84\x68\xa9\xeb\xc5\xff\xfb\xbd\xb0\xdb\x0f\x75\x4f\xb4\x0d\xd2\x41\x6a\xba\x0a\x55\x0d\xef\x28\x29\x55\x84\x17\xfd\xfb\x29\x4a\xff\x99\x70\xc2\xe8\x2a\x21\x2e\x57\x0f\x6c\x8d\x51\xe2\xac\x7d\xb3\x92\xaa\x5c\xbe\x7e\x41\x96\xd8\x2c\xe1\x74\x79\xe4\x72\x1e\x72\x2c\x3f\x22\xc5\xed\x66\xae\xfa\xf9\x8e\x07\x25\xe4\xaf\x5f\x34\x65\x9d\x49\x3f\x87\x21\x2e\x29\xa7\x27\x4c\xfb\x99\x05\x5a\x18\x37\x93\x8a\xea\xfa\xa3\x71\x52\x69\x24\xc8\xc2\x31\xbc\x91\xc3\xb4\x1b\x10\x09\x0e\x6b\x99\xd2\x09\x2e\x93\x97\x70\x80\xe6\x47\xef\xde\x6b\xbf\x02\xef\x34\x00\x10\x5b\xff\xe7\x4d\x00\x71\x74\x76\xf2\x4e\x13\xf4\xec\xf8\x4f\xf8\xa8\xbb\x94\x6d\xaa\xe6\xdf\x2d\xa3\x87\x4c\x49\x0b\x5c\x22\xf9\x5e\xd4\x13\x50\x40\xab\x3e\x93\x84\x23\xd7\xff\x78\x6d\x1a\xa6\x5d\x52\x9e\x34\x0e\xcb\x5e\xb0\x43\xf9\xa3\x7b\x38\xe4\x31\xa4\xa9\x36\x3c\x9b\x1c\x9d\x4c\xa6\xd3\x93\xe3\x93\xd3\xa3\x71\xf4\x44\x63\x64\x34\xc6\x64\xf4\x8c\xc6\x8e\xa6\xad\x6c\x85\x4f\xa6\x90\x37\xdb\x4c\xc7\x47\xe3\x23\x8f\x62\x19\xef\x79\x22\xc4\x5c\x09\xce\x52\x58\xdd\x2c\xef\x94\x9d\x13\x9a\x7a\x67\x51\x3b\x22\xf8\x06\x25\x1a\x33\x27\xb5\xe8\xd6\x86\x9c\x68\x09\x5c\x24\x84\x8f\x6b\x42\xb3\x56\xc2\x35\x2c\xa7\x5e\xbb\xac\xad\xd5\x5f\xd0\xf6\xf0\x71\xc5\x1a\xec\xda\xa9\x75\x98\x35\xc7\x3d\x88\x2d\x06\xb3\xf3\xc9\xf9\xa4\x87\xc2\xb0\x35\x66\xed\xc4\xaf\x8f\x8f\x73\x1f\x5c\xbd\xf1\x18\xba\xe4\xca\x41\x5c\xa1\x80\x6d\xd5\x29\x9c\x79\xc5\x84\x1a\x89\xab\xa8\x22\x9b\xfa\xc9\x4c\xc2\x18\x1a\x53\x37\xcf\xd4\x4b\x68\x79\x8c\x2a\xb1\x15\xc3\xd3\x2e\xdc\x3d\x3e\xea\x6f\x9c\x2a\x4d\x3d\x33\x79\xf1\xeb\x71\x45\x19\x2a\x73\xff\x14\xdc\x11\xef\x17\x1d\xf8\x86\xf7\x7d\xdd\xf1\x81\xaa\x79\xe6\x7b\xaf\x7a\x6e\x9e\xff\x60\xf5\xdc\x14\xb5\x43\xc1\x18\x2d\x71\xb6\x97\xfd\xfa\x14\xdc\x2b\xbb\xb8\xc9\x2d\x21\x86\xbe\x26\x28\xc8\xe2\x3d\xe6\xb6\x6f\x37\xed\xc1\x62\x45\x69\xe6\x98\x7e\x9e\xdc\xf2\xfd\x03\xcb\xb5\x26\x68\x86\x58\x33\x9d\xa4\x7c\x27\x93\xb8\xcf\x0e\x95\xf4\x5e\xe1\x7b\x45\x4c\x3a\x2f\x73\xbb\xbd\x54\xd2\xe2\x4b\x5f\x3e\x0a\x41\x08\xf5\x3c\x27\xbe\xe1\x02\x57\x78\x6d\x18\x08\xc8\x1b\xa7\x25\x08\x83\xde\x17\x65\xa0\x61\xc1\x05\xb7\xbc\xd7\xca\x8e\x75\x14\x0d\x94\xda\xf0\xee\xfa\xf1\xf7\x5f\x6e\xee\xae\x7e\x7f\xb8\xbe\xff\xed\xe6\xf2\xda\x5f\x6f\x3d\x1e\x4e\x4f\x47\xa4\xf4\x10\x77\x10\xa2\x87\xe1\xde\xee\xd4\xa4\xd8\x6d\x7a\xf3\x93\x0e\xa7\x4b\x48\x84\xaf\x7e\xa4\x8e\x87\xe8\x6f\x52\x6c\xef\x95\xb2\x7f\xe5\x02\xf3\xc9\x6d\x16\x58\x4a\x70\x2f\x6f\x59\xa4\x98\xcb\xd4\xf2\xb7\x68\x8c\xab\x61\x45\x99\x88\x70\x73\x58\xdb\x1e\x09\xb5\xf2\xa5\x3f\x0f\x87\xb2\x02\x3a\x9d\x7c\x67\x36\x4a\x24\x31\xa6\xef\xf8\xc6\xcc\x19\xbb\x33\xa5\x8a\xb5\x56\xa0\x0f\xd6\x55\x02\x97\x4b\xbe\x1a\x65\x92\xfb\x88\x0b\x7b\xf6\x59\xd0\x9b\x0a\x06\x9b\xa4\x16\x8c\x5c\xb6\xac\xcc\xe3\xf7\x6d\xa8\x89\xab\x34\x82\x04\x18\x73\x97\xeb\x9f\xb9\x76\x54\x5c\x58\x33\xe2\x96\x33\x10\xed\xb3\xe4\x66\x34\xb2\x95\x8c\x0b\xf1\x0c\xdb\xce\x8c\x6b\xb2\xf1\x05\xa9\x60\x1f\x65\xaa\x8c\xca\x8d\xce\x89\x6e\x58\xb7\x1b\x40\xd3\xbc\xb6\xec\x9f\xb0\x9b\x84\x77\x83\x25\xb6\x8e\xaf\x2f\x04\x0c\xe7\xad\xc6\xe0\x78\xd2\x3e\xa0\x84\xeb\xcc\x7b\x46\x23\x4f\x23\x8a\xcb\x25\x32\x9b\xdd\xec\xe6\x73\x9d\x17\xb5\xf9\xb4\xe0\x46\xb8\x11\x29\x81\xad\x91\x21\x06\xe7\x99\x76\xf0\x77\x82\xce\xa3\x40\xce\xf8\x32\xf7\xe9\x45\x14\x29\x69\x52\x1c\x7a\xb4\xa8\xcf\x1d\xd7\x2f\xdc\xa5\xfd\x37\x21\x30\x8b\x80\x3d\x4d\xc3\xca\xeb\xc2\x9e\x34\x9e\xe3\xe6\x56\x45\xce\x87\x27\x47\xfe\x2e\xad\xf9\xd5\xaa\xfd\xeb\x9d\x74\x0b\xbb\x14\x4d\x7e\xdf\x8c\x55\xb6\xb6\xfd\xe3\x40\xd0\x37\xf4\x78\xf5\x6d\x77\x7d\x6f\x6c\x15\xeb\x99\x66\xd8\x37\x07\xbe\x9d\xe2\x69\x9f\x4b\x4d\x5a\x00\x1b\x43\x62\xd7\x8a\xf8\x1f\x29\xe8\xc7\x4f\xe7\x29\x1c\x7d\x37\x9d\xf9\x17\x8a\x7b\x25\x76\x7e\x08\xfc\xaf\xdd\x67\x2e\x94\xb2\xc6\x12\x68\xcd\xe5\xaa\x78\xc5\x51\x8e\xb3\x1d\x37\xc7\x59\x92\x9c\xb5\xdc\x56\xdd\x60\x52\x22\x5a\xc8\x6f\xbc\x1d\x68\xfe\x85\x54\xa2\xbb\x50\x0d\xeb\x7e\x6c\x60\xa6\xd1\xf6\xb5\x0e\xa1\x8c\xb4\xe2\xae\xc6\xf9\x13\xa0\xe7\x03\x5d\xd4\x59\x2b\xef\x67\x4d\xbf\x0e\x1b\xa4\x85\x47\xbe\xe0\xa6\x53\x5c\x9e\xc1\xb2\x75\x83\x93\xcf\xa2\x7f\xaa\x59\x5c\x02\x7d\xfb\xcb\xac\xd0\xf6\xa8\x7d\x50\x5f\xf9\x93\xc2\xe5\x17\x2e\x23\x87\xc7\xf7\x7f\x3e\xf7\x89\x6e\x5e\x39\x25\x56\x25\xc5\x3d\xf1\x47\x7f\x2d\xff\x9f\x8f\x4c\x25\xf0\x1e\x97\x2d\x6b\xe6\xc0\x1b\xf4\x5c\xfd\x5b\xc6\x50\x9e\x7b\x83\x32\x26\x59\xfc\x03\x99\x1d\xc8\x14\x3b\xbe\xd4\x06\xbb\xae\x0e\x76\x7e\x75\xe9\xc0\xfa\x20\x0f\x93\x52\xf4\x57\x17\xdc\x07\xaf\x07\xff\x0a\x00\x00\xff\xff\x0b\xba\x03\x53\x2d\x22\x00\x00") + +func coredns112JsonBytes() ([]byte, error) { + return bindataRead( + _coredns112Json, + "coredns-1.12.json", + ) +} + +func coredns112Json() (*asset, error) { + bytes, err := coredns112JsonBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "coredns-1.12.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -184,7 +205,8 @@ func AssetNames() []string { var _bindata = map[string]func() (*asset, error){ "aws-node-1.10.yaml": awsNode110Yaml, "aws-node.yaml": awsNodeYaml, - "coredns.yaml": corednsYaml, + "coredns-1.11.json": coredns111Json, + "coredns-1.12.json": coredns112Json, } // AssetDir returns the file names below a certain @@ -229,7 +251,8 @@ type bintree struct { var _bintree = &bintree{nil, map[string]*bintree{ "aws-node-1.10.yaml": &bintree{awsNode110Yaml, map[string]*bintree{}}, "aws-node.yaml": &bintree{awsNodeYaml, map[string]*bintree{}}, - "coredns.yaml": &bintree{corednsYaml, map[string]*bintree{}}, + "coredns-1.11.json": &bintree{coredns111Json, map[string]*bintree{}}, + "coredns-1.12.json": &bintree{coredns112Json, map[string]*bintree{}}, }} // RestoreAsset restores an asset under the given directory diff --git a/pkg/addons/default/assets/coredns-1.11.json b/pkg/addons/default/assets/coredns-1.11.json new file mode 100644 index 0000000000..dbfd7e0c4a --- /dev/null +++ b/pkg/addons/default/assets/coredns-1.11.json @@ -0,0 +1,307 @@ +{ + "apiVersion": "v1", + "items": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "prometheus.io/port": "9153", + "prometheus.io/scrape": "true" + }, + "labels": { + "eks.amazonaws.com/component": "kube-dns", + "k8s-app": "kube-dns", + "kubernetes.io/cluster-service": "true", + "kubernetes.io/name": "CoreDNS" + }, + "name": "kube-dns", + "namespace": "kube-system" + }, + "spec": { + "ports": [ + { + "name": "dns", + "port": 53, + "protocol": "UDP", + "targetPort": 53 + }, + { + "name": "dns-tcp", + "port": 53, + "protocol": "TCP", + "targetPort": 53 + } + ], + "selector": { + "k8s-app": "kube-dns" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "v1", + "data": { + "Corefile": ".:53 {\n errors\n health\n kubernetes cluster.local in-addr.arpa ip6.arpa {\n pods insecure\n upstream\n fallthrough in-addr.arpa ip6.arpa\n }\n prometheus :9153\n proxy . /etc/resolv.conf\n cache 30\n}\n" + }, + "kind": "ConfigMap", + "metadata": { + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/name": "CoreDNS" + }, + "name": "coredns", + "namespace": "kube-system" + }, + "spec": { + "progressDeadlineSeconds": 2147483647, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 1 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "spec": { + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] + } + } + }, + "containers": [ + { + "args": [ + "-conf", + "/etc/coredns/Corefile" + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/coredns:v1.1.3", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 5, + "httpGet": { + "path": "/health", + "port": 8080, + "scheme": "HTTP" + }, + "initialDelaySeconds": 60, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 5 + }, + "name": "coredns", + "ports": [ + { + "containerPort": 53, + "name": "dns", + "protocol": "UDP" + }, + { + "containerPort": 53, + "name": "dns-tcp", + "protocol": "TCP" + }, + { + "containerPort": 9153, + "name": "metrics", + "protocol": "TCP" + } + ], + "resources": { + "limits": { + "memory": "170Mi" + }, + "requests": { + "cpu": "100m", + "memory": "70Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "add": [ + "NET_BIND_SERVICE" + ], + "drop": [ + "all" + ] + }, + "readOnlyRootFilesystem": true + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/etc/coredns", + "name": "config-volume", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "Default", + "priorityClassName": "system-node-critical", + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "coredns", + "serviceAccountName": "coredns", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "key": "CriticalAddonsOnly", + "operator": "Exists" + } + ], + "volumes": [ + { + "configMap": { + "defaultMode": 420, + "items": [ + { + "key": "Corefile", + "path": "Corefile" + } + ], + "name": "coredns" + }, + "name": "config-volume" + } + ] + } + } + } + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRole", + "metadata": { + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "rules": [ + { + "apiGroups": [ + "" + ], + "resources": [ + "endpoints", + "services", + "pods", + "namespaces" + ], + "verbs": [ + "list", + "watch" + ] + }, + { + "apiGroups": [ + "" + ], + "resources": [ + "nodes" + ], + "verbs": [ + "get" + ] + } + ] + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBinding", + "metadata": { + "annotations": { + "rbac.authorization.kubernetes.io/autoupdate": "true" + }, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "roleRef": { + "apiGroup": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "name": "system:coredns" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "coredns", + "namespace": "kube-system" + } + ] + } + ], + "kind": "List" +} diff --git a/pkg/addons/default/assets/coredns-1.12.json b/pkg/addons/default/assets/coredns-1.12.json new file mode 100644 index 0000000000..a5cd001c7f --- /dev/null +++ b/pkg/addons/default/assets/coredns-1.12.json @@ -0,0 +1,312 @@ +{ + "apiVersion": "v1", + "items": [ + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "prometheus.io/port": "9153", + "prometheus.io/scrape": "true" + }, + "labels": { + "eks.amazonaws.com/component": "kube-dns", + "k8s-app": "kube-dns", + "kubernetes.io/cluster-service": "true", + "kubernetes.io/name": "CoreDNS" + }, + "name": "kube-dns", + "namespace": "kube-system" + }, + "spec": { + "ports": [ + { + "name": "dns", + "port": 53, + "protocol": "UDP", + "targetPort": 53 + }, + { + "name": "dns-tcp", + "port": 53, + "protocol": "TCP", + "targetPort": 53 + } + ], + "selector": { + "k8s-app": "kube-dns" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "v1", + "data": { + "Corefile": ".:53 {\n errors\n health\n kubernetes cluster.local in-addr.arpa ip6.arpa {\n pods insecure\n upstream\n fallthrough in-addr.arpa ip6.arpa\n }\n prometheus :9153\n proxy . /etc/resolv.conf\n cache 30\n loop\n reload\n loadbalance\n}\n" + }, + "kind": "ConfigMap", + "metadata": { + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/name": "CoreDNS" + }, + "name": "coredns", + "namespace": "kube-system" + }, + "spec": { + "progressDeadlineSeconds": 2147483647, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 1 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "spec": { + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] + } + } + }, + "containers": [ + { + "args": [ + "-conf", + "/etc/coredns/Corefile" + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/coredns:v1.2.2", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 5, + "httpGet": { + "path": "/health", + "port": 8080, + "scheme": "HTTP" + }, + "initialDelaySeconds": 60, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 5 + }, + "name": "coredns", + "ports": [ + { + "containerPort": 53, + "name": "dns", + "protocol": "UDP" + }, + { + "containerPort": 53, + "name": "dns-tcp", + "protocol": "TCP" + }, + { + "containerPort": 9153, + "name": "metrics", + "protocol": "TCP" + } + ], + "resources": { + "limits": { + "memory": "170Mi" + }, + "requests": { + "cpu": "100m", + "memory": "70Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "add": [ + "NET_BIND_SERVICE" + ], + "drop": [ + "all" + ] + }, + "procMount": "Default", + "readOnlyRootFilesystem": true + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/etc/coredns", + "name": "config-volume", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "Default", + "priorityClassName": "system-cluster-critical", + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "coredns", + "serviceAccountName": "coredns", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoSchedule", + "key": "node-role.kubernetes.io/master" + }, + { + "key": "CriticalAddonsOnly", + "operator": "Exists" + } + ], + "volumes": [ + { + "configMap": { + "defaultMode": 420, + "items": [ + { + "key": "Corefile", + "path": "Corefile" + } + ], + "name": "coredns" + }, + "name": "config-volume" + } + ] + } + } + } + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRole", + "metadata": { + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "rules": [ + { + "apiGroups": [ + "" + ], + "resources": [ + "endpoints", + "services", + "pods", + "namespaces" + ], + "verbs": [ + "list", + "watch" + ] + }, + { + "apiGroups": [ + "" + ], + "resources": [ + "nodes" + ], + "verbs": [ + "get" + ] + } + ] + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBinding", + "metadata": { + "annotations": { + "rbac.authorization.kubernetes.io/autoupdate": "true" + }, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "roleRef": { + "apiGroup": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "name": "system:coredns" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "coredns", + "namespace": "kube-system" + } + ] + } + ], + "kind": "List" +} diff --git a/pkg/addons/default/assets/coredns.yaml b/pkg/addons/default/assets/coredns.yaml deleted file mode 100644 index a99bf614f1..0000000000 --- a/pkg/addons/default/assets/coredns.yaml +++ /dev/null @@ -1,195 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: coredns - namespace: kube-system - labels: - eks.amazonaws.com/component: coredns - k8s-app: kube-dns ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRole -metadata: - labels: - kubernetes.io/bootstrapping: rbac-defaults - eks.amazonaws.com/component: coredns - k8s-app: kube-dns - name: system:coredns -rules: -- apiGroups: - - "" - resources: - - endpoints - - services - - pods - - namespaces - verbs: - - list - - watch -- apiGroups: - - "" - resources: - - nodes - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - annotations: - rbac.authorization.kubernetes.io/autoupdate: "true" - labels: - kubernetes.io/bootstrapping: rbac-defaults - eks.amazonaws.com/component: coredns - k8s-app: kube-dns - name: system:coredns -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:coredns -subjects: -- kind: ServiceAccount - name: coredns - namespace: kube-system ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: coredns - namespace: kube-system - labels: - eks.amazonaws.com/component: coredns - k8s-app: kube-dns -data: - Corefile: | - .:53 { - errors - health - kubernetes cluster.local { - pods insecure - upstream - fallthrough in-addr.arpa ip6.arpa - } - prometheus :9153 - proxy . /etc/resolv.conf - cache 30 - } ---- -apiVersion: extensions/v1beta1 -kind: Deployment -metadata: - name: coredns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/name: "CoreDNS" - eks.amazonaws.com/component: coredns -spec: - replicas: 2 - strategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - selector: - matchLabels: - k8s-app: kube-dns - eks.amazonaws.com/component: coredns - template: - metadata: - labels: - k8s-app: kube-dns - eks.amazonaws.com/component: coredns - spec: - serviceAccountName: coredns - priorityClassName: system-node-critical - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: "beta.kubernetes.io/os" - operator: In - values: - - linux - - key: "beta.kubernetes.io/arch" - operator: In - values: - - amd64 - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - containers: - - name: coredns - image: 602401143452.dkr.ecr.REGION.amazonaws.com/eks/coredns:v1.1.3 - imagePullPolicy: IfNotPresent - resources: - limits: - memory: 170Mi - requests: - cpu: 100m - memory: 70Mi - args: [ "-conf", "/etc/coredns/Corefile" ] - volumeMounts: - - name: config-volume - mountPath: /etc/coredns - readOnly: true - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9153 - name: metrics - protocol: TCP - securityContext: - allowPrivilegeEscalation: false - capabilities: - add: - - NET_BIND_SERVICE - drop: - - all - readOnlyRootFilesystem: true - livenessProbe: - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - dnsPolicy: Default - volumes: - - name: config-volume - configMap: - name: coredns - items: - - key: Corefile - path: Corefile ---- -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - annotations: - prometheus.io/port: "9153" - prometheus.io/scrape: "true" - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - kubernetes.io/name: "CoreDNS" - eks.amazonaws.com/component: kube-dns -spec: - selector: - k8s-app: kube-dns - clusterIP: DNS_CLUSTER_IP - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP diff --git a/pkg/addons/default/aws_node.go b/pkg/addons/default/aws_node.go index 340a0ee8a4..15701e8c13 100644 --- a/pkg/addons/default/aws_node.go +++ b/pkg/addons/default/aws_node.go @@ -23,7 +23,7 @@ const ( ) // UpdateAWSNode will update the `aws-node` add-on -func UpdateAWSNode(rawClient kubernetes.RawClientInterface, region string, controlPlaneVersion string, plan bool) (bool, error) { +func UpdateAWSNode(rawClient kubernetes.RawClientInterface, region, controlPlaneVersion string, plan bool) (bool, error) { _, err := rawClient.ClientSet().AppsV1().DaemonSets(metav1.NamespaceSystem).Get(AWSNode, metav1.GetOptions{}) if err != nil { if apierrs.IsNotFound(err) { diff --git a/pkg/addons/default/coredns.go b/pkg/addons/default/coredns.go index 7f98c96fd5..87143d9001 100644 --- a/pkg/addons/default/coredns.go +++ b/pkg/addons/default/coredns.go @@ -8,8 +8,8 @@ import ( "github.com/kris-nova/logger" "github.com/pkg/errors" + appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" apierrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" @@ -17,8 +17,6 @@ import ( "k8s.io/apimachinery/pkg/watch" "github.com/weaveworks/eksctl/pkg/kubernetes" - "github.com/weaveworks/eksctl/pkg/printers" - k8s "k8s.io/client-go/kubernetes" ) const ( @@ -27,9 +25,6 @@ const ( // KubeDNS is the name of the kube-dns addon KubeDNS = "kube-dns" - // CoreDNSVersion Current latest coredns version supported - CoreDNSVersion = "v1.2.2" - componentLabel = "eks.amazonaws.com/component" coreDNSImagePrefix = "602401143452.dkr.ecr." @@ -37,7 +32,7 @@ const ( ) // InstallCoreDNS will install the `coredns` add-on in place of `kube-dns` -func InstallCoreDNS(rawClient kubernetes.RawClientInterface, region string, waitTimeout *time.Duration, plan bool) (bool, error) { +func InstallCoreDNS(rawClient kubernetes.RawClientInterface, region, controlPlaneVersion string, waitTimeout *time.Duration, plan bool) (bool, error) { kubeDNSSevice, err := rawClient.ClientSet().CoreV1().Services(metav1.NamespaceSystem).Get(KubeDNS, metav1.GetOptions{}) if err != nil { if apierrs.IsNotFound(err) { @@ -67,7 +62,7 @@ func InstallCoreDNS(rawClient kubernetes.RawClientInterface, region string, wait } // if kube-dns is present, go ahead and try to replace it with coredns - list, err := LoadAsset(CoreDNS, "yaml") + list, err := loadAssetCoreDNS(controlPlaneVersion) if err != nil { return false, err } @@ -81,7 +76,7 @@ func InstallCoreDNS(rawClient kubernetes.RawClientInterface, region string, wait } switch resource.GVK.Kind { case "Deployment": - coreDNSDeployemnt := resource.Info.Object.(*extensionsv1beta1.Deployment) + coreDNSDeployemnt := resource.Info.Object.(*appsv1.Deployment) listPodsOptions.LabelSelector = labels.FormatLabels(coreDNSDeployemnt.Spec.Selector.MatchLabels) replicas = int(*coreDNSDeployemnt.Spec.Replicas) image := &coreDNSDeployemnt.Spec.Template.Spec.Containers[0].Image @@ -167,11 +162,18 @@ func InstallCoreDNS(rawClient kubernetes.RawClientInterface, region string, wait return false, nil } -// UpdateCoreDNSImageTag updates image tag for kube-system:deployment/coredns based to match the latest release -func UpdateCoreDNSImageTag(clientSet k8s.Interface, plan bool) (bool, error) { - printer := printers.NewJSONPrinter() +// UpdateCoreDNS will update the `coredns` add-on +func UpdateCoreDNS(rawClient kubernetes.RawClientInterface, region, controlPlaneVersion string, plan bool) (bool, error) { + kubeDNSSevice, err := rawClient.ClientSet().CoreV1().Services(metav1.NamespaceSystem).Get(KubeDNS, metav1.GetOptions{}) + if err != nil { + if apierrs.IsNotFound(err) { + logger.Warning("%q service was not found", KubeDNS) + return false, nil + } + return false, errors.Wrapf(err, "getting %q service", KubeDNS) + } - d, err := clientSet.AppsV1().Deployments(metav1.NamespaceSystem).Get(CoreDNS, metav1.GetOptions{}) + _, err = rawClient.ClientSet().AppsV1().Deployments(metav1.NamespaceSystem).Get(CoreDNS, metav1.GetOptions{}) if err != nil { if apierrs.IsNotFound(err) { logger.Warning("%q was not found", CoreDNS) @@ -179,25 +181,41 @@ func UpdateCoreDNSImageTag(clientSet k8s.Interface, plan bool) (bool, error) { } return false, errors.Wrapf(err, "getting %q", CoreDNS) } - if numContainers := len(d.Spec.Template.Spec.Containers); !(numContainers >= 1) { - return false, fmt.Errorf("%s has %d containers, expected at least 1", CoreDNS, numContainers) - } - if err := printer.LogObj(logger.Debug, CoreDNS+" [current] = \\\n%s\n", d); err != nil { + // if Deployment is present, go through our list of assets + list, err := loadAssetCoreDNS(controlPlaneVersion) + if err != nil { return false, err } - image := &d.Spec.Template.Spec.Containers[0].Image - imageParts := strings.Split(*image, ":") + for _, rawObj := range list.Items { + resource, err := rawClient.NewRawResource(rawObj) + if err != nil { + return false, err + } + switch resource.GVK.Kind { + case "Deployment": + image := &resource.Info.Object.(*appsv1.Deployment).Spec.Template.Spec.Containers[0].Image + imageParts := strings.Split(*image, ":") - if len(imageParts) != 2 { - return false, fmt.Errorf("unexpected image format %q for %q", *image, CoreDNS) - } + if len(imageParts) != 2 { + return false, fmt.Errorf("unexpected image format %q for %q", *image, KubeProxy) + } - if imageParts[1] == CoreDNSVersion { - logger.Debug("imageParts = %v, desiredTag = %s", imageParts, CoreDNSVersion) - logger.Info("%q is already up-to-date", CoreDNS) - return false, nil + if strings.HasPrefix(imageParts[0], coreDNSImagePrefix) && + strings.HasSuffix(imageParts[0], coreDNSImageSuffix) { + *image = coreDNSImagePrefix + region + coreDNSImageSuffix + ":" + imageParts[1] + } + case "Service": + resource.Info.Object.(*corev1.Service).SetResourceVersion(kubeDNSSevice.GetResourceVersion()) + resource.Info.Object.(*corev1.Service).Spec.ClusterIP = kubeDNSSevice.Spec.ClusterIP + } + + status, err := resource.CreateOrReplace(plan) + if err != nil { + return false, err + } + logger.Info(status) } if plan { @@ -205,16 +223,20 @@ func UpdateCoreDNSImageTag(clientSet k8s.Interface, plan bool) (bool, error) { return true, nil } - imageParts[1] = CoreDNSVersion - *image = strings.Join(imageParts, ":") + logger.Info("%q is now up-to-date", CoreDNS) + return false, nil +} - if err := printer.LogObj(logger.Debug, CoreDNS+" [updated] = \\\n%s\n", d); err != nil { - return false, err +func loadAssetCoreDNS(controlPlaneVersion string) (*metav1.List, error) { + assetName := CoreDNS + if strings.HasPrefix(controlPlaneVersion, "1.10.") { + return nil, fmt.Errorf("CoreDNS is not supported on Kubernetes 1.10") } - if _, err := clientSet.AppsV1().Deployments(metav1.NamespaceSystem).Update(d); err != nil { - return false, err + if strings.HasPrefix(controlPlaneVersion, "1.11.") { + assetName += "-1.11" } - - logger.Info("%q is now up-to-date", CoreDNS) - return false, nil + if strings.HasPrefix(controlPlaneVersion, "1.12.") { + assetName += "-1.12" + } + return LoadAsset(assetName, "json") } diff --git a/pkg/addons/default/coredns_test.go b/pkg/addons/default/coredns_test.go index 0e9d3ad5c8..7ccf7e55b3 100644 --- a/pkg/addons/default/coredns_test.go +++ b/pkg/addons/default/coredns_test.go @@ -10,21 +10,21 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/kubernetes/fake" ) var _ = Describe("default addons - coredns", func() { - Describe("can update from kubedns to coredns add-on", func() { - var ( - rawClient *testutils.FakeRawClient - ct *testutils.CollectionTracker - ) - - It("can load sample for 1.10 and create objests that don't exist", func() { - sampleAddons := testutils.LoadSamples("testdata/sample-1.10.json") - + var ( + rawClient *testutils.FakeRawClient + ct *testutils.CollectionTracker + ) + + loadSample := func(v string, expectCount int) { + samplePath := "testdata/sample-" + v + ".json" + It("can load "+samplePath+" and create objests that don't exist", func() { rawClient = testutils.NewFakeRawClient() + sampleAddons := testutils.LoadSamples(samplePath) + rawClient.UseUnionTracker = true for _, item := range sampleAddons { @@ -38,10 +38,13 @@ var _ = Describe("default addons - coredns", func() { Expect(ct.Updated()).To(BeEmpty()) Expect(ct.Created()).ToNot(BeEmpty()) - Expect(ct.CreatedItems()).To(HaveLen(6)) - - Expect(ct.CreatedItems()).To(HaveLen(6)) + Expect(ct.CreatedItems()).To(HaveLen(expectCount)) }) + } + + Describe("[1.10 –> 1.11] can update from kube-dns to coredns", func() { + + loadSample("1.10", 6) It("has newly created objects", func() { kubeDNS, err := rawClient.ClientSet().AppsV1().Deployments(metav1.NamespaceSystem).Get(KubeDNS, metav1.GetOptions{}) @@ -63,10 +66,10 @@ var _ = Describe("default addons - coredns", func() { Expect(err).ToNot(HaveOccurred()) // test client doesn't support watching, and we would have to create some pods, so we set nil timeout - _, err = InstallCoreDNS(rawClient, "eu-west-1", nil, false) + _, err = InstallCoreDNS(rawClient, "eu-west-1", "1.11.x", nil, false) Expect(err).ToNot(HaveOccurred()) - updateReqs := []string{ + createReqs := []string{ "POST [/namespaces/kube-system/deployments] (kube-dns)", "POST [/clusterrolebindings] (aws-node)", "POST [/namespaces/kube-system/serviceaccounts] (coredns)", @@ -79,8 +82,8 @@ var _ = Describe("default addons - coredns", func() { "POST [/namespaces/kube-system/daemonsets] (kube-proxy)", "POST [/clusterroles] (aws-node)", } - Expect(rawClient.Collection.Created()).To(HaveLen(len(updateReqs))) - for _, k := range updateReqs { + Expect(rawClient.Collection.Created()).To(HaveLen(len(createReqs))) + for _, k := range createReqs { Expect(rawClient.Collection.Created()).To(HaveKey(k)) } @@ -94,7 +97,7 @@ var _ = Describe("default addons - coredns", func() { Expect(svcNew.Spec.ClusterIP).To(Equal(svcOld.Spec.ClusterIP)) - coreDNS, err := rawClient.ClientSet().ExtensionsV1beta1().Deployments(metav1.NamespaceSystem).Get(CoreDNS, metav1.GetOptions{}) + coreDNS, err := rawClient.ClientSet().AppsV1().Deployments(metav1.NamespaceSystem).Get(CoreDNS, metav1.GetOptions{}) Expect(err).ToNot(HaveOccurred()) Expect(coreDNS.Spec.Replicas).ToNot(BeNil()) Expect(*coreDNS.Spec.Replicas == 2).To(BeTrue()) @@ -106,41 +109,62 @@ var _ = Describe("default addons - coredns", func() { }) - Describe("can update coredns", func() { - var ( - clientSet *fake.Clientset - ) - - check := func(imageTag string) { - coreDNS, err := clientSet.AppsV1().Deployments(metav1.NamespaceSystem).Get(CoreDNS, metav1.GetOptions{}) + Context("[1.11 –> 1.12] can update coredns", func() { - Expect(err).ToNot(HaveOccurred()) - Expect(coreDNS).ToNot(BeNil()) - Expect(coreDNS.Spec.Template.Spec.Containers).To(HaveLen(1)) - - Expect(coreDNS.Spec.Template.Spec.Containers[0].Image).To( - Equal("602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/coredns:" + imageTag), - ) - } - - BeforeEach(func() { - clientSet, _ = testutils.NewFakeClientSetWithSamples("testdata/sample-1.11.json") - }) + loadSample("1.11", 10) It("can load 1.11 sample", func() { - check("v1.1.3") + checkCoreDNSImage(rawClient, "eu-west-1", "v1.1.3") }) It("can update based to latest version", func() { - _, err := UpdateCoreDNSImageTag(clientSet, false) + _, err := UpdateCoreDNS(rawClient, "eu-west-2", "1.12.x", false) Expect(err).ToNot(HaveOccurred()) - check("v1.2.2") - }) + checkCoreDNSImage(rawClient, "eu-west-2", "v1.2.2") - It("can dry-run update to latest version", func() { - _, err := UpdateCoreDNSImageTag(clientSet, true) - Expect(err).ToNot(HaveOccurred()) - check("v1.1.3") + createReqs := []string{ + "POST [/clusterrolebindings] (aws-node)", + "POST [/namespaces/kube-system/serviceaccounts] (coredns)", + "POST [/namespaces/kube-system/configmaps] (coredns)", + "POST [/namespaces/kube-system/services] (kube-dns)", + "POST [/namespaces/kube-system/daemonsets] (aws-node)", + "POST [/clusterroles] (system:coredns)", + "POST [/clusterrolebindings] (system:coredns)", + "POST [/namespaces/kube-system/deployments] (coredns)", + "POST [/namespaces/kube-system/daemonsets] (kube-proxy)", + "POST [/clusterroles] (aws-node)", + } + + Expect(rawClient.Collection.Created()).To(HaveLen(len(createReqs))) + for _, k := range createReqs { + Expect(rawClient.Collection.Created()).To(HaveKey(k)) + } + + updateReqs := []string{ + "PUT [/namespaces/kube-system/serviceaccounts/coredns] (coredns)", + "PUT [/namespaces/kube-system/configmaps/coredns] (coredns)", + "PUT [/namespaces/kube-system/services/kube-dns] (kube-dns)", + "PUT [/clusterroles/system:coredns] (system:coredns)", + "PUT [/clusterrolebindings/system:coredns] (system:coredns)", + "PUT [/namespaces/kube-system/deployments/coredns] (coredns)", + } + + Expect(rawClient.Collection.Updated()).To(HaveLen(len(updateReqs))) + for _, k := range updateReqs { + Expect(rawClient.Collection.Updated()).To(HaveKey(k)) + } }) }) }) + +func checkCoreDNSImage(rawClient *testutils.FakeRawClient, region, imageTag string) { + coreDNS, err := rawClient.ClientSet().AppsV1().Deployments(metav1.NamespaceSystem).Get(CoreDNS, metav1.GetOptions{}) + + Expect(err).ToNot(HaveOccurred()) + Expect(coreDNS).ToNot(BeNil()) + Expect(coreDNS.Spec.Template.Spec.Containers).To(HaveLen(1)) + + Expect(coreDNS.Spec.Template.Spec.Containers[0].Image).To( + Equal("602401143452.dkr.ecr." + region + ".amazonaws.com/eks/coredns:" + imageTag), + ) +} diff --git a/pkg/addons/default/generate.go b/pkg/addons/default/generate.go index 467fe09639..5928e3bc78 100644 --- a/pkg/addons/default/generate.go +++ b/pkg/addons/default/generate.go @@ -2,6 +2,5 @@ package defaultaddons //go:generate curl --silent --location https://github.com/aws/amazon-vpc-cni-k8s/blob/957f835f437fd76953f37e6b409ba6426bb4ce37/config/v1.4/aws-k8s-cni.yaml?raw=1 --output assets/aws-node.yaml //go:generate curl --silent --location https://github.com/aws/amazon-vpc-cni-k8s/blob/957f835f437fd76953f37e6b409ba6426bb4ce37/config/v1.4/aws-k8s-cni-1.10.yaml?raw=1 --output assets/aws-node-1.10.yaml -//go:generate curl --silent --location https://amazon-eks.s3-us-west-2.amazonaws.com/cloudformation/2019-02-11/dns.yaml --output assets/coredns.yaml //go:generate ${GOPATH}/bin/go-bindata -pkg ${GOPACKAGE} -prefix assets -nometadata -o assets.go assets diff --git a/pkg/addons/default/testdata/sample-1.11.json b/pkg/addons/default/testdata/sample-1.11.json index 543c646eb1..d9a523b8d8 100644 --- a/pkg/addons/default/testdata/sample-1.11.json +++ b/pkg/addons/default/testdata/sample-1.11.json @@ -1,6 +1,7 @@ { "apiVersion": "v1", - "items": [{ + "items": [ + { "apiVersion": "apps/v1", "kind": "DaemonSet", "metadata": { @@ -8,16 +9,17 @@ "deprecated.daemonset.template.generation": "1" }, "labels": { - "k8s-app": "aws-node" + "eks.amazonaws.com/component": "kube-proxy", + "k8s-app": "kube-proxy" }, - "name": "aws-node", + "name": "kube-proxy", "namespace": "kube-system" }, "spec": { "revisionHistoryLimit": 10, "selector": { "matchLabels": { - "k8s-app": "aws-node" + "k8s-app": "kube-proxy" } }, "template": { @@ -27,144 +29,428 @@ }, "creationTimestamp": null, "labels": { - "k8s-app": "aws-node" + "k8s-app": "kube-proxy" } }, "spec": { "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { - "nodeSelectorTerms": [{ - "matchExpressions": [{ - "key": "beta.kubernetes.io/os", - "operator": "In", - "values": [ - "linux" - ] - }, - { - "key": "beta.kubernetes.io/arch", - "operator": "In", - "values": [ - "amd64" - ] - } - ] - }] + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] } } }, - "containers": [{ - "env": [{ - "name": "AWS_VPC_K8S_CNI_LOGLEVEL", - "value": "DEBUG" - }, - { - "name": "MY_NODE_NAME", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "spec.nodeName" - } - } - }, - { - "name": "WATCH_NAMESPACE", - "valueFrom": { - "fieldRef": { - "apiVersion": "v1", - "fieldPath": "metadata.namespace" - } + "containers": [ + { + "command": [ + "/bin/sh", + "-c", + "kube-proxy --resource-container=\"\" --oom-score-adj=-998 --master=https://1928d5e3ac759f66cdcce06b9e23f06c.yl4.eu-west-1.eks.amazonaws.com --kubeconfig=/var/lib/kube-proxy/kubeconfig --proxy-mode=iptables --v=2 1>>/var/log/kube-proxy.log 2>&1" + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/kube-proxy:v1.11.5", + "imagePullPolicy": "IfNotPresent", + "name": "kube-proxy", + "resources": { + "requests": { + "cpu": "100m" } - } - ], - "image": "602401143452.dkr.ecr.eu-west-2.amazonaws.com/amazon-k8s-cni:v1.3.2", - "imagePullPolicy": "Always", - "name": "aws-node", - "ports": [{ - "containerPort": 61678, - "hostPort": 61678, - "name": "metrics", - "protocol": "TCP" - }], - "resources": { - "requests": { - "cpu": "10m" - } - }, - "securityContext": { - "privileged": true - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "File", - "volumeMounts": [{ - "mountPath": "/host/opt/cni/bin", - "name": "cni-bin-dir" - }, - { - "mountPath": "/host/etc/cni/net.d", - "name": "cni-net-dir" }, - { - "mountPath": "/host/var/log", - "name": "log-dir" + "securityContext": { + "privileged": true }, - { - "mountPath": "/var/run/docker.sock", - "name": "dockersock" - } - ] - }], + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/log", + "name": "varlog" + }, + { + "mountPath": "/run/xtables.lock", + "name": "xtables-lock" + }, + { + "mountPath": "/var/lib/kube-proxy/", + "name": "kubeconfig" + } + ] + } + ], "dnsPolicy": "ClusterFirst", "hostNetwork": true, "restartPolicy": "Always", "schedulerName": "default-scheduler", "securityContext": {}, - "serviceAccount": "aws-node", - "serviceAccountName": "aws-node", + "serviceAccount": "kube-proxy", + "serviceAccountName": "kube-proxy", "terminationGracePeriodSeconds": 30, - "tolerations": [{ - "operator": "Exists" - }], - "volumes": [{ - "hostPath": { - "path": "/opt/cni/bin", - "type": "" - }, - "name": "cni-bin-dir" + "tolerations": [ + { + "effect": "NoExecute", + "operator": "Exists" }, + { + "effect": "NoSchedule", + "operator": "Exists" + } + ], + "volumes": [ { "hostPath": { - "path": "/etc/cni/net.d", + "path": "/var/log", "type": "" }, - "name": "cni-net-dir" + "name": "varlog" }, { "hostPath": { - "path": "/var/log", - "type": "" + "path": "/run/xtables.lock", + "type": "FileOrCreate" }, - "name": "log-dir" + "name": "xtables-lock" }, { - "hostPath": { - "path": "/var/run/docker.sock", - "type": "" + "configMap": { + "defaultMode": 420, + "name": "kube-proxy" }, - "name": "dockersock" + "name": "kubeconfig" } ] } }, "updateStrategy": { "rollingUpdate": { + "maxUnavailable": "10%" + }, + "type": "RollingUpdate" + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "prometheus.io/port": "9153", + "prometheus.io/scrape": "true" + }, + "labels": { + "eks.amazonaws.com/component": "kube-dns", + "k8s-app": "kube-dns", + "kubernetes.io/cluster-service": "true", + "kubernetes.io/name": "CoreDNS" + }, + "name": "kube-dns", + "namespace": "kube-system" + }, + "spec": { + "clusterIP": "10.100.0.10", + "ports": [ + { + "name": "dns", + "port": 53, + "protocol": "UDP", + "targetPort": 53 + }, + { + "name": "dns-tcp", + "port": 53, + "protocol": "TCP", + "targetPort": 53 + } + ], + "selector": { + "k8s-app": "kube-dns" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "v1", + "data": { + "Corefile": ".:53 {\n errors\n health\n kubernetes cluster.local in-addr.arpa ip6.arpa {\n pods insecure\n upstream\n fallthrough in-addr.arpa ip6.arpa\n }\n prometheus :9153\n proxy . /etc/resolv.conf\n cache 30\n}\n" + }, + "kind": "ConfigMap", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/name": "CoreDNS" + }, + "name": "coredns", + "namespace": "kube-system" + }, + "spec": { + "progressDeadlineSeconds": 2147483647, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, "maxUnavailable": 1 }, "type": "RollingUpdate" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "spec": { + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] + } + } + }, + "containers": [ + { + "args": [ + "-conf", + "/etc/coredns/Corefile" + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/coredns:v1.1.3", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 5, + "httpGet": { + "path": "/health", + "port": 8080, + "scheme": "HTTP" + }, + "initialDelaySeconds": 60, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 5 + }, + "name": "coredns", + "ports": [ + { + "containerPort": 53, + "name": "dns", + "protocol": "UDP" + }, + { + "containerPort": 53, + "name": "dns-tcp", + "protocol": "TCP" + }, + { + "containerPort": 9153, + "name": "metrics", + "protocol": "TCP" + } + ], + "resources": { + "limits": { + "memory": "170Mi" + }, + "requests": { + "cpu": "100m", + "memory": "70Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "add": [ + "NET_BIND_SERVICE" + ], + "drop": [ + "all" + ] + }, + "readOnlyRootFilesystem": true + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/etc/coredns", + "name": "config-volume", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "Default", + "priorityClassName": "system-node-critical", + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "coredns", + "serviceAccountName": "coredns", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "key": "CriticalAddonsOnly", + "operator": "Exists" + } + ], + "volumes": [ + { + "configMap": { + "defaultMode": 420, + "items": [ + { + "key": "Corefile", + "path": "Corefile" + } + ], + "name": "coredns" + }, + "name": "config-volume" + } + ] + } } } }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRole", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "rules": [ + { + "apiGroups": [ + "" + ], + "resources": [ + "endpoints", + "services", + "pods", + "namespaces" + ], + "verbs": [ + "list", + "watch" + ] + }, + { + "apiGroups": [ + "" + ], + "resources": [ + "nodes" + ], + "verbs": [ + "get" + ] + } + ] + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBinding", + "metadata": { + "annotations": { + "rbac.authorization.kubernetes.io/autoupdate": "true" + }, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "roleRef": { + "apiGroup": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "name": "system:coredns" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "coredns", + "namespace": "kube-system" + } + ] + }, { "apiVersion": "apps/v1", "kind": "DaemonSet", @@ -173,17 +459,16 @@ "deprecated.daemonset.template.generation": "1" }, "labels": { - "eks.amazonaws.com/component": "kube-proxy", - "k8s-app": "kube-proxy" + "k8s-app": "aws-node" }, - "name": "kube-proxy", + "name": "aws-node", "namespace": "kube-system" }, "spec": { "revisionHistoryLimit": 10, "selector": { "matchLabels": { - "k8s-app": "kube-proxy" + "k8s-app": "aws-node" } }, "template": { @@ -193,110 +478,151 @@ }, "creationTimestamp": null, "labels": { - "k8s-app": "kube-proxy" + "k8s-app": "aws-node" } }, "spec": { "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { - "nodeSelectorTerms": [{ - "matchExpressions": [{ - "key": "beta.kubernetes.io/os", - "operator": "In", - "values": [ - "linux" - ] - }, - { - "key": "beta.kubernetes.io/arch", - "operator": "In", - "values": [ - "amd64" - ] - } - ] - }] + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] } } }, - "containers": [{ - "command": [ - "/bin/sh", - "-c", - "kube-proxy --resource-container=\"\" --oom-score-adj=-998 --master=https://0c817583ad2b5ec5b6a2094fc6b8dff8.yl4.eu-west-2.eks.amazonaws.com --kubeconfig=/var/lib/kube-proxy/kubeconfig --proxy-mode=iptables --v=2 1>>/var/log/kube-proxy.log 2>&1" - ], - "image": "602401143452.dkr.ecr.eu-west-2.amazonaws.com/eks/kube-proxy:v1.10.3", - "imagePullPolicy": "IfNotPresent", - "name": "kube-proxy", - "resources": { - "requests": { - "cpu": "100m" - } - }, - "securityContext": { - "privileged": true - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "File", - "volumeMounts": [{ - "mountPath": "/var/log", - "name": "varlog" + "containers": [ + { + "env": [ + { + "name": "AWS_VPC_K8S_CNI_LOGLEVEL", + "value": "DEBUG" + }, + { + "name": "MY_NODE_NAME", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "spec.nodeName" + } + } + }, + { + "name": "WATCH_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/amazon-k8s-cni:v1.4.1", + "imagePullPolicy": "Always", + "name": "aws-node", + "ports": [ + { + "containerPort": 61678, + "hostPort": 61678, + "name": "metrics", + "protocol": "TCP" + } + ], + "resources": { + "requests": { + "cpu": "10m" + } }, - { - "mountPath": "/run/xtables.lock", - "name": "xtables-lock" + "securityContext": { + "privileged": true }, - { - "mountPath": "/var/lib/kube-proxy/", - "name": "kubeconfig" - } - ] - }], + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/host/opt/cni/bin", + "name": "cni-bin-dir" + }, + { + "mountPath": "/host/etc/cni/net.d", + "name": "cni-net-dir" + }, + { + "mountPath": "/host/var/log", + "name": "log-dir" + }, + { + "mountPath": "/var/run/docker.sock", + "name": "dockersock" + } + ] + } + ], "dnsPolicy": "ClusterFirst", "hostNetwork": true, "restartPolicy": "Always", "schedulerName": "default-scheduler", "securityContext": {}, - "serviceAccount": "kube-proxy", - "serviceAccountName": "kube-proxy", + "serviceAccount": "aws-node", + "serviceAccountName": "aws-node", "terminationGracePeriodSeconds": 30, - "tolerations": [{ - "effect": "NoExecute", - "operator": "Exists" - }, + "tolerations": [ { - "effect": "NoSchedule", "operator": "Exists" } ], - "volumes": [{ + "volumes": [ + { "hostPath": { - "path": "/var/log", + "path": "/opt/cni/bin", "type": "" }, - "name": "varlog" + "name": "cni-bin-dir" }, { "hostPath": { - "path": "/run/xtables.lock", - "type": "FileOrCreate" + "path": "/etc/cni/net.d", + "type": "" }, - "name": "xtables-lock" + "name": "cni-net-dir" }, { - "configMap": { - "defaultMode": 420, - "name": "kube-proxy" + "hostPath": { + "path": "/var/log", + "type": "" }, - "name": "kubeconfig" + "name": "log-dir" + }, + { + "hostPath": { + "path": "/var/run/docker.sock", + "type": "" + }, + "name": "dockersock" } ] } }, "updateStrategy": { "rollingUpdate": { - "maxUnavailable": "10%" + "maxUnavailable": 1 }, "type": "RollingUpdate" } @@ -310,6 +636,14 @@ "name": "eniconfigs.crd.k8s.amazonaws.com" }, "spec": { + "additionalPrinterColumns": [ + { + "JSONPath": ".metadata.creationTimestamp", + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "name": "Age", + "type": "date" + } + ], "group": "crd.k8s.amazonaws.com", "names": { "kind": "ENIConfig", @@ -318,7 +652,14 @@ "singular": "eniconfig" }, "scope": "Cluster", - "version": "v1alpha1" + "version": "v1alpha1", + "versions": [ + { + "name": "v1alpha1", + "served": true, + "storage": true + } + ] } }, { @@ -328,7 +669,8 @@ "annotations": {}, "name": "aws-node" }, - "rules": [{ + "rules": [ + { "apiGroups": [ "crd.k8s.amazonaws.com" ], @@ -381,171 +723,13 @@ "kind": "ClusterRole", "name": "aws-node" }, - "subjects": [{ - "kind": "ServiceAccount", - "name": "aws-node", - "namespace": "kube-system" - }] - }, - { - "apiVersion": "apps/v1", - "kind": "Deployment", - "metadata": { - "annotations": { - "deployment.kubernetes.io/revision": "1" - }, - "labels": { - "eks.amazonaws.com/component": "coredns", - "k8s-app": "kube-dns", - "kubernetes.io/name": "CoreDNS" - }, - "name": "coredns", - "namespace": "kube-system" - }, - "spec": { - "replicas": 2, - "selector": { - "matchLabels": { - "eks.amazonaws.com/component": "coredns", - "k8s-app": "kube-dns" - } - }, - "strategy": { - "rollingUpdate": { - "maxSurge": 1, - "maxUnavailable": 1 - }, - "type": "RollingUpdate" - }, - "template": { - "metadata": { - "creationTimestamp": null, - "labels": { - "eks.amazonaws.com/component": "coredns", - "k8s-app": "kube-dns" - } - }, - "spec": { - "affinity": { - "nodeAffinity": { - "requiredDuringSchedulingIgnoredDuringExecution": { - "nodeSelectorTerms": [{ - "matchExpressions": [{ - "key": "beta.kubernetes.io/os", - "operator": "In", - "values": [ - "linux" - ] - }, - { - "key": "beta.kubernetes.io/arch", - "operator": "In", - "values": [ - "amd64" - ] - } - ] - }] - } - } - }, - "containers": [{ - "args": [ - "-conf", - "/etc/coredns/Corefile" - ], - "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/coredns:v1.1.3", - "imagePullPolicy": "IfNotPresent", - "livenessProbe": { - "failureThreshold": 5, - "httpGet": { - "path": "/health", - "port": 8080, - "scheme": "HTTP" - }, - "initialDelaySeconds": 60, - "periodSeconds": 10, - "successThreshold": 1, - "timeoutSeconds": 5 - }, - "name": "coredns", - "ports": [{ - "containerPort": 53, - "name": "dns", - "protocol": "UDP" - }, - { - "containerPort": 53, - "name": "dns-tcp", - "protocol": "TCP" - }, - { - "containerPort": 9153, - "name": "metrics", - "protocol": "TCP" - } - ], - "resources": { - "limits": { - "memory": "170Mi" - }, - "requests": { - "cpu": "100m", - "memory": "70Mi" - } - }, - "securityContext": { - "allowPrivilegeEscalation": false, - "capabilities": { - "add": [ - "NET_BIND_SERVICE" - ], - "drop": [ - "all" - ] - }, - "procMount": "Default", - "readOnlyRootFilesystem": true - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "File", - "volumeMounts": [{ - "mountPath": "/etc/coredns", - "name": "config-volume", - "readOnly": true - }] - }], - "dnsPolicy": "Default", - "priorityClassName": "system-node-critical", - "restartPolicy": "Always", - "schedulerName": "default-scheduler", - "securityContext": {}, - "serviceAccount": "coredns", - "serviceAccountName": "coredns", - "terminationGracePeriodSeconds": 30, - "tolerations": [{ - "effect": "NoSchedule", - "key": "node-role.kubernetes.io/master" - }, - { - "key": "CriticalAddonsOnly", - "operator": "Exists" - } - ], - "volumes": [{ - "configMap": { - "defaultMode": 420, - "items": [{ - "key": "Corefile", - "path": "Corefile" - }], - "name": "coredns" - }, - "name": "config-volume" - }] - } + "subjects": [ + { + "kind": "ServiceAccount", + "name": "aws-node", + "namespace": "kube-system" } - } + ] } ], "kind": "List" diff --git a/pkg/addons/default/testdata/sample-1.12.json b/pkg/addons/default/testdata/sample-1.12.json new file mode 100644 index 0000000000..c940a8d6e2 --- /dev/null +++ b/pkg/addons/default/testdata/sample-1.12.json @@ -0,0 +1,768 @@ +{ + "apiVersion": "v1", + "items": [ + { + "apiVersion": "apps/v1", + "kind": "DaemonSet", + "metadata": { + "annotations": { + "deprecated.daemonset.template.generation": "1" + }, + "labels": { + "eks.amazonaws.com/component": "kube-proxy", + "k8s-app": "kube-proxy" + }, + "name": "kube-proxy", + "namespace": "kube-system" + }, + "spec": { + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "k8s-app": "kube-proxy" + } + }, + "template": { + "metadata": { + "annotations": { + "scheduler.alpha.kubernetes.io/critical-pod": "" + }, + "creationTimestamp": null, + "labels": { + "k8s-app": "kube-proxy" + } + }, + "spec": { + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] + } + } + }, + "containers": [ + { + "command": [ + "/bin/sh", + "-c", + "kube-proxy --v=2 --config=/var/lib/kube-proxy-config/config" + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/kube-proxy:v1.12.6", + "imagePullPolicy": "IfNotPresent", + "name": "kube-proxy", + "resources": { + "requests": { + "cpu": "100m" + } + }, + "securityContext": { + "privileged": true, + "procMount": "Default" + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/var/log", + "name": "varlog" + }, + { + "mountPath": "/run/xtables.lock", + "name": "xtables-lock" + }, + { + "mountPath": "/lib/modules", + "name": "lib-modules", + "readOnly": true + }, + { + "mountPath": "/var/lib/kube-proxy/", + "name": "kubeconfig" + }, + { + "mountPath": "/var/lib/kube-proxy-config/", + "name": "config" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "hostNetwork": true, + "priorityClassName": "system-node-critical", + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "kube-proxy", + "serviceAccountName": "kube-proxy", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoExecute", + "operator": "Exists" + }, + { + "effect": "NoSchedule", + "operator": "Exists" + } + ], + "volumes": [ + { + "hostPath": { + "path": "/var/log", + "type": "" + }, + "name": "varlog" + }, + { + "hostPath": { + "path": "/run/xtables.lock", + "type": "FileOrCreate" + }, + "name": "xtables-lock" + }, + { + "hostPath": { + "path": "/lib/modules", + "type": "" + }, + "name": "lib-modules" + }, + { + "configMap": { + "defaultMode": 420, + "name": "kube-proxy" + }, + "name": "kubeconfig" + }, + { + "configMap": { + "defaultMode": 420, + "name": "kube-proxy-config" + }, + "name": "config" + } + ] + } + }, + "updateStrategy": { + "rollingUpdate": { + "maxUnavailable": "10%" + }, + "type": "RollingUpdate" + } + } + }, + { + "apiVersion": "v1", + "kind": "Service", + "metadata": { + "annotations": { + "prometheus.io/port": "9153", + "prometheus.io/scrape": "true" + }, + "labels": { + "eks.amazonaws.com/component": "kube-dns", + "k8s-app": "kube-dns", + "kubernetes.io/cluster-service": "true", + "kubernetes.io/name": "CoreDNS" + }, + "name": "kube-dns", + "namespace": "kube-system" + }, + "spec": { + "clusterIP": "10.100.0.10", + "ports": [ + { + "name": "dns", + "port": 53, + "protocol": "UDP", + "targetPort": 53 + }, + { + "name": "dns-tcp", + "port": 53, + "protocol": "TCP", + "targetPort": 53 + } + ], + "selector": { + "k8s-app": "kube-dns" + }, + "sessionAffinity": "None", + "type": "ClusterIP" + } + }, + { + "apiVersion": "v1", + "kind": "ServiceAccount", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "v1", + "data": { + "Corefile": ".:53 {\n errors\n health\n kubernetes cluster.local in-addr.arpa ip6.arpa {\n pods insecure\n upstream\n fallthrough in-addr.arpa ip6.arpa\n }\n prometheus :9153\n proxy . /etc/resolv.conf\n cache 30\n loop\n reload\n loadbalance\n}\n" + }, + "kind": "ConfigMap", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + }, + "name": "coredns", + "namespace": "kube-system" + } + }, + { + "apiVersion": "apps/v1", + "kind": "Deployment", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/name": "CoreDNS" + }, + "name": "coredns", + "namespace": "kube-system" + }, + "spec": { + "progressDeadlineSeconds": 2147483647, + "replicas": 2, + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "strategy": { + "rollingUpdate": { + "maxSurge": 1, + "maxUnavailable": 1 + }, + "type": "RollingUpdate" + }, + "template": { + "metadata": { + "creationTimestamp": null, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns" + } + }, + "spec": { + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] + } + } + }, + "containers": [ + { + "args": [ + "-conf", + "/etc/coredns/Corefile" + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/eks/coredns:v1.2.2", + "imagePullPolicy": "IfNotPresent", + "livenessProbe": { + "failureThreshold": 5, + "httpGet": { + "path": "/health", + "port": 8080, + "scheme": "HTTP" + }, + "initialDelaySeconds": 60, + "periodSeconds": 10, + "successThreshold": 1, + "timeoutSeconds": 5 + }, + "name": "coredns", + "ports": [ + { + "containerPort": 53, + "name": "dns", + "protocol": "UDP" + }, + { + "containerPort": 53, + "name": "dns-tcp", + "protocol": "TCP" + }, + { + "containerPort": 9153, + "name": "metrics", + "protocol": "TCP" + } + ], + "resources": { + "limits": { + "memory": "170Mi" + }, + "requests": { + "cpu": "100m", + "memory": "70Mi" + } + }, + "securityContext": { + "allowPrivilegeEscalation": false, + "capabilities": { + "add": [ + "NET_BIND_SERVICE" + ], + "drop": [ + "all" + ] + }, + "procMount": "Default", + "readOnlyRootFilesystem": true + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/etc/coredns", + "name": "config-volume", + "readOnly": true + } + ] + } + ], + "dnsPolicy": "Default", + "priorityClassName": "system-cluster-critical", + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "coredns", + "serviceAccountName": "coredns", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "effect": "NoSchedule", + "key": "node-role.kubernetes.io/master" + }, + { + "key": "CriticalAddonsOnly", + "operator": "Exists" + } + ], + "volumes": [ + { + "configMap": { + "defaultMode": 420, + "items": [ + { + "key": "Corefile", + "path": "Corefile" + } + ], + "name": "coredns" + }, + "name": "config-volume" + } + ] + } + } + } + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRole", + "metadata": { + "annotations": {}, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "rules": [ + { + "apiGroups": [ + "" + ], + "resources": [ + "endpoints", + "services", + "pods", + "namespaces" + ], + "verbs": [ + "list", + "watch" + ] + }, + { + "apiGroups": [ + "" + ], + "resources": [ + "nodes" + ], + "verbs": [ + "get" + ] + } + ] + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBinding", + "metadata": { + "annotations": { + "rbac.authorization.kubernetes.io/autoupdate": "true" + }, + "labels": { + "eks.amazonaws.com/component": "coredns", + "k8s-app": "kube-dns", + "kubernetes.io/bootstrapping": "rbac-defaults" + }, + "name": "system:coredns" + }, + "roleRef": { + "apiGroup": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "name": "system:coredns" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "coredns", + "namespace": "kube-system" + } + ] + }, + { + "apiVersion": "apps/v1", + "kind": "DaemonSet", + "metadata": { + "annotations": { + "deprecated.daemonset.template.generation": "1" + }, + "labels": { + "k8s-app": "aws-node" + }, + "name": "aws-node", + "namespace": "kube-system" + }, + "spec": { + "revisionHistoryLimit": 10, + "selector": { + "matchLabels": { + "k8s-app": "aws-node" + } + }, + "template": { + "metadata": { + "annotations": { + "scheduler.alpha.kubernetes.io/critical-pod": "" + }, + "creationTimestamp": null, + "labels": { + "k8s-app": "aws-node" + } + }, + "spec": { + "affinity": { + "nodeAffinity": { + "requiredDuringSchedulingIgnoredDuringExecution": { + "nodeSelectorTerms": [ + { + "matchExpressions": [ + { + "key": "beta.kubernetes.io/os", + "operator": "In", + "values": [ + "linux" + ] + }, + { + "key": "beta.kubernetes.io/arch", + "operator": "In", + "values": [ + "amd64" + ] + } + ] + } + ] + } + } + }, + "containers": [ + { + "env": [ + { + "name": "AWS_VPC_K8S_CNI_LOGLEVEL", + "value": "DEBUG" + }, + { + "name": "MY_NODE_NAME", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "spec.nodeName" + } + } + }, + { + "name": "WATCH_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + } + ], + "image": "602401143452.dkr.ecr.eu-west-1.amazonaws.com/amazon-k8s-cni:v1.4.1", + "imagePullPolicy": "Always", + "name": "aws-node", + "ports": [ + { + "containerPort": 61678, + "hostPort": 61678, + "name": "metrics", + "protocol": "TCP" + } + ], + "resources": { + "requests": { + "cpu": "10m" + } + }, + "securityContext": { + "privileged": true, + "procMount": "Default" + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "volumeMounts": [ + { + "mountPath": "/host/opt/cni/bin", + "name": "cni-bin-dir" + }, + { + "mountPath": "/host/etc/cni/net.d", + "name": "cni-net-dir" + }, + { + "mountPath": "/host/var/log", + "name": "log-dir" + }, + { + "mountPath": "/var/run/docker.sock", + "name": "dockersock" + } + ] + } + ], + "dnsPolicy": "ClusterFirst", + "hostNetwork": true, + "priorityClassName": "system-node-critical", + "restartPolicy": "Always", + "schedulerName": "default-scheduler", + "securityContext": {}, + "serviceAccount": "aws-node", + "serviceAccountName": "aws-node", + "terminationGracePeriodSeconds": 30, + "tolerations": [ + { + "operator": "Exists" + } + ], + "volumes": [ + { + "hostPath": { + "path": "/opt/cni/bin", + "type": "" + }, + "name": "cni-bin-dir" + }, + { + "hostPath": { + "path": "/etc/cni/net.d", + "type": "" + }, + "name": "cni-net-dir" + }, + { + "hostPath": { + "path": "/var/log", + "type": "" + }, + "name": "log-dir" + }, + { + "hostPath": { + "path": "/var/run/docker.sock", + "type": "" + }, + "name": "dockersock" + } + ] + } + }, + "updateStrategy": { + "rollingUpdate": { + "maxUnavailable": 1 + }, + "type": "RollingUpdate" + } + } + }, + { + "apiVersion": "apiextensions.k8s.io/v1beta1", + "kind": "CustomResourceDefinition", + "metadata": { + "annotations": {}, + "name": "eniconfigs.crd.k8s.amazonaws.com" + }, + "spec": { + "additionalPrinterColumns": [ + { + "JSONPath": ".metadata.creationTimestamp", + "description": "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "name": "Age", + "type": "date" + } + ], + "group": "crd.k8s.amazonaws.com", + "names": { + "kind": "ENIConfig", + "listKind": "ENIConfigList", + "plural": "eniconfigs", + "singular": "eniconfig" + }, + "scope": "Cluster", + "version": "v1alpha1", + "versions": [ + { + "name": "v1alpha1", + "served": true, + "storage": true + } + ] + } + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRole", + "metadata": { + "annotations": {}, + "name": "aws-node" + }, + "rules": [ + { + "apiGroups": [ + "crd.k8s.amazonaws.com" + ], + "resources": [ + "*", + "namespaces" + ], + "verbs": [ + "*" + ] + }, + { + "apiGroups": [ + "" + ], + "resources": [ + "pods", + "nodes", + "namespaces" + ], + "verbs": [ + "list", + "watch", + "get" + ] + }, + { + "apiGroups": [ + "extensions" + ], + "resources": [ + "daemonsets" + ], + "verbs": [ + "list", + "watch" + ] + } + ] + }, + { + "apiVersion": "rbac.authorization.k8s.io/v1", + "kind": "ClusterRoleBinding", + "metadata": { + "annotations": {}, + "name": "aws-node" + }, + "roleRef": { + "apiGroup": "rbac.authorization.k8s.io", + "kind": "ClusterRole", + "name": "aws-node" + }, + "subjects": [ + { + "kind": "ServiceAccount", + "name": "aws-node", + "namespace": "kube-system" + } + ] + } + ], + "kind": "List" +} diff --git a/pkg/ctl/utils/install_corends.go b/pkg/ctl/utils/install_corends.go index 8e5425a9d0..f97298d096 100644 --- a/pkg/ctl/utils/install_corends.go +++ b/pkg/ctl/utils/install_corends.go @@ -69,9 +69,14 @@ func doInstallCoreDNS(rc *cmdutils.ResourceCmd) error { return err } + kubernetesVersion, err := rawClient.ServerVersion() + if err != nil { + return err + } + waitTimeout := ctl.Provider.WaitTimeout() - updateRequired, err := defaultaddons.InstallCoreDNS(rawClient, meta.Region, &waitTimeout, rc.Plan) + updateRequired, err := defaultaddons.InstallCoreDNS(rawClient, meta.Region, kubernetesVersion, &waitTimeout, rc.Plan) if err != nil { return err } diff --git a/pkg/ctl/utils/update_coredns.go b/pkg/ctl/utils/update_coredns.go index 47f7eb194d..3ab2e8698e 100644 --- a/pkg/ctl/utils/update_coredns.go +++ b/pkg/ctl/utils/update_coredns.go @@ -54,12 +54,17 @@ func doUpdateCoreDNS(rc *cmdutils.ResourceCmd) error { return errors.Wrapf(err, "getting credentials for cluster %q", meta.Name) } - clientSet, err := ctl.NewStdClientSet(cfg) + rawClient, err := ctl.NewRawClient(cfg) if err != nil { return err } - updateRequired, err := defaultaddons.UpdateCoreDNSImageTag(clientSet, rc.Plan) + kubernetesVersion, err := rawClient.ServerVersion() + if err != nil { + return err + } + + updateRequired, err := defaultaddons.UpdateCoreDNS(rawClient, meta.Region, kubernetesVersion, rc.Plan) if err != nil { return err }