Fix DNS Autoscaler for coredns_dual deployment (#3726)

* Fix DNS Autoscaler for coredns_dual deployment

* Fix templating

* Fix templating again
This commit is contained in:
Andreas Krüger 2018-11-19 09:35:53 +01:00 committed by k8s-ci-robot
parent 2aefa25448
commit 8c18f053aa

View file

@ -16,20 +16,20 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: dns-autoscaler name: dns-autoscaler{{ coredns_ordinal_suffix | default('') }}
namespace: kube-system namespace: kube-system
labels: labels:
k8s-app: dns-autoscaler k8s-app: dns-autoscaler{{ coredns_ordinal_suffix | default('') }}
kubernetes.io/cluster-service: "true" kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile addonmanager.kubernetes.io/mode: Reconcile
spec: spec:
selector: selector:
matchLabels: matchLabels:
k8s-app: dns-autoscaler k8s-app: dns-autoscaler{{ coredns_ordinal_suffix | default('') }}
template: template:
metadata: metadata:
labels: labels:
k8s-app: dns-autoscaler k8s-app: dns-autoscaler{{ coredns_ordinal_suffix | default('') }}
annotations: annotations:
scheduler.alpha.kubernetes.io/critical-pod: '' scheduler.alpha.kubernetes.io/critical-pod: ''
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
@ -49,7 +49,7 @@ spec:
- topologyKey: "kubernetes.io/hostname" - topologyKey: "kubernetes.io/hostname"
labelSelector: labelSelector:
matchLabels: matchLabels:
k8s-app: dns-autoscaler k8s-app: dns-autoscaler{{ coredns_ordinal_suffix | default('') }}
nodeAffinity: nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution: preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100 - weight: 100
@ -72,7 +72,7 @@ spec:
- --default-params={"linear":{"preventSinglePointFailure":{{ dns_prevent_single_point_failure }},"coresPerReplica":{{ dns_cores_per_replica }},"nodesPerReplica":{{ dns_nodes_per_replica }},"min":{{ dns_min_replicas }}}} - --default-params={"linear":{"preventSinglePointFailure":{{ dns_prevent_single_point_failure }},"coresPerReplica":{{ dns_cores_per_replica }},"nodesPerReplica":{{ dns_nodes_per_replica }},"min":{{ dns_min_replicas }}}}
- --logtostderr=true - --logtostderr=true
- --v=2 - --v=2
- --configmap=dns-autoscaler - --configmap=dns-autoscaler{{ coredns_ordinal_suffix | default('') }}
{% if dns_mode in ['coredns', 'coredns_dual'] %} {% if dns_mode in ['coredns', 'coredns_dual'] %}
- --target=Deployment/coredns{{ coredns_ordinal_suffix | default('') }} - --target=Deployment/coredns{{ coredns_ordinal_suffix | default('') }}
{% endif %} {% endif %}