Skip to content

Commit 165738a

Browse files
authored
Merge pull request #6502 from NiklasRosenstein/master
feature: Support Hetzner cloud provider in Helm chart
2 parents 4bf83f1 + c49eefe commit 165738a

File tree

5 files changed

+42
-2
lines changed

5 files changed

+42
-2
lines changed

charts/cluster-autoscaler/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ name: cluster-autoscaler
1111
sources:
1212
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
1313
type: application
14-
version: 9.35.0
14+
version: 9.36.0

charts/cluster-autoscaler/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ To create a valid configuration, follow instructions for your cloud provider:
7373
- [Azure](#azure)
7474
- [OpenStack Magnum](#openstack-magnum)
7575
- [Cluster API](#cluster-api)
76+
- [Exoscale](#exoscale)
77+
- [Hetzner Cloud](#hetzner-cloud)
7678

7779
### Templating the autoDiscovery.clusterName
7880

@@ -259,6 +261,18 @@ $ helm install my-release autoscaler/cluster-autoscaler \
259261

260262
Read [cluster-autoscaler/cloudprovider/exoscale/README.md](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/exoscale/README.md) for further information on the setup without helm.
261263

264+
### Hetzner Cloud
265+
266+
The following parameters are required:
267+
268+
- `cloudProvider=hetzner`
269+
- `extraEnv.HCLOUD_TOKEN=...`
270+
- `autoscalingGroups=...`
271+
272+
Each autoscaling group requires an additional `instanceType` and `region` key to be set.
273+
274+
Read [cluster-autoscaler/cloudprovider/hetzner/README.md](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/hetzner/README.md) for further information on the setup without helm.
275+
262276
## Uninstalling the Chart
263277

264278
To uninstall `my-release`:
@@ -375,7 +389,7 @@ vpa:
375389
| autoDiscovery.labels | list | `[]` | Cluster-API labels to match https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md#configuring-node-group-auto-discovery |
376390
| autoDiscovery.roles | list | `["worker"]` | Magnum node group roles to match. |
377391
| autoDiscovery.tags | list | `["k8s.io/cluster-autoscaler/enabled","k8s.io/cluster-autoscaler/{{ .Values.autoDiscovery.clusterName }}"]` | ASG tags to match, run through `tpl`. |
378-
| autoscalingGroups | list | `[]` | For AWS, Azure AKS or Magnum. At least one element is required if not using `autoDiscovery`. For example: <pre> - name: asg1<br /> maxSize: 2<br /> minSize: 1 </pre> |
392+
| autoscalingGroups | list | `[]` | For AWS, Azure AKS or Magnum. At least one element is required if not using `autoDiscovery`. For example: <pre> - name: asg1<br /> maxSize: 2<br /> minSize: 1 </pre> For Hetzner Cloud, the `instanceType` and `region` keys are also required. <pre> - name: mypool<br /> maxSize: 2<br /> minSize: 1<br /> instanceType: CPX21<br /> region: FSN1 </pre> |
379393
| autoscalingGroupsnamePrefix | list | `[]` | For GCE. At least one element is required if not using `autoDiscovery`. For example: <pre> - name: ig01<br /> maxSize: 10<br /> minSize: 0 </pre> |
380394
| awsAccessKeyID | string | `""` | AWS access key ID ([if AWS user keys used](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md#using-aws-credentials)) |
381395
| awsRegion | string | `"us-east-1"` | AWS region (required if `cloudProvider=aws`) |

charts/cluster-autoscaler/README.md.gotmpl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ To create a valid configuration, follow instructions for your cloud provider:
7373
- [Azure](#azure)
7474
- [OpenStack Magnum](#openstack-magnum)
7575
- [Cluster API](#cluster-api)
76+
- [Exoscale](#exoscale)
77+
- [Hetzner Cloud](#hetzner-cloud)
7678

7779
### Templating the autoDiscovery.clusterName
7880

@@ -259,6 +261,18 @@ $ helm install my-release autoscaler/cluster-autoscaler \
259261

260262
Read [cluster-autoscaler/cloudprovider/exoscale/README.md](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/exoscale/README.md) for further information on the setup without helm.
261263

264+
### Hetzner Cloud
265+
266+
The following parameters are required:
267+
268+
- `cloudProvider=hetzner`
269+
- `extraEnv.HCLOUD_TOKEN=...`
270+
- `autoscalingGroups=...`
271+
272+
Each autoscaling group requires an additional `instanceType` and `region` key to be set.
273+
274+
Read [cluster-autoscaler/cloudprovider/hetzner/README.md](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/hetzner/README.md) for further information on the setup without helm.
275+
262276
## Uninstalling the Chart
263277

264278
To uninstall `my-release`:

charts/cluster-autoscaler/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ spec:
6060
{{- end }}
6161
{{- if .Values.autoscalingGroups }}
6262
{{- range .Values.autoscalingGroups }}
63+
{{- if eq $.Values.cloudProvider "hetzner" }}
64+
- --nodes={{ .minSize }}:{{ .maxSize }}:{{ .instanceType }}:{{ .region }}:{{ .name }}
65+
{{- else }}
6366
- --nodes={{ .minSize }}:{{ .maxSize }}:{{ .name }}
6467
{{- end }}
68+
{{- end }}
6569
{{- end }}
6670
{{- if eq .Values.cloudProvider "rancher" }}
6771
{{- if .Values.cloudConfigPath }}

charts/cluster-autoscaler/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ autoDiscovery:
3636
# maxSize: 2<br />
3737
# minSize: 1
3838
# </pre>
39+
# For Hetzner Cloud, the `instanceType` and `region` keys are also required.
40+
# <pre>
41+
# - name: mypool<br />
42+
# maxSize: 2<br />
43+
# minSize: 1<br />
44+
# instanceType: CPX21<br />
45+
# region: FSN1
46+
# </pre>
3947
autoscalingGroups: []
4048
# - name: asg1
4149
# maxSize: 2

0 commit comments

Comments
 (0)