Skip to content

Commit fe3928a

Browse files
sarahhodnemrueg
authored andcommitted
Allow passing custom arguments to the autoscaler
This can be useful if you have CoreDNS deployments that only serve a subset of nodes, and you want to use --nodelabels on the autoscaler to have it scale according to just those nodes. Signed-off-by: Sarah Hodne <sarah@circleci.com>
1 parent f4fcc76 commit fe3928a

4 files changed

Lines changed: 10 additions & 1 deletion

File tree

charts/coredns/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: coredns
3-
version: 1.16.7
3+
version: 1.17.0
44
appVersion: 1.8.7
55
home: https://coredns.io
66
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png

charts/coredns/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ The command removes all the Kubernetes components associated with the chart and
113113
| `autoscaler.max` | Max size of replicaCount | 0 (aka no max) |
114114
| `autoscaler.includeUnschedulableNodes` | Should the replicas scale based on the total number or only schedulable nodes | `false` |
115115
| `autoscaler.preventSinglePointFailure` | If true does not allow single points of failure to form | `true` |
116+
| `autoscaler.customFlags` | A list of custom flags to pass into cluster-proportional-autoscaler | (no args) |
116117
| `autoscaler.image.repository` | The image repository to pull autoscaler from | k8s.gcr.io/cluster-proportional-autoscaler-amd64 |
117118
| `autoscaler.image.tag` | The image tag to pull autoscaler from | `1.8.1` |
118119
| `autoscaler.image.pullPolicy` | Image pull policy for the autoscaler | IfNotPresent |

charts/coredns/templates/deployment-autoscaler.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,7 @@ spec:
8686
- --target=Deployment/{{ default (include "coredns.fullname" .) .Values.deployment.name }}
8787
- --logtostderr=true
8888
- --v=2
89+
{{- if .Values.autoscaler.customFlags }}
90+
{{ toYaml .Values.autoscaler.customFlags | indent 10 }}
91+
{{- end }}
8992
{{- end }}

charts/coredns/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ autoscaler:
258258
# If true does not allow single points of failure to form
259259
preventSinglePointFailure: true
260260

261+
## Optionally specify some extra flags to pass to cluster-proprtional-autoscaler.
262+
## Useful for e.g. the nodelabels flag.
263+
# customFlags:
264+
# - --nodelabels=topology.kubernetes.io/zone=us-east-1a
265+
261266
image:
262267
repository: k8s.gcr.io/cluster-proportional-autoscaler-amd64
263268
tag: "1.8.1"

0 commit comments

Comments
 (0)