Skip to content

Commit

Permalink
Merge pull request #6249 from WhizUs/feat/helmchart-cloudprovider-exo…
Browse files Browse the repository at this point in the history
…scale

feat(helm): add support for exoscale provider
  • Loading branch information
k8s-ci-robot authored Nov 14, 2023
2 parents e525b02 + c873215 commit dc3a239
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/cluster-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ name: cluster-autoscaler
sources:
- https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler
type: application
version: 9.29.4
version: 9.29.5
26 changes: 26 additions & 0 deletions charts/cluster-autoscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,32 @@ Additional config parameters available, see the `values.yaml` for more details
- `clusterAPIWorkloadKubeconfigPath`
- `clusterAPICloudConfigPath`

### Exoscale

The following parameters are required:

- `cloudProvider=exoscale`
- `autoDiscovery.clusterName=<CLUSTER NAME>`

Create an Exoscale API key with appropriate permissions as described in [cluster-autoscaler/cloudprovider/exoscale/README.md](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/exoscale/README.md).
A secret of name `<release-name>-exoscale-cluster-autoscaler` needs to be created, containing the api key and secret, as well as the zone.

```console
$ kubectl create secret generic my-release-exoscale-cluster-autoscaler \
--from-literal=api-key="EXOxxxxxxxxxxxxxxxxxxxxxxxx" \
--from-literal=api-secret="xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --from-literal=api-zone="ch-gva-2"
```

After creating the secret, the chart may be installed:

```console
$ helm install my-release autoscaler/cluster-autoscaler \
--set cloudProvider=exoscale \
--set autoDiscovery.clusterName=<CLUSTER NAME>
```

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.

## Uninstalling the Chart

To uninstall `my-release`:
Expand Down
26 changes: 26 additions & 0 deletions charts/cluster-autoscaler/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,32 @@ Additional config parameters available, see the `values.yaml` for more details
- `clusterAPIWorkloadKubeconfigPath`
- `clusterAPICloudConfigPath`

### Exoscale

The following parameters are required:

- `cloudProvider=exoscale`
- `autoDiscovery.clusterName=<CLUSTER NAME>`

Create an Exoscale API key with appropriate permissions as described in [cluster-autoscaler/cloudprovider/exoscale/README.md](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/exoscale/README.md).
A secret of name `<release-name>-exoscale-cluster-autoscaler` needs to be created, containing the api key and secret, as well as the zone.

```console
$ kubectl create secret generic my-release-exoscale-cluster-autoscaler \
--from-literal=api-key="EXOxxxxxxxxxxxxxxxxxxxxxxxx" \
--from-literal=api-secret="xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" --from-literal=api-zone="ch-gva-2"
```

After creating the secret, the chart may be installed:

```console
$ helm install my-release autoscaler/cluster-autoscaler \
--set cloudProvider=exoscale \
--set autoDiscovery.clusterName=<CLUSTER NAME>
```

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.

## Uninstalling the Chart

To uninstall `my-release`:
Expand Down
16 changes: 16 additions & 0 deletions charts/cluster-autoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,22 @@ spec:
key: NodeResourceGroup
name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }}
{{- end }}
{{- else if eq .Values.cloudProvider "exoscale" }}
- name: EXOSCALE_API_KEY
valueFrom:
secretKeyRef:
key: api-key
name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }}
- name: EXOSCALE_API_SECRET
valueFrom:
secretKeyRef:
key: api-secret
name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }}
- name: EXOSCALE_ZONE
valueFrom:
secretKeyRef:
key: api-zone
name: {{ default (include "cluster-autoscaler.fullname" .) .Values.secretKeyRefNameOverride }}
{{- end }}
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key }}
Expand Down

0 comments on commit dc3a239

Please sign in to comment.