Skip to content

Commit 17a97be

Browse files
authored
[improvement] Allow setting vpcName(s) without enabling route controller (linode#332)
* Allow setting vpcName(s) without enabling route controller * Update docs
1 parent 509f22e commit 17a97be

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

deploy/chart/templates/daemonset.yaml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,34 @@ spec:
4444
{{- with .Values.linodegoDebug }}
4545
- --linodego-debug={{ . }}
4646
{{- end }}
47-
{{- if .Values.routeController }}
48-
- --enable-route-controller=true
49-
{{- if and .Values.routeController.vpcName .Values.routeController.vpcNames }}
50-
{{- fail "Both vpcName and vpcNames are set. Please use only vpcNames." }}
47+
{{- $vpcNames := .Values.vpcNames }}
48+
{{- if and .Values.routeController .Values.routeController.vpcNames }}
49+
{{- $vpcNames = .Values.routeController.vpcNames }}
5150
{{- end }}
52-
{{- if not (or .Values.routeController.vpcName .Values.routeController.vpcNames) }}
53-
{{- fail "Neither vpcName nor vpcNames is set. Please set one of them." }}
51+
{{- $vpcName := .Values.vpcName }}
52+
{{- if and .Values.routeController .Values.routeController.vpcName }}
53+
{{- $vpcName = .Values.routeController.vpcName }}
5454
{{- end }}
55-
{{- with .Values.routeController.vpcName }}
56-
- --vpc-name={{ . }}
55+
{{- if and $vpcName $vpcNames }}
56+
{{- fail "Both vpcName and vpcNames are set. Please use only vpcNames." }}
5757
{{- end }}
58-
{{- with .Values.routeController.vpcNames }}
59-
- --vpc-names={{ . }}
58+
{{- if .Values.routeController }}
59+
- --enable-route-controller=true
60+
{{- if not (or $vpcName $vpcNames) }}
61+
{{- fail "Neither vpcName nor vpcNames is set. Please set one of them." }}
6062
{{- end }}
6163
- --configure-cloud-routes={{ default true .Values.routeController.configureCloudRoutes }}
6264
- --cluster-cidr={{ required "A valid .Values.routeController.clusterCIDR is required" .Values.routeController.clusterCIDR }}
6365
{{- with .Values.routeController.routeReconciliationPeriod }}
6466
- --route-reconciliation-period={{ . }}
6567
{{- end }}
6668
{{- end }}
69+
{{- with $vpcNames }}
70+
- --vpc-names={{ . }}
71+
{{- end }}
72+
{{- with $vpcName }}
73+
- --vpc-name={{ . }}
74+
{{- end }}
6775
{{- if .Values.sharedIPLoadBalancing }}
6876
{{- with .Values.sharedIPLoadBalancing.bgpNodeSelector }}
6977
- --bgp-node-selector={{ . }}

deploy/chart/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ tolerations:
7474
# clusterCIDR: 10.0.0.0/8
7575
# configureCloudRoutes: true
7676

77+
# vpcs that node internal IPs will be assigned from (not required if already specified in routeController)
78+
# vpcName: <name of VPC> [Deprecated: use vpcNames instead]
79+
# vpcNames: <comma separated list of vpc names>
80+
7781
# Enable Linode token health checker
7882
# tokenHealthChecker: true
7983

docs/getting-started/helm-installation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ routeController:
2525
clusterCIDR: "10.0.0.0/8"
2626
configureCloudRoutes: true
2727

28+
# Optional: Assign node internal IPs from VPCs without enabling route controller
29+
# Not required if specified in routeController
30+
vpcNames: "" # Comma separated VPC names
31+
2832
# Optional: Configure shared IP load balancing instead of NodeBalancers (requires Cilium CNI and BGP Control Plane enabled)
2933
sharedIPLoadBalancing:
3034
loadBalancerType: cilium-bgp

0 commit comments

Comments
 (0)