File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed
Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 22
33replicas_history_file=" /minio-config/MINIO_REPLICAS_HISTORY"
44bucket_dir=" /data"
5+ writable_certs_path=" /data/.minio/certs"
56
67setup_tls_certs () {
7- if [ " $TLS_ENABLED " = " true" ] && [ -f ${CERTS_PATH} /ca.pem ]; then
8- echo " Setting up TLS CA certificate for MinIO..."
9- mkdir -p ${CERTS_PATH} /CAs
10- cp -L ${CERTS_PATH} /ca.pem ${CERTS_PATH} /CAs/ca.crt
11- echo " TLS CA certificate setup completed"
8+ if [ " $TLS_ENABLED " = " true" ] && [ -f ${CERTS_PATH} /ca.crt ]; then
9+ echo " Setting up TLS certificates for MinIO..."
10+
11+ # Create writable certs directory
12+ mkdir -p ${writable_certs_path} /CAs
13+
14+ # Copy certificates from read-only mount to writable location
15+ cp -L ${CERTS_PATH} /public.crt ${writable_certs_path} /public.crt
16+ cp -L ${CERTS_PATH} /private.key ${writable_certs_path} /private.key
17+ cp -L ${CERTS_PATH} /ca.crt ${writable_certs_path} /CAs/ca.crt
18+
19+ # Set proper permissions
20+ chmod 600 ${writable_certs_path} /private.key
21+
22+ # Override CERTS_PATH to use writable location
23+ export CERTS_PATH=${writable_certs_path}
24+
25+ echo " TLS certificates setup completed at ${writable_certs_path} "
1226 fi
1327}
1428
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ spec:
104104 tls :
105105 volumeName : tls
106106 mountPath : {{ .Values.certsPath | quote }}
107- caFile : ca.pem
107+ caFile : ca.crt
108108 certFile : public.crt
109109 keyFile : private.key
110110 roles :
You can’t perform that action at this time.
0 commit comments