figure out which deployments need to be patched during a deployment instead of guessing (#438)

This commit is contained in:
Matt Robinson 2018-10-08 12:52:27 -04:00 committed by Alexander Bender
parent dee2c137c8
commit a1f93285e2
2 changed files with 3 additions and 10 deletions

View File

@ -110,10 +110,10 @@ install-deps:
.PHONY: deploy
deploy:
./scripts/deploy.staging.sh satellite storjlabs/satellite:${TAG}
for i in $(shell seq 1 60); do \
./scripts/deploy.staging.sh storagenode-$$i storjlabs/storagenode:${TAG}; \
for deployment in $$(kubectl --context nonprod -n v3 get deployment -l app=storagenode --output=jsonpath='{.items..metadata.name}'); do \
kubectl --context nonprod --namespace v3 patch deployment $$deployment -p"{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"storagenode\",\"image\":\"storjlabs/storagenode:${TAG}\"}]}}}}" ; \
done
kubectl --context nonprod --namespace v3 patch deployment satellite -p"{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"satellite\",\"image\":\"storjlabs/satellite:${TAG}\"}]}}}}"
.PHONY: binary
binary: CUSTOMTAG = -${GOOS}-${GOARCH}

View File

@ -1,7 +0,0 @@
#!/bin/bash
PROJECT_NAME=$1
CONTAINER=$2
kubectl config set-cluster nonprod
kubectl --namespace v3 patch deployment $PROJECT_NAME -p"{\"spec\":{\"template\":{\"spec\":{\"containers\":[{\"name\":\"$PROJECT_NAME\",\"image\":\"$CONTAINER\"}]}}}}"