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.

81 lines
2.8 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: apps/v1
  16. kind: Deployment
  17. metadata:
  18. name: dns-autoscaler{{ coredns_ordinal_suffix }}
  19. namespace: kube-system
  20. labels:
  21. k8s-app: dns-autoscaler{{ coredns_ordinal_suffix }}
  22. addonmanager.kubernetes.io/mode: Reconcile
  23. spec:
  24. selector:
  25. matchLabels:
  26. k8s-app: dns-autoscaler{{ coredns_ordinal_suffix }}
  27. template:
  28. metadata:
  29. labels:
  30. k8s-app: dns-autoscaler{{ coredns_ordinal_suffix }}
  31. annotations:
  32. seccomp.security.alpha.kubernetes.io/pod: 'runtime/default'
  33. spec:
  34. priorityClassName: system-cluster-critical
  35. securityContext:
  36. supplementalGroups: [ 65534 ]
  37. fsGroup: 65534
  38. nodeSelector:
  39. kubernetes.io/os: linux
  40. tolerations:
  41. - effect: NoSchedule
  42. operator: Equal
  43. key: node-role.kubernetes.io/master
  44. affinity:
  45. podAntiAffinity:
  46. requiredDuringSchedulingIgnoredDuringExecution:
  47. - topologyKey: "kubernetes.io/hostname"
  48. labelSelector:
  49. matchLabels:
  50. k8s-app: dns-autoscaler{{ coredns_ordinal_suffix }}
  51. nodeAffinity:
  52. preferredDuringSchedulingIgnoredDuringExecution:
  53. - weight: 100
  54. preference:
  55. matchExpressions:
  56. - key: node-role.kubernetes.io/master
  57. operator: In
  58. values:
  59. - ""
  60. containers:
  61. - name: autoscaler
  62. image: "{{ dnsautoscaler_image_repo }}:{{ dnsautoscaler_image_tag }}"
  63. resources:
  64. requests:
  65. cpu: {{ dns_autoscaler_cpu_requests }}
  66. memory: {{ dns_autoscaler_memory_requests }}
  67. readinessProbe:
  68. httpGet:
  69. path: /healthz
  70. port: 8080
  71. scheme: HTTP
  72. command:
  73. - /cluster-proportional-autoscaler
  74. - --namespace=kube-system
  75. - --default-params={"linear":{"preventSinglePointFailure":{{ dns_prevent_single_point_failure }},"coresPerReplica":{{ dns_cores_per_replica }},"nodesPerReplica":{{ dns_nodes_per_replica }},"min":{{ dns_min_replicas }}}}
  76. - --logtostderr=true
  77. - --v=2
  78. - --configmap=dns-autoscaler{{ coredns_ordinal_suffix }}
  79. - --target=Deployment/coredns{{ coredns_ordinal_suffix }}
  80. serviceAccountName: dns-autoscaler