[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:
Alex Eimer
2020-11-26 11:11:23 +01:00
committed by GitHub
parent 95249478d9
commit 2b03948fb8
6 changed files with 58 additions and 1 deletions
+1 -1
View File
@@ -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
+3
View File
@@ -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
+23
View File
@@ -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 }}
+14
View File
@@ -76,6 +76,20 @@
}
}
}
},
"pdb": {
"type": "object",
"properties": {
"create": {
"type": "boolean"
},
"minAvailable": {
"type": "integer"
},
"maxUnavailable": {
"type": "integer"
}
}
}
}
}
+12
View File
@@ -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