@@ -15,13 +15,21 @@ spec:
1515 app : ccm-linode
1616 spec :
1717 serviceAccountName : ccm-linode
18- {{- if .Values.nodeSelector }}
18+ {{- with .Values.securityContext }}
19+ securityContext :
20+ {{- toYaml . | nindent 8 }}
21+ {{- end }}
22+ {{- with .Values.nodeSelector }}
1923 nodeSelector :
20- {{ toYaml .Values.nodeSelector | indent 8 }}
24+ {{- toYaml . | nindent 8 }}
25+ {{- end }}
26+ {{- with .Values.affinity }}
27+ affinity :
28+ {{- toYaml . | nindent 8 }}
2129 {{- end }}
22- {{- if .Values.tolerations }}
30+ {{- with .Values.tolerations }}
2331 tolerations :
24- {{ toYaml .Values.tolerations | indent 8 }}
32+ {{- toYaml . | nindent 8 }}
2533 {{- end }}
2634 hostNetwork : true
2735 containers :
3341 - --v=3
3442 - --secure-port=10253
3543 - --webhook-secure-port=0
36- {{- if .Values.linodegoDebug }}
37- - --linodego-debug={{ .Values.linodegoDebug }}
44+ {{- with .Values.linodegoDebug }}
45+ - --linodego-debug={{ . }}
3846 {{- end }}
3947 {{- if .Values.routeController }}
4048 - --enable-route-controller=true
@@ -44,36 +52,40 @@ spec:
4452 {{- if not (or .Values.routeController.vpcName .Values.routeController.vpcNames) }}
4553 {{- fail "Neither vpcName nor vpcNames is set. Please set one of them." }}
4654 {{- end }}
47- {{- if .Values.routeController.vpcName }}
48- - --vpc-name={{ .Values.routeController.vpcName }}
55+ {{- with .Values.routeController.vpcName }}
56+ - --vpc-name={{ . }}
4957 {{- end }}
50- {{- if .Values.routeController.vpcNames }}
51- - --vpc-names={{ .Values.routeController.vpcNames }}
58+ {{- with .Values.routeController.vpcNames }}
59+ - --vpc-names={{ . }}
5260 {{- end }}
5361 - --configure-cloud-routes={{ default true .Values.routeController.configureCloudRoutes }}
5462 - --cluster-cidr={{ required "A valid .Values.routeController.clusterCIDR is required" .Values.routeController.clusterCIDR }}
55- {{- if .Values.routeController.routeReconciliationPeriod }}
56- - --route-reconciliation-period={{ .Values.routeController.routeReconciliationPeriod }}
63+ {{- with .Values.routeController.routeReconciliationPeriod }}
64+ - --route-reconciliation-period={{ . }}
5765 {{- end }}
5866 {{- end }}
5967 {{- if .Values.sharedIPLoadBalancing }}
60- {{- if .Values.sharedIPLoadBalancing.bgpNodeSelector }}
61- - --bgp-node-selector={{ .Values.sharedIPLoadBalancing.bgpNodeSelector }}
68+ {{- with .Values.sharedIPLoadBalancing.bgpNodeSelector }}
69+ - --bgp-node-selector={{ . }}
6270 {{- end }}
63- {{- if .Values.sharedIPLoadBalancing.ipHolderSuffix }}
64- - --ip-holder-suffix={{ .Values.sharedIPLoadBalancing.ipHolderSuffix }}
71+ {{- with .Values.sharedIPLoadBalancing.ipHolderSuffix }}
72+ - --ip-holder-suffix={{ . }}
6573 {{- end}}
6674 - --load-balancer-type={{ required "A valid .Values.sharedIPLoadBalancing.loadBalancerType is required for shared IP load-balancing" .Values.sharedIPLoadBalancing.loadBalancerType }}
6775 {{- end }}
68- {{- if .Values.tokenHealthChecker }}
69- - --enable-token-health-checker={{ .Values.tokenHealthChecker }}
76+ {{- with .Values.tokenHealthChecker }}
77+ - --enable-token-health-checker={{ . }}
7078 {{- end }}
71- {{- if .Values.nodeBalancerTags }}
72- - --nodebalancer-tags={{ join " " .Values.nodeBalancerTags }}
79+ {{- with .Values.nodeBalancerTags }}
80+ - --nodebalancer-tags={{ join " " . }}
7381 {{- end }}
7482 {{- if .Values.allowUnauthorizedMetrics }}
7583 - --authorization-always-allow-paths="/metrics"
7684 {{- end }}
85+ {{- with .Values.containerSecurityContext }}
86+ securityContext :
87+ {{- toYaml . | nindent 12 }}
88+ {{- end }}
7789 volumeMounts :
7890 - mountPath : /etc/kubernetes
7991 name : k8s
0 commit comments