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.

54 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. serviceAccountName: dnsmasq
  34. tolerations:
  35. - effect: NoSchedule
  36. operator: Exists
  37. containers:
  38. - name: autoscaler
  39. image: "{{ dnsmasqautoscaler_image_repo }}:{{ dnsmasqautoscaler_image_tag }}"
  40. resources:
  41. requests:
  42. cpu: "20m"
  43. memory: "10Mi"
  44. command:
  45. - /cluster-proportional-autoscaler
  46. - --namespace=kube-system
  47. - --configmap=dnsmasq-autoscaler
  48. - --target=Deployment/dnsmasq
  49. # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
  50. # If using small nodes, "nodesPerReplica" should dominate.
  51. - --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}}
  52. - --logtostderr=true
  53. - --v={{ kube_log_level }}