mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-09 05:06:29 +10:00
[bitnami/nginx] Adds pdb to nginx (#4479)
* Adds pdb to nginx * Fix readme * Bump version to 8.2.0 * Adds tests for pdb * Fix readme pdb.enabled => pdb.create
This commit is contained in:
@@ -25,4 +25,4 @@ name: nginx
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-nginx
|
||||
- http://www.nginx.org
|
||||
version: 8.1.2
|
||||
version: 8.2.0
|
||||
|
||||
@@ -66,6 +66,9 @@ The following tables lists the configurable parameters of the NGINX chart and th
|
||||
| `commonLabels` | Labels to add to all deployed objects | `{}` |
|
||||
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
|
||||
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` (evaluated as a template) |
|
||||
| `pdb.create` | Created a PodDisruptionBudget | `false` |
|
||||
| `pdb.minAvailable` | Set PDB minAvailable value | `1` |
|
||||
| `pdb.maxUnavailable` | Set PDB maxUnavailable value | `nil` |
|
||||
|
||||
### NGINX parameters
|
||||
|
||||
|
||||
@@ -24,3 +24,8 @@ metrics:
|
||||
## Kubeval doesn't recognise ServiceMonitor as a valid K8s object
|
||||
# serviceMonitor:
|
||||
# enabled: true
|
||||
|
||||
pdb:
|
||||
create: true
|
||||
minAvailable: 3
|
||||
maxUnavailable: 5
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{{- if .Values.pdb.create }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
@@ -76,6 +76,20 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"pdb": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"create": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"minAvailable": {
|
||||
"type": "integer"
|
||||
},
|
||||
"maxUnavailable": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -682,3 +682,15 @@ metrics:
|
||||
##
|
||||
# selector:
|
||||
# prometheus: my-prometheus
|
||||
|
||||
## Pod Disruption Budget configuration
|
||||
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||
##
|
||||
pdb:
|
||||
create: false
|
||||
## Min number of pods that must still be available after the eviction
|
||||
##
|
||||
minAvailable: 1
|
||||
## Max number of pods that can be unavailable after the eviction
|
||||
##
|
||||
# maxUnavailable: 1
|
||||
|
||||
Reference in New Issue
Block a user