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.

60 lines
2.2 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 kube_version is version('v1.11.1', '>=') %}
  34. priorityClassName: system-cluster-critical
  35. {% endif %}
  36. serviceAccountName: dnsmasq
  37. tolerations:
  38. - effect: NoSchedule
  39. operator: Exists
  40. containers:
  41. - name: autoscaler
  42. image: "{{ dnsmasqautoscaler_image_repo }}:{{ dnsmasqautoscaler_image_tag }}"
  43. resources:
  44. requests:
  45. cpu: "20m"
  46. memory: "10Mi"
  47. command:
  48. - /cluster-proportional-autoscaler
  49. - --namespace=kube-system
  50. - --configmap=dnsmasq-autoscaler
  51. - --target=Deployment/dnsmasq
  52. # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
  53. # If using small nodes, "nodesPerReplica" should dominate.
  54. - --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}}
  55. - --logtostderr=true
  56. - --v={{ kube_log_level }}
  57. # When having win nodes in cluster without this patch, this pod cloud try to be created in windows
  58. nodeSelector:
  59. beta.kubernetes.io/os: linux