Skip to content

Commit

Permalink
color helm diff, support pending install & rollback clearing, silence…
Browse files Browse the repository at this point in the history
… perms warnings, cleanup on failure, 10m timeout
  • Loading branch information
cmyui committed Nov 11, 2023
1 parent 26b4ad4 commit 9b3ceef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/k8s-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
mkdir -p $HOME/.kube
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
chmod 600 $HOME/.kube/config
- name: Install helm
uses: azure/setup-helm@v3
Expand All @@ -66,12 +67,13 @@ jobs:

- name: Clear pending deployments
run: |
kubectl get secret -lname=avatars-service-production -lstatus=pending-upgrade -oname | xargs --no-run-if-empty kubectl delete
kubectl delete secret -l 'status in (pending-install, pending-upgrade, pending-rollback),name=avatars-service-production'
- name: Show manifest diff since previous release
run: |
helm diff upgrade \
--allow-unreleased \
--color=true \
--values chart/values.yaml \
avatars-service-production \
common-helm-charts/microservice-base/
Expand All @@ -81,7 +83,8 @@ jobs:
helm upgrade \
--install \
--atomic \
--wait --timeout 480s \
--wait --timeout 10m \
--cleanup-on-fail \
--values chart/values.yaml \
avatars-service-production \
common-helm-charts/microservice-base/

0 comments on commit 9b3ceef

Please sign in to comment.