Skip to content

Commit ef31aed

Browse files
authored
prepare simcore stack: secret path processing (#1017)
In #1015 secret path processing was removed what led to a bug (stack.yml file contains absolute paths to secrets which do not exist in deploy_simcore stage) Related PRs: * #1015
1 parent 0e09f11 commit ef31aed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/deployments/prepare_simcore_stack.bash

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,20 @@ cd "$repo_basedir"
4545
log_info "Creating stack.yml file..."
4646
scripts/deployments/compose_stack_yml.bash
4747

48+
log_info "Ensuring dask secrets are relative to the stack file"
49+
# Check if the dask_tls_cert secret exists and update its file path if it does.
50+
if ./yq eval '.secrets.dask_tls_cert' stack.yml >/dev/null; then
51+
./yq eval --inplace '.secrets.dask_tls_cert.file = "./assets/dask-certificates/dask-cert.pem"' stack.yml
52+
else
53+
log_warning "The 'dask_tls_cert' secret does not exist. Skipping this step."
54+
fi
55+
56+
# Check if the dask_tls_key secret exists and update its file path if it does.
57+
if ./yq eval '.secrets.dask_tls_key' stack.yml >/dev/null; then
58+
./yq eval --inplace '.secrets.dask_tls_key.file = "./assets/dask-certificates/dask-key.pem"' stack.yml
59+
else
60+
log_warning "The 'dask_tls_key' secret does not exist. Skipping this step."
61+
fi
62+
4863
log_info "Adding prefix $PREFIX_STACK_NAME to all services..."
4964
./yq "with(.services; with_entries(.key |= \"${PREFIX_STACK_NAME}_\" + .))" stack.yml >"$this_script_dir"/stack_with_prefix.yml

0 commit comments

Comments
 (0)