Skip to content

Commit

Permalink
It's debug print time
Browse files Browse the repository at this point in the history
  • Loading branch information
AidanHilt committed Feb 22, 2024
1 parent 920c4ae commit c4e7fda
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "^.secrets.baseline$",
"lines": null
},
"generated_at": "2024-02-22T20:53:35Z",
"generated_at": "2024-02-22T20:57:50Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -342,7 +342,7 @@
"hashed_secret": "40304f287a52d99fdbe086ad19dbdbf9cc1b3897",
"is_secret": false,
"is_verified": false,
"line_number": 207,
"line_number": 213,
"type": "Secret Keyword"
}
],
Expand Down
10 changes: 8 additions & 2 deletions gen3/bin/kube-setup-argo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ EOF
]
}
EOF
# TODO remove this
echo "Past the buckets policies"
# Create argo SA within the current namespace
gen3_log_info "Creating argo SA in the current namespace"
g3kubectl create sa argo -n $nameSpace | true
Expand Down Expand Up @@ -161,7 +163,8 @@ EOF
roleArn=$(aws iam get-role --role-name "${roleName}" --query 'Role.Arn' --output text)
g3kubectl annotate serviceaccount default eks.amazonaws.com/role-arn=${roleArn} -n $argo_namespace
fi

# TODO remove this
echo "Past the IAM role creation"
# Grant admin access within the current namespace to the argo SA in the current namespace
g3kubectl create rolebinding argo-admin --clusterrole=admin --serviceaccount=$nameSpace:argo -n $nameSpace || true
aws iam put-role-policy --role-name ${roleName} --policy-name ${bucketPolicy} --policy-document file://$policyFile || true
Expand All @@ -177,7 +180,8 @@ EOF

gen3_log_info "Creating bucket lifecycle policy"
aws s3api put-bucket-lifecycle --bucket ${bucketName} --lifecycle-configuration file://$bucketLifecyclePolicyFile

# TODO remove this
echo "Past the service account creation"
# Always update the policy, in case manifest buckets change
aws iam put-role-policy --role-name ${roleName} --policy-name ${bucketPolicy} --policy-document file://$policyFile
if [[ ! -z $internalBucketPolicyFile ]]; then
Expand All @@ -201,6 +205,8 @@ EOF
indexdFencePassword=$(cat $(gen3_secrets_folder)/creds.json | jq -r .indexd.user_db.$indexd_admin_user)
g3kubectl create secret generic "indexd-creds" --from-literal=user=$indexd_admin_user --from-literal=password=$indexdFencePassword -n $argo_namespace
fi
# TODO remove this
echo "End of function... what now?"
}

function setup_argo_db() {
Expand Down

0 comments on commit c4e7fda

Please sign in to comment.