You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
1.7 KiB

  1. ---
  2. # Copyright 2016 The Kubernetes Authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. apiVersion: extensions/v1beta1
  16. kind: Deployment
  17. metadata:
  18. name: kubedns-autoscaler
  19. namespace: {{ system_namespace }}
  20. labels:
  21. k8s-app: kubedns-autoscaler
  22. kubernetes.io/cluster-service: "true"
  23. addonmanager.kubernetes.io/mode: Reconcile
  24. spec:
  25. template:
  26. metadata:
  27. labels:
  28. k8s-app: kubedns-autoscaler
  29. spec:
  30. tolerations:
  31. - effect: NoSchedule
  32. operator: Exists
  33. containers:
  34. - name: autoscaler
  35. image: "{{ kubednsautoscaler_image_repo }}:{{ kubednsautoscaler_image_tag }}"
  36. resources:
  37. requests:
  38. cpu: "20m"
  39. memory: "10Mi"
  40. command:
  41. - /cluster-proportional-autoscaler
  42. - --namespace={{ system_namespace }}
  43. - --configmap=kubedns-autoscaler
  44. # Should keep target in sync with cluster/addons/dns/kubedns-controller.yaml.base
  45. - --target=Deployment/kube-dns
  46. - --default-params={"linear":{"nodesPerReplica":{{ kubedns_nodes_per_replica }},"min":{{ kubedns_min_replicas }}}}
  47. - --logtostderr=true
  48. - --v=2
  49. {% if rbac_enabled %}
  50. serviceAccountName: cluster-proportional-autoscaler
  51. {% endif %}