Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change lib helm csi init containers #51

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
39 changes: 19 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,8 @@
name: tmp-dir

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

{{- end }}
Expand All @@ -87,9 +84,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 @@ -129,6 +124,12 @@
{{- define "csi_additional_node_volume_mounts" }}
- name: run-rpcbind-sock
mountPath: /run/rpcbind.sock

{{- if .Values.csiNfs.v3support }}
- name: run
mountPath: /run
{{- end }}

{{- end }}

{{- $csiNodeConfig := dict }}
Expand All @@ -142,9 +143,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) }}
Loading