| {%- from "kubernetes/map.jinja" import common with context -%} |
| apiVersion: extensions/v1beta1 |
| kind: Deployment |
| metadata: |
| name: kube-dns-autoscaler |
| namespace: kube-system |
| labels: |
| k8s-app: kube-dns-autoscaler |
| addonmanager.kubernetes.io/mode: Reconcile |
| spec: |
| template: |
| metadata: |
| labels: |
| k8s-app: kube-dns-autoscaler |
| spec: |
| tolerations: |
| - key: node-role.kubernetes.io/master |
| effect: NoSchedule |
| containers: |
| - name: autoscaler |
| image: {{ common.addons.dns.autoscaler.get('image', 'gcr.io/google_containers/cluster-proportional-autoscaler-amd64:1.0.0') }} |
| resources: |
| requests: |
| cpu: "20m" |
| memory: "10Mi" |
| command: |
| - /cluster-proportional-autoscaler |
| - --namespace=kube-system |
| - --configmap=kube-dns-autoscaler |
| - --mode=linear |
| - --target=Deployment/kube-dns |
| # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate. |
| # If using small nodes, "nodesPerReplica" should dominate. |
| - --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":10,"min":2}} |
| - --logtostderr=true |
| {%- if common.addons.dns.autoscaler.get('poll-period-seconds') %} |
| - --poll-period-seconds={{ common.addons.dns.autoscaler.get('poll-period-seconds') }} |
| {%- endif %} |
| - --v=2 |
| |