Migrate automatically on service start (#7103)
This avoids a forgettable manual step in deploying collab Release Notes: - N/A
This commit is contained in:
parent
2e7f9c48bb
commit
911b4b5ae8
2 changed files with 24 additions and 65 deletions
|
@ -1,26 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
source script/lib/deploy-helpers.sh
|
||||
|
||||
if [[ $# < 2 ]]; then
|
||||
echo "Usage: $0 <production|staging|preview|nightly> <tag-name>"
|
||||
exit 1
|
||||
fi
|
||||
environment=$1
|
||||
version=$2
|
||||
|
||||
export_vars_for_environment ${environment}
|
||||
image_id=$(image_id_for_version ${version})
|
||||
|
||||
export ZED_KUBE_NAMESPACE=${environment}
|
||||
export ZED_IMAGE_ID=${image_id}
|
||||
export ZED_MIGRATE_JOB_NAME=zed-migrate-${version}
|
||||
|
||||
target_zed_kube_cluster
|
||||
envsubst < crates/collab/k8s/migrate.template.yml | kubectl apply -f -
|
||||
|
||||
pod=$(kubectl --namespace=${environment} get pods --selector=job-name=${ZED_MIGRATE_JOB_NAME} --output=jsonpath='{.items[0].metadata.name}')
|
||||
|
||||
echo "Job pod:" $pod
|
||||
kubectl --namespace=${environment} logs -f ${pod}
|
Loading…
Add table
Add a link
Reference in a new issue