Skip to content

Commit

Permalink
build(deployment): increase replicas and set pod disruption policy (#744
Browse files Browse the repository at this point in the history
)

* build(deployment): increase replicas and set pod disruption policy

* build(deployment): only deploy to prod on merge not on PR creation
  • Loading branch information
chrispymm authored Sep 17, 2024
1 parent 58726e5 commit d0b8aef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:

push-to-production:
runs-on: ubuntu-latest
needs: [build, test]
if: github.event_name == 'push'
permissions:
id-token: write
contents: read
Expand Down
13 changes: 12 additions & 1 deletion kubernetes-deploy-production.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: moj-frontend-${BRANCH}
spec:
replicas: 1
replicas: 3
selector:
matchLabels:
app: moj-frontend-${BRANCH}
Expand Down Expand Up @@ -68,3 +68,14 @@ spec:
name: moj-frontend-service-${BRANCH}
port:
number: 3000
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: moj-frontend-disruption-policy
spec:
minAvailable: 1
selector:
matchLabels:
app: moj-frontend-${BRANCH}

0 comments on commit d0b8aef

Please sign in to comment.