Skip to content
Snippets Groups Projects
Unverified Commit 4b18ee55 authored by Simon Ostendorf's avatar Simon Ostendorf Committed by GitHub
Browse files

feat(charts): add replica count (#498)

This adds configurable replicas to the helm chart.
parent dec2ea13
No related branches found
No related tags found
No related merge requests found
...@@ -49,3 +49,9 @@ If you've already deployed hccm using the `helm install` command above, you can ...@@ -49,3 +49,9 @@ If you've already deployed hccm using the `helm install` command above, you can
```sh ```sh
helm upgrade hccm hcloud/hcloud-cloud-controller-manager -n kube-system --set monitoring.podMonitor.enabled=true helm upgrade hccm hcloud/hcloud-cloud-controller-manager -n kube-system --set monitoring.podMonitor.enabled=true
``` ```
### Multiple replicas
If you want to use multiple replicas you can change `replicaCount` inside the helm values.
If you have more than 1 replica leader election will be turned on automatically.
...@@ -4,7 +4,7 @@ metadata: ...@@ -4,7 +4,7 @@ metadata:
name: {{ include "hcloud-cloud-controller-manager.name" . }} name: {{ include "hcloud-cloud-controller-manager.name" . }}
namespace: {{ .Release.Namespace }} namespace: {{ .Release.Namespace }}
spec: spec:
replicas: 1 replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: 2 revisionHistoryLimit: 2
selector: selector:
matchLabels: matchLabels:
...@@ -50,6 +50,9 @@ spec: ...@@ -50,6 +50,9 @@ spec:
- "--allocate-node-cidrs=true" - "--allocate-node-cidrs=true"
- "--cluster-cidr={{ $.Values.networking.clusterCIDR }}" - "--cluster-cidr={{ $.Values.networking.clusterCIDR }}"
{{- end }} {{- end }}
{{- if (eq (int $.Values.replicaCount) 1) }}
- "--leader-elect=false"
{{- end }}
env: env:
{{- range $key, $value := $.Values.env }} {{- range $key, $value := $.Values.env }}
- name: {{ $key }} - name: {{ $key }}
......
# hccm program command line arguments. # hccm program command line arguments.
# The "--allocate-node-cidrs" + "--cluster-cidr" arguments are managed by the chart and should *not* be set directly here. # The "--allocate-node-cidrs" + "--cluster-cidr" + "--leader-elect" arguments are managed by the chart and should *not* be set directly here.
args: args:
cloud-provider: hcloud cloud-provider: hcloud
leader-elect: "false"
allow-untagged-cloud: "" allow-untagged-cloud: ""
# Read issue #395 to understand how changes to this value affect you. # Read issue #395 to understand how changes to this value affect you.
...@@ -14,6 +13,8 @@ args: ...@@ -14,6 +13,8 @@ args:
# https://github.com/hetznercloud/hcloud-cloud-controller-manager/issues/492 # https://github.com/hetznercloud/hcloud-cloud-controller-manager/issues/492
webhook-secure-port: "0" webhook-secure-port: "0"
replicaCount: 1
# hccm environment variables # hccm environment variables
env: env:
# The following two variables should *not* be set here: # The following two variables should *not* be set here:
......
...@@ -64,11 +64,11 @@ spec: ...@@ -64,11 +64,11 @@ spec:
- "/bin/hcloud-cloud-controller-manager" - "/bin/hcloud-cloud-controller-manager"
- "--allow-untagged-cloud" - "--allow-untagged-cloud"
- "--cloud-provider=hcloud" - "--cloud-provider=hcloud"
- "--leader-elect=false"
- "--route-reconciliation-period=30s" - "--route-reconciliation-period=30s"
- "--webhook-secure-port=0" - "--webhook-secure-port=0"
- "--allocate-node-cidrs=true" - "--allocate-node-cidrs=true"
- "--cluster-cidr=10.244.0.0/16" - "--cluster-cidr=10.244.0.0/16"
- "--leader-elect=false"
env: env:
- name: HCLOUD_TOKEN - name: HCLOUD_TOKEN
valueFrom: valueFrom:
......
...@@ -63,9 +63,9 @@ spec: ...@@ -63,9 +63,9 @@ spec:
- "/bin/hcloud-cloud-controller-manager" - "/bin/hcloud-cloud-controller-manager"
- "--allow-untagged-cloud" - "--allow-untagged-cloud"
- "--cloud-provider=hcloud" - "--cloud-provider=hcloud"
- "--leader-elect=false"
- "--route-reconciliation-period=30s" - "--route-reconciliation-period=30s"
- "--webhook-secure-port=0" - "--webhook-secure-port=0"
- "--leader-elect=false"
env: env:
- name: HCLOUD_TOKEN - name: HCLOUD_TOKEN
valueFrom: valueFrom:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment