Skip to content
Open
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
14 changes: 14 additions & 0 deletions deploy/csi-rclone/templates/_certificates-init-container.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- define "csiRcloneCertificates.initContainer" -}}
{{- $customCAsEnabled := .Values.csiNodepluginRclone.certificates.customCAs -}}
{{- $customCAsForMountsEnabled := .Values.csiNodepluginRclone.certificates.customCAsForDataConnectorMounts -}}
- name: init-certificates
image: "{{ .Values.csiNodepluginRclone.certificates.image.repository }}:{{ .Values.csiNodepluginRclone.certificates.image.tag }}"
volumeMounts:
- name: etc-ssl-certs
mountPath: /etc/ssl/certs/
{{- if or $customCAsEnabled $customCAsForMountsEnabled }}
- name: custom-ca-certs
mountPath: /usr/local/share/ca-certificates
readOnly: true
{{- end -}}
{{- end -}}
5 changes: 5 additions & 0 deletions deploy/csi-rclone/templates/_certificates-volume-mounts.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{- define "csiRcloneCertificates.volumeMounts.system" -}}
- name: etc-ssl-certs
mountPath: /etc/ssl/certs/
readOnly: true
{{- end -}}
25 changes: 25 additions & 0 deletions deploy/csi-rclone/templates/_certificates-volumes.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- define "csiRcloneCertificatesForMounts.volumes" -}}
{{- $customCAsEnabled := .Values.csiNodepluginRclone.certificates.customCAs -}}
{{- $customCAsForMountsEnabled := .Values.csiNodepluginRclone.certificates.customCAsForDataConnectorMounts -}}
- name: etc-ssl-certs
emptyDir:
medium: "Memory"
{{- if or $customCAsEnabled $customCAsForMountsEnabled }}
- name: custom-ca-certs
projected:
defaultMode: 0444
sources:
{{- if $customCAsEnabled }}
{{- range $customCA := .Values.csiNodepluginRclone.certificates.customCAs }}
- secret:
name: {{ $customCA.secret }}
{{- end -}}
{{- end -}}
{{- if $customCAsForMountsEnabled }}
{{- range $customCA := .Values.csiNodepluginRclone.certificates.customCAsForDataConnectorMounts }}
- secret:
name: {{ $customCA.secret }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
4 changes: 4 additions & 0 deletions deploy/csi-rclone/templates/csi-nodeplugin-rclone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ spec:
spec:
serviceAccountName: {{ include "chart.fullname" . }}-nodeplugin
dnsPolicy: ClusterFirstWithHostNet
initContainers:
{{- include "csiRcloneCertificates.initContainer" . | nindent 6 }}
containers:
- name: node-driver-registrar
args:
Expand Down Expand Up @@ -143,6 +145,7 @@ spec:
name: pods-mount-dir
- mountPath: /var/lib/rclone
name: cache-dir
{{- include "csiRcloneCertificates.volumeMounts.system" . | nindent 8 }}
{{- with .Values.csiNodepluginRclone.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
Expand Down Expand Up @@ -170,3 +173,4 @@ spec:
name: registration-dir
- name: cache-dir
emptyDir: {}
{{- include "csiRcloneCertificatesForMounts.volumes" . | nindent 6 }}
13 changes: 13 additions & 0 deletions deploy/csi-rclone/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ csiNodepluginRclone:
# value: "32M"
# - name: "transfers"
# value: "8"
## Specify the name of a existing K8s secrets that contains the certificate
## if you would like to use custom CAs. The key for the secret
## should have the .crt extension otherwise it is ignored. The
## keys across all secrets are mounted as files in one location so
## the keys across all secrets have to be unique.
certificates:
image:
repository: renku/certificates
tag: "0.0.2"
customCAs: []
# - secret:
customCAsForDataConnectorMounts: []
# - secret:
serviceAccount:
annotations: {}
nodeSelector: {}
Expand Down