Merge pull request #40382 from liggitt/kube-dns-configmap

Automatic merge from submit-queue (batch tested with PRs 40382, 41060)

Make kube-dns mount optional configmap

Switches add-on templates to use an optional mounted configmap for dns

Uses options added in https://github.com/kubernetes/dns/pull/39

Blocks https://github.com/kubernetes/kubernetes/pull/38816
This commit is contained in:
Kubernetes Submit Queue 2017-02-07 02:36:05 -08:00 committed by GitHub
commit 51901ef84a
3 changed files with 36 additions and 12 deletions

View File

@ -45,9 +45,14 @@ spec:
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
spec: spec:
volumes:
- name: kube-dns-config
configMap:
name: kube-dns
optional: true
containers: containers:
- name: kubedns - name: kubedns
image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.12.1
resources: resources:
# TODO: Set memory limits when we've profiled the container for large # TODO: Set memory limits when we've profiled the container for large
# clusters, then set request = limit to keep this container in # clusters, then set request = limit to keep this container in
@ -79,7 +84,7 @@ spec:
args: args:
- --domain=__PILLAR__DNS__DOMAIN__. - --domain=__PILLAR__DNS__DOMAIN__.
- --dns-port=10053 - --dns-port=10053
- --config-map=kube-dns - --config-dir=/kube-dns-config
- --v=2 - --v=2
__PILLAR__FEDERATIONS__DOMAIN__MAP__ __PILLAR__FEDERATIONS__DOMAIN__MAP__
env: env:
@ -95,8 +100,11 @@ spec:
- containerPort: 10055 - containerPort: 10055
name: metrics name: metrics
protocol: TCP protocol: TCP
volumeMounts:
- name: kube-dns-config
mountPath: /kube-dns-config
- name: dnsmasq - name: dnsmasq
image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.12.1
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthcheck/dnsmasq path: /healthcheck/dnsmasq
@ -124,7 +132,7 @@ spec:
cpu: 150m cpu: 150m
memory: 10Mi memory: 10Mi
- name: sidecar - name: sidecar
image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.12.1
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /metrics path: /metrics

View File

@ -45,9 +45,14 @@ spec:
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
spec: spec:
volumes:
- name: kube-dns-config
configMap:
name: kube-dns
optional: true
containers: containers:
- name: kubedns - name: kubedns
image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.12.1
resources: resources:
# TODO: Set memory limits when we've profiled the container for large # TODO: Set memory limits when we've profiled the container for large
# clusters, then set request = limit to keep this container in # clusters, then set request = limit to keep this container in
@ -79,7 +84,7 @@ spec:
args: args:
- --domain={{ pillar['dns_domain'] }}. - --domain={{ pillar['dns_domain'] }}.
- --dns-port=10053 - --dns-port=10053
- --config-map=kube-dns - --config-dir=/kube-dns-config
- --v=2 - --v=2
{{ pillar['federations_domain_map'] }} {{ pillar['federations_domain_map'] }}
env: env:
@ -95,8 +100,11 @@ spec:
- containerPort: 10055 - containerPort: 10055
name: metrics name: metrics
protocol: TCP protocol: TCP
volumeMounts:
- name: kube-dns-config
mountPath: /kube-dns-config
- name: dnsmasq - name: dnsmasq
image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.12.1
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthcheck/dnsmasq path: /healthcheck/dnsmasq
@ -124,7 +132,7 @@ spec:
cpu: 150m cpu: 150m
memory: 10Mi memory: 10Mi
- name: sidecar - name: sidecar
image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.12.1
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /metrics path: /metrics

View File

@ -45,9 +45,14 @@ spec:
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]' scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
spec: spec:
volumes:
- name: kube-dns-config
configMap:
name: kube-dns
optional: true
containers: containers:
- name: kubedns - name: kubedns
image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.12.1
resources: resources:
# TODO: Set memory limits when we've profiled the container for large # TODO: Set memory limits when we've profiled the container for large
# clusters, then set request = limit to keep this container in # clusters, then set request = limit to keep this container in
@ -79,7 +84,7 @@ spec:
args: args:
- --domain=$DNS_DOMAIN. - --domain=$DNS_DOMAIN.
- --dns-port=10053 - --dns-port=10053
- --config-map=kube-dns - --config-dir=/kube-dns-config
- --v=2 - --v=2
env: env:
- name: PROMETHEUS_PORT - name: PROMETHEUS_PORT
@ -94,8 +99,11 @@ spec:
- containerPort: 10055 - containerPort: 10055
name: metrics name: metrics
protocol: TCP protocol: TCP
volumeMounts:
- name: kube-dns-config
mountPath: /kube-dns-config
- name: dnsmasq - name: dnsmasq
image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-dnsmasq-amd64:1.12.1
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthcheck/dnsmasq path: /healthcheck/dnsmasq
@ -123,7 +131,7 @@ spec:
cpu: 150m cpu: 150m
memory: 10Mi memory: 10Mi
- name: sidecar - name: sidecar
image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.11.0 image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.12.1
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /metrics path: /metrics