Skip to content

Commit 06d49fb

Browse files
committed
feat(charts): allow overriding of the cluster's name
1 parent 7db0b87 commit 06d49fb

4 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎charts/cozystack/templates/_helpers.tpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ cluster:
103103
{{- toYaml .Values.podSubnets | nindent 6 }}
104104
serviceSubnets:
105105
{{- toYaml .Values.serviceSubnets | nindent 6 }}
106-
clusterName: "{{ .Chart.Name }}"
106+
clusterName: {{ .Values.clusterName | default .Chart.Name | quote }}
107107
controlPlane:
108108
endpoint: {{ required "values.yaml: `endpoint` must be set to the cluster control-plane URL (e.g. https://<vip>:6443). This field is cluster-wide: every node's kubelet and kube-proxy dials it, so it cannot be auto-derived from the current node's IP -- `talm template` runs once per node and has no way to reconcile per-node IPs into a single shared endpoint. For multi-node setups use a VIP (cozystack floatingIP) or an external load balancer; for single-node clusters the node's routable IP works." .Values.endpoint | quote }}
109109
{{- if eq .MachineType "controlplane" }}

‎charts/cozystack/values.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
# Example: endpoint: "https://192.168.0.1:6443"
2020
endpoint: ""
2121

22+
# Optional override for the cluster's name (defaults to Chart.Name)
23+
clusterName: ""
24+
2225
clusterDomain: cozy.local
2326
# Layer-2 VIP for cozystack multi-node setups. When set, the chart
2427
# emits a Layer2VIPConfig document pinning this IP as a floating

‎charts/generic/templates/_helpers.tpl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ cluster:
5151
{{- toYaml .Values.podSubnets | nindent 6 }}
5252
serviceSubnets:
5353
{{- toYaml .Values.serviceSubnets | nindent 6 }}
54-
clusterName: "{{ .Chart.Name }}"
54+
clusterName: {{ .Values.clusterName | default .Chart.Name | quote }}
5555
controlPlane:
5656
endpoint: {{ required "values.yaml: `endpoint` must be set to the cluster control-plane URL (e.g. https://<vip>:6443). This field is cluster-wide: every node's kubelet and kube-proxy dials it, so it cannot be auto-derived from the current node's IP -- `talm template` runs once per node and has no way to reconcile per-node IPs into a single shared endpoint. For multi-node setups use a VIP or an external load balancer; for single-node clusters the node's routable IP works." .Values.endpoint | quote }}
5757
{{- if eq .MachineType "controlplane" }}

‎charts/generic/values.yaml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
# Example: endpoint: "https://192.168.0.1:6443"
99
endpoint: ""
1010

11+
# Optional override for the cluster's name (defaults to Chart.Name)
12+
clusterName: ""
13+
1114
podSubnets:
1215
- 10.244.0.0/16
1316
serviceSubnets:

0 commit comments

Comments
 (0)