From 4177639d3476edab52c88f10d84f4acd1cc73f72 Mon Sep 17 00:00:00 2001 From: Bowei Du Date: Mon, 19 Dec 2016 14:14:28 -0800 Subject: [PATCH] Update reference to dns sidecar (was dnsmasq-metrics); remove exec-healthz k8s-dns-sidecar --probe will be used to maintain a health check of the DNS related daemons. This removes the need for exec-healthz. --- .../addons/dns/kubedns-controller.yaml.base | 37 +++++-------------- cluster/addons/dns/kubedns-controller.yaml.in | 37 +++++-------------- .../addons/dns/kubedns-controller.yaml.sed | 37 +++++-------------- .../templates/kubedns-controller.yaml | 37 +++++-------------- 4 files changed, 36 insertions(+), 112 deletions(-) diff --git a/cluster/addons/dns/kubedns-controller.yaml.base b/cluster/addons/dns/kubedns-controller.yaml.base index 6c49125ae1..7e788edf88 100644 --- a/cluster/addons/dns/kubedns-controller.yaml.base +++ b/cluster/addons/dns/kubedns-controller.yaml.base @@ -60,8 +60,8 @@ spec: memory: 70Mi livenessProbe: httpGet: - path: /healthz-kubedns - port: 8080 + path: /healthcheck/kubedns + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -99,8 +99,8 @@ spec: image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4 livenessProbe: httpGet: - path: /healthz-dnsmasq - port: 8080 + path: /healthcheck/dnsmasq + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -123,8 +123,8 @@ spec: requests: cpu: 150m memory: 10Mi - - name: dnsmasq-metrics - image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0 + - name: sidecar + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.0 livenessProbe: httpGet: path: /metrics @@ -137,33 +137,14 @@ spec: args: - --v=2 - --logtostderr + - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.__PILLAR__DNS__DOMAIN__,5,A + - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.__PILLAR__DNS__DOMAIN__,5,A ports: - containerPort: 10054 name: metrics protocol: TCP resources: requests: - memory: 10Mi - - name: healthz - image: gcr.io/google_containers/exechealthz-amd64:1.2 - resources: - limits: - memory: 50Mi - requests: + memory: 20Mi cpu: 10m - # Note that this container shouldn't really need 50Mi of memory. The - # limits are set higher than expected pending investigation on #29688. - # The extra memory was stolen from the kubedns container to keep the - # net memory requested by the pod constant. - memory: 50Mi - args: - - --cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1 >/dev/null - - --url=/healthz-dnsmasq - - --cmd=nslookup kubernetes.default.svc.__PILLAR__DNS__DOMAIN__ 127.0.0.1:10053 >/dev/null - - --url=/healthz-kubedns - - --port=8080 - - --quiet - ports: - - containerPort: 8080 - protocol: TCP dnsPolicy: Default # Don't use cluster DNS. diff --git a/cluster/addons/dns/kubedns-controller.yaml.in b/cluster/addons/dns/kubedns-controller.yaml.in index f6851af936..b504fe3d0b 100644 --- a/cluster/addons/dns/kubedns-controller.yaml.in +++ b/cluster/addons/dns/kubedns-controller.yaml.in @@ -60,8 +60,8 @@ spec: memory: 70Mi livenessProbe: httpGet: - path: /healthz-kubedns - port: 8080 + path: /healthcheck/kubedns + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -99,8 +99,8 @@ spec: image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4 livenessProbe: httpGet: - path: /healthz-dnsmasq - port: 8080 + path: /healthcheck/dnsmasq + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -123,8 +123,8 @@ spec: requests: cpu: 150m memory: 10Mi - - name: dnsmasq-metrics - image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0 + - name: sidecar + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.0 livenessProbe: httpGet: path: /metrics @@ -137,33 +137,14 @@ spec: args: - --v=2 - --logtostderr + - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.{{ pillar['dns_domain'] }},5,A + - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.{{ pillar['dns_domain'] }},5,A ports: - containerPort: 10054 name: metrics protocol: TCP resources: requests: - memory: 10Mi - - name: healthz - image: gcr.io/google_containers/exechealthz-amd64:1.2 - resources: - limits: - memory: 50Mi - requests: + memory: 20Mi cpu: 10m - # Note that this container shouldn't really need 50Mi of memory. The - # limits are set higher than expected pending investigation on #29688. - # The extra memory was stolen from the kubedns container to keep the - # net memory requested by the pod constant. - memory: 50Mi - args: - - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null - - --url=/healthz-dnsmasq - - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null - - --url=/healthz-kubedns - - --port=8080 - - --quiet - ports: - - containerPort: 8080 - protocol: TCP dnsPolicy: Default # Don't use cluster DNS. diff --git a/cluster/addons/dns/kubedns-controller.yaml.sed b/cluster/addons/dns/kubedns-controller.yaml.sed index 24a7bf6db0..7820d2f7fc 100644 --- a/cluster/addons/dns/kubedns-controller.yaml.sed +++ b/cluster/addons/dns/kubedns-controller.yaml.sed @@ -60,8 +60,8 @@ spec: memory: 70Mi livenessProbe: httpGet: - path: /healthz-kubedns - port: 8080 + path: /healthcheck/kubedns + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -98,8 +98,8 @@ spec: image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4 livenessProbe: httpGet: - path: /healthz-dnsmasq - port: 8080 + path: /healthcheck/dnsmasq + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -122,8 +122,8 @@ spec: requests: cpu: 150m memory: 10Mi - - name: dnsmasq-metrics - image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0 + - name: sidecar + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.0 livenessProbe: httpGet: path: /metrics @@ -136,33 +136,14 @@ spec: args: - --v=2 - --logtostderr + - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.$DNS_DOMAIN,5,A + - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.$DNS_DOMAIN,5,A ports: - containerPort: 10054 name: metrics protocol: TCP resources: requests: - memory: 10Mi - - name: healthz - image: gcr.io/google_containers/exechealthz-amd64:1.2 - resources: - limits: - memory: 50Mi - requests: + memory: 20Mi cpu: 10m - # Note that this container shouldn't really need 50Mi of memory. The - # limits are set higher than expected pending investigation on #29688. - # The extra memory was stolen from the kubedns container to keep the - # net memory requested by the pod constant. - memory: 50Mi - args: - - --cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1 >/dev/null - - --url=/healthz-dnsmasq - - --cmd=nslookup kubernetes.default.svc.$DNS_DOMAIN 127.0.0.1:10053 >/dev/null - - --url=/healthz-kubedns - - --port=8080 - - --quiet - ports: - - containerPort: 8080 - protocol: TCP dnsPolicy: Default # Don't use cluster DNS. diff --git a/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml b/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml index 92069fc794..ac7b9fd3b0 100644 --- a/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml +++ b/cluster/juju/layers/kubernetes/templates/kubedns-controller.yaml @@ -59,8 +59,8 @@ spec: memory: 100Mi livenessProbe: httpGet: - path: /healthz-kubedns - port: 8080 + path: /healthcheck/kubedns + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -100,8 +100,8 @@ spec: image: gcr.io/google_containers/kube-dnsmasq-{{ arch }}:1.4 livenessProbe: httpGet: - path: /healthz-dnsmasq - port: 8080 + path: /healthcheck/dnsmasq + port: 10054 scheme: HTTP initialDelaySeconds: 60 timeoutSeconds: 5 @@ -119,8 +119,8 @@ spec: - containerPort: 53 name: dns-tcp protocol: TCP - - name: dnsmasq-metrics - image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0 + - name: sidecar + image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.10.0 livenessProbe: httpGet: path: /metrics @@ -133,33 +133,14 @@ spec: args: - --v=2 - --logtostderr + - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.{{ pillar['dns_domain'] }},5,A + - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.{{ pillar['dns_domain'] }},5,A ports: - containerPort: 10054 name: metrics protocol: TCP resources: requests: - memory: 10Mi - - name: healthz - image: gcr.io/google_containers/exechealthz-{{ arch }}:1.2 - resources: - limits: - memory: 50Mi - requests: + memory: 20Mi cpu: 10m - # Note that this container shouldn't really need 50Mi of memory. The - # limits are set higher than expected pending investigation on #29688. - # The extra memory was stolen from the kubedns container to keep the - # net memory requested by the pod constant. - memory: 50Mi - args: - - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1 >/dev/null - - --url=/healthz-dnsmasq - - --cmd=nslookup kubernetes.default.svc.{{ pillar['dns_domain'] }} 127.0.0.1:10053 >/dev/null - - --url=/healthz-kubedns - - --port=8080 - - --quiet - ports: - - containerPort: 8080 - protocol: TCP dnsPolicy: Default # Don't use cluster DNS.