From dc77548d92db9d07902af2975b6c5b34420bbc76 Mon Sep 17 00:00:00 2001 From: Pauline Ribeyre <4224001+paulineribeyre@users.noreply.github.com> Date: Thu, 2 Jan 2025 16:47:02 -0600 Subject: [PATCH] use funnel version from manifest --- gen3/bin/kube-setup-gen3-workflow.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gen3/bin/kube-setup-gen3-workflow.sh b/gen3/bin/kube-setup-gen3-workflow.sh index 02da2a1af..af020049f 100644 --- a/gen3/bin/kube-setup-gen3-workflow.sh +++ b/gen3/bin/kube-setup-gen3-workflow.sh @@ -7,7 +7,8 @@ setup_funnel_infra() { helm repo update ohsu namespace="$(gen3 db namespace)" - helm upgrade --install funnel ohsu/funnel --namespace $namespace --version 0.1.11 + version="$(g3k_manifest_lookup .versions.funnel)" + helm upgrade --install funnel ohsu/funnel --namespace $namespace --version $version } setup_gen3_workflow_infra() { @@ -73,12 +74,12 @@ EOM roleName="$(gen3 api safe-name $saName)" gen3 awsrole create $roleName $saName policyName="$(gen3 api safe-name gen3-workflow-policy)" - policyInfo=$(gen3_aws_run aws iam create-policy --policy-name "$policyName" --policy-document "$policy" --description "Gen3-Workflow service access") + policyInfo="$(gen3_aws_run aws iam create-policy --policy-name "$policyName" --policy-document "$policy" --description "Gen3-Workflow service access")" if [ -n "$policyInfo" ]; then policyArn="$(jq -e -r '.["Policy"].Arn' <<< "$policyInfo")" || { gen3_log_err "Cannot get 'Policy.Arn' from output: $policyInfo"; return 1; } else gen3_log_info "Unable to create policy '$policyName'. Assume it already exists and create a new version to update the permissions..." - policyArn=$(gen3_aws_run aws iam list-policies --query "Policies[?PolicyName=='$policyName'].Arn" --output text) + policyArn="$(gen3_aws_run aws iam list-policies --query "Policies[?PolicyName=='$policyName'].Arn" --output text)" # there can only be up to 5 versions, so delete old versions (except the current default one) versions="$(gen3_aws_run aws iam list-policy-versions --policy-arn $policyArn | jq -r '.Versions[] | select(.IsDefaultVersion != true) | .VersionId')" @@ -108,7 +109,7 @@ EOM fi secretsFolder="$(gen3_secrets_folder)/g3auto/gen3workflow" if [[ ! -f "$secretsFolder/gen3-workflow-config.yaml" ]]; then - manifestPath=$(g3k_manifest_path) + manifestPath="$(g3k_manifest_path)" hostname="$(g3k_config_lookup ".global.hostname" "$manifestPath")" # encryption_key="$(random_alphanumeric 32 | base64)" if [[ ! -f "$secretsFolder/dbcreds.json" ]]; then