File tree Expand file tree Collapse file tree 5 files changed +46
-5
lines changed
Expand file tree Collapse file tree 5 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 4747 needs : validate
4848 runs-on : ubuntu-latest
4949 steps :
50+ - name : Checkout repository at version tag
51+ uses : actions/checkout@v4
52+ with :
53+ ref : ${{ inputs.version }}
54+
5055 - name : Install OpenShift CLI
5156 uses : redhat-actions/openshift-tools-installer@v1
5257 with :
@@ -74,10 +79,23 @@ jobs:
7479 oc -n ${{ env.OPENSHIFT_NAMESPACE_TOOLS }} tag \
7580 ${{ env.IMAGE_NAME }}:${{ inputs.version }} ${{ env.IMAGE_NAME }}:prod
7681
77- - name : Deploy to prod
82+ - name : Install Helm
83+ run : |
84+ curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
85+ helm version
86+
87+ - name : Deploy with Helm
7888 run : |
79- oc -n ${{ env.OPENSHIFT_NAMESPACE_PROD }} rollout restart deployment/${{ env.APP_NAME }}
80- oc -n ${{ env.OPENSHIFT_NAMESPACE_PROD }} rollout status deployment/${{ env.APP_NAME }} --timeout=5m
89+ helm upgrade --install ${{ env.APP_NAME }} ./helm/${{ env.APP_NAME }} \
90+ --namespace ${{ env.OPENSHIFT_NAMESPACE_PROD }} \
91+ --values ./helm/${{ env.APP_NAME }}/values-prod.yaml \
92+ --set image.tag=prod \
93+ --wait --timeout=5m
94+
95+ - name : Verify deployment
96+ run : |
97+ echo "Deployment successful!"
98+ oc get pods -n ${{ env.OPENSHIFT_NAMESPACE_PROD }} -l app.kubernetes.io/name=${{ env.APP_NAME }}
8199
82100 echo "Deployment successful!"
83101 oc get pods -n ${{ env.OPENSHIFT_NAMESPACE_PROD }} -l app.kubernetes.io/name=${{ env.APP_NAME }}
Original file line number Diff line number Diff line change 1818 strategy :
1919 type : RollingUpdate
2020 rollingUpdate :
21- maxSurge : 25%
22- maxUnavailable : 25%
21+ maxSurge : 1
22+ maxUnavailable : 0
2323 template :
2424 metadata :
2525 {{- with .Values.podAnnotations }}
Original file line number Diff line number Diff line change 1+ {{- if and .Values.podDisruptionBudget.enabled (gt (int .Values.replicaCount) 1) }}
2+ apiVersion : policy/v1
3+ kind : PodDisruptionBudget
4+ metadata :
5+ name : {{ include "eagle-admin.fullname" . }}
6+ labels :
7+ {{- include "eagle-admin.labels" . | nindent 4 }}
8+ spec :
9+ minAvailable : {{ .Values.podDisruptionBudget.minAvailable | default 1 }}
10+ selector :
11+ matchLabels :
12+ {{- include "eagle-admin.selectorLabels" . | nindent 6 }}
13+ {{- end }}
Original file line number Diff line number Diff line change @@ -15,6 +15,11 @@ resources:
1515 cpu : 100m
1616 memory : 256Mi
1717
18+ # Pod Disruption Budget - ensure at least 1 pod during disruptions
19+ podDisruptionBudget :
20+ enabled : true
21+ minAvailable : 1
22+
1823env :
1924 DEPLOYMENT_ENVIRONMENT : " prod"
2025 BANNER_COLOUR : " "
Original file line number Diff line number Diff line change @@ -80,3 +80,8 @@ autoscaling:
8080 minReplicas : 2
8181 maxReplicas : 4
8282 targetCPUUtilizationPercentage : 80
83+
84+ # Pod Disruption Budget
85+ podDisruptionBudget :
86+ enabled : false
87+ minAvailable : 1
You can’t perform that action at this time.
0 commit comments