@@ -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={{ . }}
0 commit comments