Skip to content
This repository was archived by the owner on Jul 30, 2021. It is now read-only.

Commit b079433

Browse files
author
Yifan Gu
committed
templates.go: Update DNS manifests template.
1 parent e88d7b0 commit b079433

File tree

1 file changed

+37
-38
lines changed

1 file changed

+37
-38
lines changed

pkg/asset/internal/templates.go

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -498,11 +498,18 @@ spec:
498498
k8s-app: kube-dns
499499
annotations:
500500
scheduler.alpha.kubernetes.io/critical-pod: ''
501-
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
502501
spec:
502+
tolerations:
503+
- key: "CriticalAddonsOnly"
504+
operator: "Exists"
505+
volumes:
506+
- name: kube-dns-config
507+
configMap:
508+
name: kube-dns
509+
optional: true
503510
containers:
504511
- name: kubedns
505-
image: gcr.io/google_containers/kubedns-amd64:1.9
512+
image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.1
506513
resources:
507514
# TODO: Set memory limits when we've profiled the container for large
508515
# clusters, then set request = limit to keep this container in
@@ -515,8 +522,8 @@ spec:
515522
memory: 70Mi
516523
livenessProbe:
517524
httpGet:
518-
path: /healthz-kubedns
519-
port: 8080
525+
path: /healthcheck/kubedns
526+
port: 10054
520527
scheme: HTTP
521528
initialDelaySeconds: 60
522529
timeoutSeconds: 5
@@ -534,10 +541,8 @@ spec:
534541
args:
535542
- --domain=cluster.local.
536543
- --dns-port=10053
537-
- --config-map=kube-dns
538-
# This should be set to v=2 only after the new image (cut from 1.5) has
539-
# been released, otherwise we will flood the logs.
540-
- --v=0
544+
- --config-dir=/kube-dns-config
545+
- --v=2
541546
env:
542547
- name: PROMETHEUS_PORT
543548
value: "10055"
@@ -551,22 +556,32 @@ spec:
551556
- containerPort: 10055
552557
name: metrics
553558
protocol: TCP
559+
volumeMounts:
560+
- name: kube-dns-config
561+
mountPath: /kube-dns-config
554562
- name: dnsmasq
555-
image: gcr.io/google_containers/kube-dnsmasq-amd64:1.4
563+
image: gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.1
556564
livenessProbe:
557565
httpGet:
558-
path: /healthz-dnsmasq
559-
port: 8080
566+
path: /healthcheck/dnsmasq
567+
port: 10054
560568
scheme: HTTP
561569
initialDelaySeconds: 60
562570
timeoutSeconds: 5
563571
successThreshold: 1
564572
failureThreshold: 5
565573
args:
574+
- -v=2
575+
- -logtostderr
576+
- -configDir=/etc/k8s/dns/dnsmasq-nanny
577+
- -restartDnsmasq=true
578+
- --
579+
- -k
566580
- --cache-size=1000
567-
- --no-resolv
568-
- --server=127.0.0.1#10053
569581
- --log-facility=-
582+
- --server=/cluster.local/127.0.0.1#10053
583+
- --server=/in-addr.arpa/127.0.0.1#10053
584+
- --server=/ip6.arpa/127.0.0.1#10053
570585
ports:
571586
- containerPort: 53
572587
name: dns
@@ -578,9 +593,12 @@ spec:
578593
resources:
579594
requests:
580595
cpu: 150m
581-
memory: 10Mi
582-
- name: dnsmasq-metrics
583-
image: gcr.io/google_containers/dnsmasq-metrics-amd64:1.0
596+
memory: 20Mi
597+
volumeMounts:
598+
- name: kube-dns-config
599+
mountPath: /etc/k8s/dns/dnsmasq-nanny
600+
- name: sidecar
601+
image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.1
584602
livenessProbe:
585603
httpGet:
586604
path: /metrics
@@ -593,35 +611,16 @@ spec:
593611
args:
594612
- --v=2
595613
- --logtostderr
614+
- --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.cluster.local,5,A
615+
- --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.cluster.local,5,A
596616
ports:
597617
- containerPort: 10054
598618
name: metrics
599619
protocol: TCP
600620
resources:
601621
requests:
602-
memory: 10Mi
603-
- name: healthz
604-
image: gcr.io/google_containers/exechealthz-amd64:1.2
605-
resources:
606-
limits:
607-
memory: 50Mi
608-
requests:
622+
memory: 20Mi
609623
cpu: 10m
610-
# Note that this container shouldn't really need 50Mi of memory. The
611-
# limits are set higher than expected pending investigation on #29688.
612-
# The extra memory was stolen from the kubedns container to keep the
613-
# net memory requested by the pod constant.
614-
memory: 50Mi
615-
args:
616-
- --cmd=nslookup kubernetes.default.svc.cluster.local 127.0.0.1 >/dev/null
617-
- --url=/healthz-dnsmasq
618-
- --cmd=nslookup kubernetes.default.svc.cluster.local 127.0.0.1:10053 >/dev/null
619-
- --url=/healthz-kubedns
620-
- --port=8080
621-
- --quiet
622-
ports:
623-
- containerPort: 8080
624-
protocol: TCP
625624
dnsPolicy: Default # Don't use cluster DNS.
626625
`)
627626
DNSSvcTemplate = []byte(`apiVersion: v1

0 commit comments

Comments
 (0)