File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed
Expand file tree Collapse file tree 1 file changed +18
-4
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 () {
78 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"
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.pem ${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
You can’t perform that action at this time.
0 commit comments