Compare commits

...

2 Commits

Author SHA1 Message Date
Jacques ROUSSEL 607dfe71b3 wip 2025-02-10 12:06:47 +01:00
Jacques ROUSSEL 6b7d7c0555 🔧(helm) add pdbs to deployments
In order to avoid a service interruption during a Kubernetes
(k8s)upgrade, we add a Pod Disruption Budget (PDB) to deployments.
2025-02-10 11:24:23 +01:00
6 changed files with 42 additions and 6 deletions
+5 -5
View File
@@ -3,10 +3,6 @@ run-name: Release Chart
on:
push:
branches:
- 'main'
paths:
- ./src/helm/desk/**
jobs:
release:
@@ -20,7 +16,11 @@ jobs:
fetch-depth: 0
- name: Cleanup
run: rm -rf ./src/helm/extra
run: |
rm -rf ./src/helm/extra
rm -rf ./src/helm/dimail
rm -rf ./src/helm/mailcatcher
- name: Install Helm
uses: azure/setup-helm@v4
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: v2
type: application
name: desk
version: 0.0.1
version: 0.0.2
+2
View File
@@ -37,6 +37,7 @@
| Name | Description | Value |
| ----------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `backend.pdb.enabled` | Enable pdb on backend | `true` |
| `backend.dpAnnotations` | Annotations to add to the backend Deployment | `{}` |
| `backend.command` | Override the backend container command | `[]` |
| `backend.args` | Override the backend container args | `[]` |
@@ -86,6 +87,7 @@
| Name | Description | Value |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------- | ------------------------- |
| `frontend.pdb.enabled` | Enable pdb on backend | `true` |
| `frontend.image.repository` | Repository to use to pull desk's frontend container image | `lasuite/people-frontend` |
| `frontend.image.tag` | desk's frontend container tag | `latest` |
| `frontend.image.pullPolicy` | frontend container image pull policy | `IfNotPresent` |
@@ -138,3 +138,16 @@ spec:
emptyDir: {}
{{- end }}
{{- end }}
---
{{ if .Values.backend.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace | quote }}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{- include "desk.common.selectorLabels" (list . $component) | nindent 6 }}
{{ end }}
@@ -138,3 +138,16 @@ spec:
emptyDir: {}
{{- end }}
{{- end }}
---
{{ if .Values.frontend.pdb.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace | quote }}
spec:
maxUnavailable: 1
selector:
matchLabels:
{{- include "desk.common.selectorLabels" (list . $component) | nindent 6 }}
{{ end }}
+8
View File
@@ -72,6 +72,10 @@ ingressAdmin:
## @section backend
backend:
## @param backend.pdb.enabled Enable pdb on backend
pdb:
enabled: true
## @param backend.dpAnnotations Annotations to add to the backend Deployment
dpAnnotations: {}
@@ -179,6 +183,10 @@ backend:
## @section frontend
frontend:
## @param frontend.pdb.enabled Enable pdb on backend
pdb:
enabled: true
## @param frontend.image.repository Repository to use to pull desk's frontend container image
## @param frontend.image.tag desk's frontend container tag
## @param frontend.image.pullPolicy frontend container image pull policy