|
|
@ -13,7 +13,7 @@ |
|
|
|
# See the License for the specific language governing permissions and |
|
|
|
# limitations under the License. |
|
|
|
|
|
|
|
apiVersion: extensions/v1beta1 |
|
|
|
apiVersion: apps/v1 |
|
|
|
kind: Deployment |
|
|
|
metadata: |
|
|
|
name: dns-autoscaler |
|
|
@ -23,10 +23,16 @@ metadata: |
|
|
|
kubernetes.io/cluster-service: "true" |
|
|
|
addonmanager.kubernetes.io/mode: Reconcile |
|
|
|
spec: |
|
|
|
selector: |
|
|
|
matchLabels: |
|
|
|
k8s-app: dns-autoscaler |
|
|
|
template: |
|
|
|
metadata: |
|
|
|
labels: |
|
|
|
k8s-app: dns-autoscaler |
|
|
|
annotations: |
|
|
|
scheduler.alpha.kubernetes.io/critical-pod: '' |
|
|
|
seccomp.security.alpha.kubernetes.io/pod: 'docker/default' |
|
|
|
spec: |
|
|
|
{% if kube_version is version('v1.11.1', '>=') %} |
|
|
|
priorityClassName: system-cluster-critical |
|
|
@ -63,7 +69,7 @@ spec: |
|
|
|
command: |
|
|
|
- /cluster-proportional-autoscaler |
|
|
|
- --namespace=kube-system |
|
|
|
- --default-params={"linear":{"nodesPerReplica":{{ dns_nodes_per_replica }},"min":{{ dns_min_replicas }}}} |
|
|
|
- --default-params={"linear":{"preventSinglePointFailure":{{ dns_prevent_single_point_failure }},"coresPerReplica":{{ dns_cores_per_replica }},"nodesPerReplica":{{ dns_nodes_per_replica }},"min":{{ dns_min_replicas }}}} |
|
|
|
- --logtostderr=true |
|
|
|
- --v=2 |
|
|
|
- --configmap=dns-autoscaler |
|
|
@ -73,4 +79,7 @@ spec: |
|
|
|
{% if dns_mode in ['kubedns', 'dnsmasq_kubedns'] %} |
|
|
|
- --target=Deployment/kube-dns |
|
|
|
{% endif %} |
|
|
|
serviceAccountName: cluster-proportional-autoscaler |
|
|
|
tolerations: |
|
|
|
- key: "CriticalAddonsOnly" |
|
|
|
operator: "Exists" |
|
|
|
serviceAccountName: dns-autoscaler |