Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding pdb for store-front #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pauldotyu
Copy link
Contributor

@pauldotyu pauldotyu commented Feb 1, 2024

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

  • Get the code
  • Deploy a 3 node AKS cluster
  • Deploy the aks-store-demo app with PDB in place
  • In Azure Portal, deallocate node 2 in the VM scale set and observe
  • Use kubectl to drain node 1 from the node pool and observe
  • Use kubectl to drain node 0 from the node pool and observe
git clone https://github.com/pauldotyu/aks-store-demo/tree/pdb
cd aks-store-demo
git checkout pdb
  • Test the code
# provision cluster
az group create --name myResourceGroup --location eastus
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 3 --generate-ssh-keys

# 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant