File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {{- define " csiRcloneCertificates.initContainer" -}}
2+ {{- $customCAsEnabled := .Values.csiNodepluginRclone.certificates.customCAs -}}
3+ - name: init-certificates
4+ image: " {{ .Values.csiNodepluginRclone.certificates.image.repository }}:{{ .Values.csiNodepluginRclone.certificates.image.tag }}"
5+ volumeMounts:
6+ - name: etc-ssl-certs
7+ mountPath: /etc/ssl/certs/
8+ {{- if $customCAsEnabled }}
9+ - name: custom-ca-certs
10+ mountPath: /usr/local/share/ca-certificates
11+ readOnly: true
12+ {{- end -}}
13+ {{- end -}}
Original file line number Diff line number Diff line change 1+ {{- define " csiRcloneCertificates.volumeMounts.system" -}}
2+ - name: etc-ssl-certs
3+ mountPath: /etc/ssl/certs/
4+ readOnly: true
5+ {{- end -}}
Original file line number Diff line number Diff line change 1+ {{- define " csiRcloneCertificatesForMounts.volumes" -}}
2+ {{- $customCAsEnabled := .Values.csiNodepluginRclone.certificates.customCAs -}}
3+ - name: etc-ssl-certs
4+ emptyDir:
5+ medium: " Memory"
6+ {{- if $customCAsEnabled }}
7+ - name: custom-ca-certs
8+ projected:
9+ defaultMode: 0444
10+ sources:
11+ {{- if $customCAsEnabled }}
12+ {{- range $customCA := .Values.csiNodepluginRclone.certificates.customCAs }}
13+ - secret:
14+ name: {{ $customCA .secret }}
15+ {{- end -}}
16+ {{- end -}}
17+ {{- end -}}
18+ {{- end -}}
Original file line number Diff line number Diff line change 2020 spec :
2121 serviceAccountName : {{ include "chart.fullname" . }}-nodeplugin
2222 dnsPolicy : ClusterFirstWithHostNet
23+ initContainers :
24+ {{- include "csiRcloneCertificates.initContainer" . | nindent 6 }}
2325 containers :
2426 - name : node-driver-registrar
2527 args :
@@ -143,6 +145,7 @@ spec:
143145 name : pods-mount-dir
144146 - mountPath : /var/lib/rclone
145147 name : cache-dir
148+ {{- include "csiRcloneCertificates.volumeMounts.system" . | nindent 8 }}
146149 {{- with .Values.csiNodepluginRclone.nodeSelector }}
147150 nodeSelector :
148151 {{ toYaml . | nindent 8 }}
@@ -170,3 +173,4 @@ spec:
170173 name : registration-dir
171174 - name : cache-dir
172175 emptyDir : {}
176+ {{- include "csiRcloneCertificatesForMounts.volumes" . | nindent 6 }}
Original file line number Diff line number Diff line change @@ -106,6 +106,17 @@ csiNodepluginRclone:
106106 # value: "32M"
107107 # - name: "transfers"
108108 # value: "8"
109+ # # Specify the name of a existing K8s secrets that contains the certificate
110+ # # if you would like to use custom CAs. The key for the secret
111+ # # should have the .crt extension otherwise it is ignored. The
112+ # # keys across all secrets are mounted as files in one location so
113+ # # the keys across all secrets have to be unique.
114+ certificates :
115+ image :
116+ repository : renku/certificates
117+ tag : " 0.0.2"
118+ customCAs : []
119+ # - secret:
109120 serviceAccount :
110121 annotations : {}
111122 nodeSelector : {}
You can’t perform that action at this time.
0 commit comments