mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Use the save API version for the HPA controller and the deployment (#807)
This supposedly can fix our deployment problem. Tested on alpha. Also updated the deployment script to replace the service object as well.
This commit is contained in:
parent
5765be52d2
commit
b6ed1982c3
3 changed files with 5 additions and 3 deletions
|
@ -31,14 +31,16 @@ do
|
||||||
echo "Updating cluster ${parts[0]} in zone ${parts[1]}..."
|
echo "Updating cluster ${parts[0]} in zone ${parts[1]}..."
|
||||||
gcloud container clusters get-credentials "${parts[0]}" \
|
gcloud container clusters get-credentials "${parts[0]}" \
|
||||||
--project "${project}" --zone "${parts[1]}"
|
--project "${project}" --zone "${parts[1]}"
|
||||||
# Kills all running pods, new pods created will be pulling the new image.
|
|
||||||
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}.yaml" | \
|
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}.yaml" | \
|
||||||
kubectl replace -f -
|
kubectl replace -f -
|
||||||
|
kubectl replace -f "./kubernetes/proxy-service.yaml" --force
|
||||||
# Alpha does not have canary
|
# Alpha does not have canary
|
||||||
if [[ ${environment} != "alpha" ]]; then
|
if [[ ${environment} != "alpha" ]]; then
|
||||||
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}-canary.yaml" | \
|
sed s/GCP_PROJECT/${project}/g "./kubernetes/proxy-deployment-${environment}-canary.yaml" | \
|
||||||
kubectl replace -f -
|
kubectl replace -f -
|
||||||
|
kubectl replace -f "./kubernetes/proxy-service-canary.yaml" --force
|
||||||
fi
|
fi
|
||||||
|
# Kills all running pods, new pods created will be pulling the new image.
|
||||||
kubectl delete pods --all
|
kubectl delete pods --all
|
||||||
done < <(gcloud container clusters list --project ${project} | grep proxy-cluster)
|
done < <(gcloud container clusters list --project ${project} | grep proxy-cluster)
|
||||||
kubectl config use-context "$current_context"
|
kubectl config use-context "$current_context"
|
||||||
|
|
|
@ -43,7 +43,7 @@ metadata:
|
||||||
app: proxy-canary
|
app: proxy-canary
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: proxy-deployment-canary
|
name: proxy-deployment-canary
|
||||||
maxReplicas: 10
|
maxReplicas: 10
|
||||||
|
|
|
@ -43,7 +43,7 @@ metadata:
|
||||||
app: proxy
|
app: proxy
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: proxy-deployment
|
name: proxy-deployment
|
||||||
maxReplicas: 10
|
maxReplicas: 10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue