Skip to content

Commit 10fea78

Browse files
committed
feat: custom cluster domain
1 parent 7f58147 commit 10fea78

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
lines changed

charts/capi-kamaji-vsphere/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ A Helm chart for deploying a Kamaji Tenant Cluster on vSphere using Cluster API
2020

2121
| Key | Type | Default | Description |
2222
|-----|------|---------|-------------|
23+
| cluster.clusterNetwork.apiServerPort | int | `6443` | API Server port |
24+
| cluster.clusterNetwork.pods.cidrBlocks | list | `["10.93.0.0/16"]` | CIDR range for pods |
25+
| cluster.clusterNetwork.serviceDomain | string | `"cluster.local"` | Service Domain for cluster DNS |
26+
| cluster.clusterNetwork.services.cidrBlocks | list | `["10.96.0.0/16"]` | CIDR range for services |
2327
| cluster.controlPlane.addons.coreDNS | object | `{}` | KamajiControlPlane coreDNS configuration |
2428
| cluster.controlPlane.addons.konnectivity | object | `{}` | KamajiControlPlane konnectivity configuration |
2529
| cluster.controlPlane.addons.kubeProxy | object | `{}` | KamajiControlPlane kube-proxy configuration |

charts/capi-kamaji-vsphere/templates/cluster.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,33 @@ metadata:
66
name: {{ include "cluster-api-kamaji-vsphere.cluster-name" . }}
77
namespace: {{ .Release.Namespace }}
88
spec:
9+
{{- if .Values.cluster.clusterNetwork }}
10+
clusterNetwork:
11+
{{- if .Values.cluster.clusterNetwork.apiServerPort }}
12+
apiServerPort: {{ .apiServerPort | default 6443 }}
13+
{{- end }}
14+
{{- if .Values.cluster.clusterNetwork.pods }}
15+
{{- if .Values.cluster.clusterNetwork.pods.cidrBlocks }}
16+
pods:
17+
cidrBlocks:
18+
{{- range .Values.cluster.clusterNetwork.pods.cidrBlocks }}
19+
- {{ . | quote }}
20+
{{- end }}
21+
{{- end }}
22+
{{- end }}
23+
{{- if .Values.cluster.clusterNetwork.services }}
24+
{{- if .Values.cluster.clusterNetwork.services.cidrBlocks }}
25+
services:
26+
cidrBlocks:
27+
{{- range .Values.cluster.clusterNetwork.services.cidrBlocks }}
28+
- {{ . | quote }}
29+
{{- end }}
30+
{{- end }}
31+
{{- end }}
32+
{{- if .Values.cluster.clusterNetwork.serviceDomain }}
33+
serviceDomain: {{ .Values.cluster.clusterNetwork.serviceDomain | default "cluster.local" | quote }}
34+
{{- end }}
35+
{{- end }}
936
controlPlaneRef:
1037
apiVersion: controlplane.cluster.x-k8s.io/v1beta1
1138
kind: KamajiControlPlane

charts/capi-kamaji-vsphere/values.yaml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,19 @@ ipamProvider:
3232
cluster:
3333
# -- Cluster name. If unset, the release name will be used
3434
name: ""
35+
clusterNetwork:
36+
# -- API Server port
37+
apiServerPort: 6443
38+
# -- Service Domain for cluster DNS
39+
serviceDomain: cluster.local
40+
pods:
41+
# -- CIDR range for pods
42+
cidrBlocks:
43+
- "10.93.0.0/16"
44+
services:
45+
# -- CIDR range for services
46+
cidrBlocks:
47+
- "10.96.0.0/16"
3548
controlPlane:
3649
# -- Labels to add to the control plane
3750
labels:
@@ -113,10 +126,6 @@ cluster:
113126

114127
nodePools:
115128
- name: default
116-
# # -- Additional cloud-init files to pass to the machines
117-
# additionalCloudInitFiles: |
118-
# #cloud-config
119-
# timezone: Europe/Rome
120129
# -- VSphere datastore to use
121130
dataStore: "datastore"
122131
# -- VSphere folder to store VMs
@@ -183,6 +192,10 @@ nodePools:
183192
sshAuthorizedKeys: []
184193
# -- sudoers configuration
185194
sudo: ALL=(ALL) NOPASSWD:ALL
195+
# # -- Additional cloud-init files to pass to the machines
196+
# additionalCloudInitFiles: |
197+
# #cloud-config
198+
# timezone: Europe/Rome
186199
# -- Labels to add to the node pool when joining the cluster
187200
# labels: "node.kubernetes.io/node=foo"
188201
# -- Taints to add to the node pool when joining the cluster

0 commit comments

Comments
 (0)