Skip to content

Commit

Permalink
fix(helm): add deployment update strategy to reduce load in lower env… (
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored Dec 5, 2023
1 parent a8c6ed8 commit 7d2fc14
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ on:
default: 'values.yaml'
required: false
type: string
params:
description: 'Extra parameters to pass to helm upgrade'
default: ''
required: false
type: string

env:
repo_release: ${{ github.event.repository.name }}-${{ inputs.release }}
Expand Down Expand Up @@ -114,6 +119,7 @@ jobs:
--set-string backend.containers[0].tag="${{ env.package_tag }}" \
--set-string backend.initContainers[0].tag="${{ env.package_tag }}" \
--set-string frontend.containers[0].tag="${{ env.package_tag }}" \
${{ inputs.params }} \
--install --wait --atomic ${{ env.repo_release }} \
--timeout ${{ inputs.timeout-minutes }}m \
--values ${{ inputs.values }} \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
autoscaling: false
environment: test
tag: ${{ needs.vars.outputs.tag }}
release: test
Expand All @@ -76,6 +77,7 @@ jobs:
environment: prod
tag: ${{ needs.vars.outputs.tag }}
release: prod
params: --set backend.deploymentStrategy.type=RollingUpdate --set frontend.deploymentStrategy.type=RollingUpdate

promote:
name: Promote Images
Expand Down
4 changes: 4 additions & 0 deletions charts/quickstart-openshift/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ backend:
enabled: true
deployment: # can be either a statefulSet or a deployment not both
enabled: true
deploymentStrategy:
type: Recreate
containers:
- name: backend
registry: '{{ .Values.global.registry }}'
Expand Down Expand Up @@ -158,6 +160,8 @@ frontend:
enabled: true
deployment: # can be either a statefulSet or a deployment not both
enabled: true
deploymentStrategy:
type: Recreate
configmap:
enabled: true
data: # below is just for example.
Expand Down

0 comments on commit 7d2fc14

Please sign in to comment.