Skip to content

Commit 2761683

Browse files
authored
Merge pull request #29 from /issues/28
Issues/28
2 parents 4e094cc + 2d4b8e6 commit 2761683

File tree

5 files changed

+7
-22
lines changed

5 files changed

+7
-22
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ nodePools:
6868
enabled: true
6969
minSize: 2
7070
maxSize: 6
71-
labels:
72-
autoscaling: "enabled"
7371
```
7472
75-
This configuration marks the node pool for autoscaling. The Cluster Autoscaler will use these settings to scale the node pool within the specified limits.
73+
This configuration marks the node pool for autoscaling. The Cluster Autoscaler will use these settings to scale the node pool within the specified limits. There are sever criteria for selecting the cluster autoscaler, including labels, cluster name, and namespace. Refer to the [Cluster Autoscaler documentation](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/clusterapi/README.md)
7674
7775
You need to install the Cluster Autoscaler in the management cluster. Here is an example using Helm:
7876
@@ -81,13 +79,14 @@ helm repo add autoscaler https://kubernetes.github.io/autoscaler
8179
helm repo update
8280
helm upgrade --install ${CLUSTER_NAME}-autoscaler autoscaler/cluster-autoscaler \
8381
--set cloudProvider=clusterapi \
84-
--set autodiscovery.namespace=default \
85-
--set "autoDiscovery.labels[0].autoscaling=enabled" \
82+
--set autoDiscovery.namespace=default \
83+
--set autoDiscovery.labels[0].foo=bar \
84+
--set autoDiscovery.clusterName=${CLUSTER_NAME} \
8685
--set clusterAPIKubeconfigSecret=${CLUSTER_NAME}-kubeconfig \
8786
--set clusterAPIMode=kubeconfig-incluster
8887
```
8988

90-
This command installs the Cluster Autoscaler and configures it to manage the workload cluster from the management cluster.
89+
This command installs the Cluster Autoscaler and configures it to manage the workload cluster from the management cluster. In the example above, cluster selection is done using the `autoDiscovery` feature, which matches the labels set in the node pool configuration, namespace, and cluster name.
9190

9291
## Prerequisites
9392

charts/capi-kamaji-vsphere/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: capi-kamaji-vsphere
2-
version: 0.2.5
2+
version: 0.2.6
33
appVersion: 1.32.0
44
description: A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API
55
and Kamaji.

charts/capi-kamaji-vsphere/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# capi-kamaji-vsphere
22

3-
![Version: 0.2.5](https://img.shields.io/badge/Version-0.2.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.32.0](https://img.shields.io/badge/AppVersion-1.32.0-informational?style=flat-square)
3+
![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.32.0](https://img.shields.io/badge/AppVersion-1.32.0-informational?style=flat-square)
44

55
A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API and Kamaji.
66

@@ -59,7 +59,6 @@ A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API
5959
| nodePools[0].addressesFromPools | object | `{"enabled":true}` | Use an IPAMProvider pool to reserve IPs |
6060
| nodePools[0].addressesFromPools.enabled | bool | `true` | Enable the IPAMProvider usage |
6161
| nodePools[0].autoscaling.enabled | bool | `false` | Enable autoscaling |
62-
| nodePools[0].autoscaling.labels.autoscaling | string | `"enabled"` | Labels to use for autoscaling: make sure to use the same labels on the autoscaler configuration |
6362
| nodePools[0].autoscaling.maxSize | string | `"6"` | Maximum number of instances in the pool |
6463
| nodePools[0].autoscaling.minSize | string | `"2"` | Minimum number of instances in the pool |
6564
| nodePools[0].dataStore | string | `"datastore"` | VSphere datastore to use |

charts/capi-kamaji-vsphere/templates/machine-deployment.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ metadata:
1111
{{- end }}
1212
{{- end }}
1313
labels:
14-
{{- with .autoscaling }}
15-
{{- if .enabled }}
16-
{{- .labels | toYaml | nindent 4 }}
17-
{{- end }}
18-
{{- end }}
1914
cluster.x-k8s.io/cluster-name: {{ include "cluster-api-kamaji-vsphere.cluster-name" $ | quote }}
2015
name: {{ include "cluster-api-kamaji-vsphere.cluster-name" $ }}-{{ .name }}-md
2116
namespace: {{ $.Release.Namespace }}
@@ -27,11 +22,6 @@ spec:
2722
template:
2823
metadata:
2924
labels:
30-
{{- with .autoscaling }}
31-
{{- if .enabled }}
32-
{{- .labels | toYaml | nindent 8 }}
33-
{{- end }}
34-
{{- end }}
3525
cluster.x-k8s.io/cluster-name: {{ include "cluster-api-kamaji-vsphere.cluster-name" $ | quote }}
3626
spec:
3727
bootstrap:

charts/capi-kamaji-vsphere/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,6 @@ nodePools:
140140
autoscaling:
141141
# -- Enable autoscaling
142142
enabled: false
143-
labels:
144-
# -- Labels to use for autoscaling: make sure to use the same labels on the autoscaler configuration
145-
autoscaling: "enabled"
146143
# -- Minimum number of instances in the pool
147144
minSize: "2"
148145
# -- Maximum number of instances in the pool

0 commit comments

Comments
 (0)