@@ -13,6 +13,11 @@ cpu: 10m
1313memory: 25Mi
1414{ {- end } }
1515
16+ { {- define " syncer_resources" } }
17+ cpu: 10m
18+ memory: 25Mi
19+ { {- end } }
20+
1621{ {- define " snapshotter_resources" } }
1722cpu: 10m
1823memory: 25Mi
@@ -36,6 +41,7 @@ memory: 50Mi
3641 { {- $fullname := $config .fullname | default " csi-controller" } }
3742 { {- $snapshotterEnabled := dig " snapshotterEnabled" true $config } }
3843 { {- $resizerEnabled := dig " resizerEnabled" true $config } }
44+ { {- $syncerEnabled := dig " syncerEnabled" false $config } }
3945 { {- $topologyEnabled := dig " topologyEnabled" true $config } }
4046 { {- $extraCreateMetadataEnabled := dig " extraCreateMetadataEnabled" false $config } }
4147 { {- $controllerImage := $config .controllerImage | required " $config.controllerImage is required" } }
@@ -48,6 +54,7 @@ memory: 50Mi
4854 { {- $resizerWorkers := $config .resizerWorkers | default " 10" } }
4955 { {- $snapshotterWorkers := $config .snapshotterWorkers | default " 10" } }
5056 { {- $additionalControllerEnvs := $config .additionalControllerEnvs } }
57+ { {- $additionalSyncerEnvs := $config .additionalSyncerEnvs } }
5158 { {- $additionalControllerArgs := $config .additionalControllerArgs } }
5259 { {- $additionalControllerVolumes := $config .additionalControllerVolumes } }
5360 { {- $additionalControllerVolumeMounts := $config .additionalControllerVolumeMounts } }
@@ -65,6 +72,9 @@ memory: 50Mi
6572 { {- $resizerImageName := join " " (list " csiExternalResizer" $kubernetesSemVer .Major $kubernetesSemVer .Minor) } }
6673 { {- $resizerImage := include " helm_lib_module_common_image_no_fail" (list $context $resizerImageName ) } }
6774
75+ { {- $syncerImageName := join " " (list " csiVsphereSyncer" $kubernetesSemVer .Major $kubernetesSemVer .Minor) } }
76+ { {- $syncerImage := include " helm_lib_module_common_image_no_fail" (list $context $syncerImageName ) } }
77+
6878 { {- $snapshotterImageName := join " " (list " csiExternalSnapshotter" $kubernetesSemVer .Major $kubernetesSemVer .Minor) } }
6979 { {- $snapshotterImage := include " helm_lib_module_common_image_no_fail" (list $context $snapshotterImageName ) } }
7080
@@ -109,6 +119,14 @@ spec:
109119 cpu: 20m
110120 memory: 50Mi
111121 { {- end } }
122+ { {- if $syncerEnabled } }
123+ - containerName: "syncer"
124+ minAllowed:
125+ { {- include " syncer_resources" $context | nindent 8 } }
126+ maxAllowed:
127+ cpu: 20m
128+ memory: 50Mi
129+ { {- end } }
112130 { {- if $snapshotterEnabled } }
113131 - containerName: "snapshotter"
114132 minAllowed:
@@ -278,6 +296,33 @@ spec:
278296 { {- include " helm_lib_module_ephemeral_storage_logs_with_extra" 10 | nindent 12 } }
279297 { {- if not ( $context .Values.global.enabledModules | has " vertical-pod-autoscaler-crd" ) } }
280298 { {- include " resizer_resources" $context | nindent 12 } }
299+ { {- end } }
300+ { {- end } }
301+ { {- if $syncerEnabled } }
302+ - name: syncer
303+ { {- include " helm_lib_module_container_security_context_read_only_root_filesystem" . | nindent 8 } }
304+ image: { { $syncerImage | quote } }
305+ args:
306+ - "--leader-election"
307+ - "--leader-election-lease-duration=30s"
308+ - "--leader-election-renew-deadline=20s"
309+ - "--leader-election-retry-period=10s"
310+ { {- if $additionalControllerArgs } }
311+ { {- $additionalControllerArgs | toYaml | nindent 8 } }
312+ { {- end } }
313+ { {- if $additionalSyncerEnvs } }
314+ env:
315+ { {- $additionalSyncerEnvs | toYaml | nindent 8 } }
316+ { {- end } }
317+ { {- if $additionalControllerVolumeMounts } }
318+ volumeMounts:
319+ { {- $additionalControllerVolumeMounts | toYaml | nindent 8 } }
320+ { {- end } }
321+ resources:
322+ requests:
323+ { {- include " helm_lib_module_ephemeral_storage_logs_with_extra" 10 | nindent 12 } }
324+ { {- if not ( $context .Values.global.enabledModules | has " vertical-pod-autoscaler-crd" ) } }
325+ { {- include " syncer_resources" $context | nindent 12 } }
281326 { {- end } }
282327 { {- end } }
283328 { {- if $snapshotterEnabled } }
0 commit comments