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.

56 lines
2.0 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: dnsmasq-autoscaler
  19. namespace: kube-system
  20. labels:
  21. k8s-app: dnsmasq-autoscaler
  22. kubernetes.io/cluster-service: "true"
  23. addonmanager.kubernetes.io/mode: Reconcile
  24. spec:
  25. template:
  26. metadata:
  27. labels:
  28. k8s-app: dnsmasq-autoscaler
  29. annotations:
  30. scheduler.alpha.kubernetes.io/critical-pod: ''
  31. scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
  32. spec:
  33. {% if rbac_enabled %}
  34. serviceAccountName: dnsmasq
  35. {% endif %}
  36. tolerations:
  37. - effect: NoSchedule
  38. operator: Exists
  39. containers:
  40. - name: autoscaler
  41. image: gcr.io/google_containers/cluster-proportional-autoscaler-amd64:1.1.1
  42. resources:
  43. requests:
  44. cpu: "20m"
  45. memory: "10Mi"
  46. command:
  47. - /cluster-proportional-autoscaler
  48. - --namespace=kube-system
  49. - --configmap=dnsmasq-autoscaler
  50. - --target=Deployment/dnsmasq
  51. # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
  52. # If using small nodes, "nodesPerReplica" should dominate.
  53. - --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}}
  54. - --logtostderr=true
  55. - --v={{ kube_log_level }}