🔧(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.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: v2
|
apiVersion: v2
|
||||||
type: application
|
type: application
|
||||||
name: desk
|
name: desk
|
||||||
version: 0.0.1
|
version: 0.0.2
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
| Name | Description | Value |
|
| Name | Description | Value |
|
||||||
| ----------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
| ----------------------------------------------------- | ---------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||||
|
| `backend.pdb.enabled` | Enable pdb on backend | `true` |
|
||||||
| `backend.dpAnnotations` | Annotations to add to the backend Deployment | `{}` |
|
| `backend.dpAnnotations` | Annotations to add to the backend Deployment | `{}` |
|
||||||
| `backend.command` | Override the backend container command | `[]` |
|
| `backend.command` | Override the backend container command | `[]` |
|
||||||
| `backend.args` | Override the backend container args | `[]` |
|
| `backend.args` | Override the backend container args | `[]` |
|
||||||
@@ -86,6 +87,7 @@
|
|||||||
|
|
||||||
| Name | Description | Value |
|
| 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.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.tag` | desk's frontend container tag | `latest` |
|
||||||
| `frontend.image.pullPolicy` | frontend container image pull policy | `IfNotPresent` |
|
| `frontend.image.pullPolicy` | frontend container image pull policy | `IfNotPresent` |
|
||||||
|
|||||||
@@ -138,3 +138,16 @@ spec:
|
|||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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: {}
|
emptyDir: {}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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 }}
|
||||||
|
|||||||
@@ -72,6 +72,10 @@ ingressAdmin:
|
|||||||
## @section backend
|
## @section backend
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
|
## @param backend.pdb.enabled Enable pdb on backend
|
||||||
|
pdb:
|
||||||
|
enabled: true
|
||||||
|
|
||||||
## @param backend.dpAnnotations Annotations to add to the backend Deployment
|
## @param backend.dpAnnotations Annotations to add to the backend Deployment
|
||||||
dpAnnotations: {}
|
dpAnnotations: {}
|
||||||
|
|
||||||
@@ -179,6 +183,10 @@ backend:
|
|||||||
|
|
||||||
## @section frontend
|
## @section frontend
|
||||||
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.repository Repository to use to pull desk's frontend container image
|
||||||
## @param frontend.image.tag desk's frontend container tag
|
## @param frontend.image.tag desk's frontend container tag
|
||||||
## @param frontend.image.pullPolicy frontend container image pull policy
|
## @param frontend.image.pullPolicy frontend container image pull policy
|
||||||
|
|||||||
Reference in New Issue
Block a user