Azure-Samples / aks-store-demo

Sample microservices app for AKS demos, tutorials, and experiments
MIT License
143 stars 225 forks source link

feat: adding pdb for store-front #105

Open pauldotyu opened 7 months ago

pauldotyu commented 7 months ago

Purpose

Adds Pod Disruption Budget to store-front deployment to ensure at least 60% of pods requested are up and running during times of voluntary disruption.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

git clone https://github.com/pauldotyu/aks-store-demo/tree/pdb
cd aks-store-demo
git checkout pdb

connect to cluster

az aks get-credentials --resource-group myResourceGroup --name myAKSCluster

deploy the app

helm install aks-store-demo ./charts/aks-store-demo



## What to Check
Verify that the following are valid
* After deallocating node 2, verify 3 store-front pods are running
* After draining node 1, verify 3 store-front pods are running 
* After draining node 0, verify the drain never completes because there aren't enough resources to reschedule the pods to satifsfy the PDB

## Other Information
<!-- Add any other helpful information that may be needed here. -->