From 7ac12723df18d1339653aede33788f0f9e41e9e9 Mon Sep 17 00:00:00 2001 From: ag237 Date: Wed, 23 Aug 2017 05:54:35 -0400 Subject: [PATCH] adding in node tolerations to cluster-autoscaler deployment (#1770) --- stable/cluster-autoscaler/Chart.yaml | 2 +- stable/cluster-autoscaler/README.md | 20 +++++++++++++++++-- .../templates/deployment.yaml | 2 ++ stable/cluster-autoscaler/values.yaml | 2 ++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/stable/cluster-autoscaler/Chart.yaml b/stable/cluster-autoscaler/Chart.yaml index 94c6a983d4..9e114fc592 100644 --- a/stable/cluster-autoscaler/Chart.yaml +++ b/stable/cluster-autoscaler/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 description: Scales worker nodes within autoscaling groups. icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png name: cluster-autoscaler -version: 0.1.1 +version: 0.1.2 sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler - https://github.com/spotinst/kubernetes-autoscaler/tree/master/cluster-autoscaler diff --git a/stable/cluster-autoscaler/README.md b/stable/cluster-autoscaler/README.md index b0e9a1a935..48b2bd51b8 100644 --- a/stable/cluster-autoscaler/README.md +++ b/stable/cluster-autoscaler/README.md @@ -4,8 +4,10 @@ ## TL;DR: +## Helm < 2.5 + ```console -$ helm install stable/cluster-autoscaler -f values.yaml +$ helm install stable/cluster-autoscaler --name my-release -f values.yaml ``` Where `values.yaml` contains: @@ -15,6 +17,11 @@ autoscalingGroups: maxSize: 10 minSize: 1 ``` +## Helm >= 2.5 + +```console +$ helm install stable/cluster-autoscaler --name my-release autoscalingGroups[0].name=your-asg-name,autoscalingGroups[0].maxSize=10,autoscalingGroups[0].minSize=1 +``` ## Introduction @@ -25,7 +32,7 @@ This chart bootstraps an cluster-autoscaler deployment on a [Kubernetes](http:// ## Installing the Chart -In order for the chart to configure the cluster-autoscaler properly during the installation process, you must provide some minimal configuration which can't rely on defaults. This includes at least one element in the `autoscalingGroups` array and its three values: `name`, `minSize` and `maxSize`. These parameters cannot be passed to helm using the `--set` parameter at this time, so you must supply these using a `values.yaml` file such as: +In order for the chart to configure the cluster-autoscaler properly during the installation process, you must provide some minimal configuration which can't rely on defaults. This includes at least one element in the `autoscalingGroups` array and its three values: `name`, `minSize` and `maxSize`. If you are using Helm < 2.5 these parameters cannot be passed to helm using the `--set` parameter, so you must supply these using a `values.yaml` file such as: ``` autoscalingGroups: @@ -36,10 +43,18 @@ autoscalingGroups: To install the chart with the release name `my-release`: +## Helm < 2.5 + ```console $ helm install stable/cluster-autoscaler --name my-release -f values.yaml ``` +## Helm >= 2.5 + +```console +$ helm install stable/cluster-autoscaler --name my-release autoscalingGroups[0].name=your-asg-name,autoscalingGroups[0].maxSize=10,autoscalingGroups[0].minSize=1 +``` + The command deploys cluster-autoscaler on the Kubernetes cluster using the supplied configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. > **Tip**: List all releases using `helm list` @@ -104,6 +119,7 @@ Parameter | Description | Default `spotinst.image.repository` | Image (used if `cloudProvider=spotinst`) | `spotinst/kubernetes-cluster-autoscaler` `spotinst.image.tag` | Image tag (used if `cloudProvider=spotinst`) | `v0.6.0` `spotinst.image.pullPolicy` | Image pull policy (used if `cloudProvider=spotinst`) | `IfNotPresent` +`tolerations` | List of node taints to tolerate (requires Kubernetes >= 1.6) | `[]` Specify each parameter you'd like to override using a YAML file as described above in the [installation](#Installing the Chart) section. diff --git a/stable/cluster-autoscaler/templates/deployment.yaml b/stable/cluster-autoscaler/templates/deployment.yaml index 34ce9ccbe9..945b9f362e 100644 --- a/stable/cluster-autoscaler/templates/deployment.yaml +++ b/stable/cluster-autoscaler/templates/deployment.yaml @@ -65,6 +65,8 @@ spec: {{ toYaml .Values.nodeSelector | indent 8 }} {{- end }} serviceAccountName: {{ if .Values.rbac.create }}{{ template "fullname" . }}{{ else }}"{{ .Values.rbac.serviceAccountName }}"{{ end }} + tolerations: +{{ toYaml .Values.tolerations | indent 8 }} volumes: - name: ssl-certs hostPath: diff --git a/stable/cluster-autoscaler/values.yaml b/stable/cluster-autoscaler/values.yaml index 9f554b4c60..13738d1bb1 100644 --- a/stable/cluster-autoscaler/values.yaml +++ b/stable/cluster-autoscaler/values.yaml @@ -14,6 +14,8 @@ image: tag: v0.6.0 pullPolicy: IfNotPresent +tolerations: [] + extraArgs: {} # scale-down-delay: 10m # scale-down-unneeded-time: 10m