2017-08-24 17:09:52 +08:00
|
|
|
---
|
2017-02-28 22:56:00 +08:00
|
|
|
# Copyright 2016 The Kubernetes Authors.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: dnsmasq-autoscaler
|
|
|
|
namespace: kube-system
|
|
|
|
labels:
|
|
|
|
k8s-app: dnsmasq-autoscaler
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
addonmanager.kubernetes.io/mode: Reconcile
|
|
|
|
spec:
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: dnsmasq-autoscaler
|
|
|
|
annotations:
|
|
|
|
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"CriticalAddonsOnly", "operator":"Exists"}]'
|
|
|
|
spec:
|
2018-10-17 06:33:30 +08:00
|
|
|
{% if kube_version is version('v1.11.1', '>=') %}
|
2018-09-25 22:50:22 +08:00
|
|
|
priorityClassName: system-cluster-critical
|
|
|
|
{% endif %}
|
2017-09-03 15:53:45 +08:00
|
|
|
serviceAccountName: dnsmasq
|
2017-08-24 17:04:25 +08:00
|
|
|
tolerations:
|
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2017-02-28 22:56:00 +08:00
|
|
|
containers:
|
2017-08-24 17:04:25 +08:00
|
|
|
- name: autoscaler
|
2018-01-16 16:11:59 +08:00
|
|
|
image: "{{ dnsmasqautoscaler_image_repo }}:{{ dnsmasqautoscaler_image_tag }}"
|
2017-08-24 17:04:25 +08:00
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: "20m"
|
|
|
|
memory: "10Mi"
|
|
|
|
command:
|
|
|
|
- /cluster-proportional-autoscaler
|
|
|
|
- --namespace=kube-system
|
|
|
|
- --configmap=dnsmasq-autoscaler
|
|
|
|
- --target=Deployment/dnsmasq
|
|
|
|
# When cluster is using large nodes(with more cores), "coresPerReplica" should dominate.
|
|
|
|
# If using small nodes, "nodesPerReplica" should dominate.
|
|
|
|
- --default-params={"linear":{"nodesPerReplica":{{ dnsmasq_nodes_per_replica }},"preventSinglePointFailure":true}}
|
|
|
|
- --logtostderr=true
|
|
|
|
- --v={{ kube_log_level }}
|
2018-06-05 19:15:20 +08:00
|
|
|
nodeSelector:
|
|
|
|
beta.kubernetes.io/os: linux
|