Skip to content

Commit

Permalink
[internal] Changes in CSI initContainers
Browse files Browse the repository at this point in the history
Signed-off-by: v.oleynikov <[email protected]>

Unpacked lib helm

Signed-off-by: v.oleynikov <[email protected]>
  • Loading branch information
duckhawk committed Nov 18, 2024
1 parent ec73e20 commit 953b166
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
Binary file removed charts/deckhouse_lib_helm-1.31.0.tgz
Binary file not shown.
Binary file added charts/deckhouse_lib_helm-1.35.3.tgz
Binary file not shown.
34 changes: 14 additions & 20 deletions templates/csi/controller.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
###
### common
###
{{- define "csi_init_container_command" }}
- "/wait-rpcbind"
{{- end }}

{{- define "csi_init_container_volume_mounts" }}
- name: run
mountPath: /run
{{- define "csi_init_containers" }}
- name: wait-rpc-bind-init-container
command:
- "/wait-rpcbind"
imagePullPolicy: IfNotPresent
image: {{ include "helm_lib_module_image" (list . "waitRpcbind") }}
volumeMounts:
- name: run
mountPath: /run
{{- end }}

{{- $csiInitContainerImage := include "helm_lib_module_image" (list . "waitRpcbind") }}


###
### controller
###
Expand Down Expand Up @@ -47,9 +47,6 @@
emptyDir: {}

{{- if .Values.csiNfs.v3support }}
- name: run-rpcbind-sock
hostPath:
path: /run/rpcbind.sock
- name: run
hostPath:
path: /run
Expand All @@ -65,8 +62,9 @@
name: tmp-dir

{{- if .Values.csiNfs.v3support }}
- name: run-rpcbind-sock
mountPath: /run/rpcbind.sock
- name: run
hostPath:
path: /run
{{- end }}

{{- end }}
Expand All @@ -87,9 +85,7 @@
{{- $_ := set $csiControllerConfig "additionalControllerVolumeMounts" (include "csi_additional_controller_volume_mounts" . | fromYamlArray) }}

{{- if .Values.csiNfs.v3support }}
{{- $_ := set $csiControllerConfig "initContainerImage" $csiInitContainerImage }}
{{- $_ := set $csiControllerConfig "initContainerCommand" (include "csi_init_container_command" . | fromYamlArray) }}
{{- $_ := set $csiControllerConfig "initContainerVolumeMounts" (include "csi_init_container_volume_mounts" . | fromYamlArray) }}
{{- $_ := set $csiControllerConfig "initContainers" (include "csi_init_containers" . | fromYamlArray) }}
{{- end }}

{{- include "helm_lib_csi_controller_manifests" (list . $csiControllerConfig) }}
Expand Down Expand Up @@ -142,9 +138,7 @@
{{- if .Values.csiNfs.v3support }}
{{- $_ := set $csiNodeConfig "additionalNodeVolumes" (include "csi_additional_node_volume" . | fromYamlArray) }}
{{- $_ := set $csiNodeConfig "additionalNodeVolumeMounts" (include "csi_additional_node_volume_mounts" . | fromYamlArray) }}
{{- $_ := set $csiNodeConfig "initContainerImage" $csiInitContainerImage }}
{{- $_ := set $csiNodeConfig "initContainerCommand" (include "csi_init_container_command" . | fromYamlArray) }}
{{- $_ := set $csiNodeConfig "initContainerVolumeMounts" (include "csi_init_container_volume_mounts" . | fromYamlArray) }}
{{- $_ := set $csiNodeConfig "initContainers" (include "csi_init_containers" . | fromYamlArray) }}
{{- end }}

{{- include "helm_lib_csi_node_manifests" (list . $csiNodeConfig) }}

0 comments on commit 953b166

Please sign in to comment.