Skip to content

Commit

Permalink
Fix/argo wrapper default url (#2486)
Browse files Browse the repository at this point in the history
* Adding a secret to contain all values for any workflow templates

* Adding an override namespace argument to kube-setup-argo

* Fixing a typo

* You'd think I'd never written Bash before

* Adding the last part of the namespace override logic

* Debug prints

* Trying to figure out why the override namespace logic doesn't work

* Just checking

* Desperate

* I think we can't use echo in gen3 scripts

* Sanity check

* Just a commit

* Checking if we get the argo_namespace correctly

* Making the print clearer

* It's debug print time

* Fixing references

* Adding some stuff

* Removing debugs, and adding --overwrite

* Adding double quotes

* Fixing kube-setup-argo-wrapper to have default values for argo-service URL and argo namespace

* Fixing /tmp/config.ini collisions

* Turns out that wasn't the way to go, instead we'll just delete /tmp/config.ini to account for multiple environments

* Removed some extra stuff that snuck in
  • Loading branch information
AidanHilt authored Feb 27, 2024
1 parent c5c5486 commit 13fb239
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .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": "2023-10-26T21:32:44Z",
"generated_at": "2024-02-23T20:30:41Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down
23 changes: 16 additions & 7 deletions gen3/bin/kube-setup-argo-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,26 @@ if [[ -z "$GEN3_SOURCE_ONLY" ]]; then

gen3 roll argo-wrapper
g3kubectl apply -f "${GEN3_HOME}/kube/services/argo-wrapper/argo-wrapper-service.yaml"


if g3k_manifest_lookup .argo.argo_server_service_url 2> /dev/null; then
argo_server_service_url=$(g3k_manifest_lookup .argo.argo_server_service_url)
export ARGO_HOST=$(g3k_manifest_lookup .argo.argo_server_service_url)
else
export ARGO_HOST="http://argo-argo-workflows-server.argo.svc.cluster.local:2746"
fi

if g3k_config_lookup '.argo_namespace' $(g3k_manifest_init)/$(g3k_hostname)/manifests/argo/argo.json 2> /dev/null; then
export ARGO_NAMESPACE=$(g3k_config_lookup '.argo_namespace' $(g3k_manifest_init)/$(g3k_hostname)/manifests/argo/argo.json)
else
export ARGO_NAMESPACE="argo"
fi

export ARGO_HOST=${argo_server_service_url}
export ARGO_NAMESPACE=argo-$(gen3 db namespace)
envsubst <"${GEN3_HOME}/kube/services/argo-wrapper/config.ini" > /tmp/config.ini
envsubst <"${GEN3_HOME}/kube/services/argo-wrapper/config.ini" > /tmp/config.ini

g3kubectl delete configmap argo-wrapper-namespace-config
g3kubectl create configmap argo-wrapper-namespace-config --from-file /tmp/config.ini
fi
g3kubectl delete configmap argo-wrapper-namespace-config
g3kubectl create configmap argo-wrapper-namespace-config --from-file /tmp/config.ini

rm /tmp/config.ini

gen3_log_info "the argo-wrapper service has been deployed onto the kubernetes cluster"
fi

0 comments on commit 13fb239

Please sign in to comment.