[bitnami/ghost] Enable PodDisruptionBudgets (#26432)

* [bitnami/ghost] Enable PodDisruptionBudgets

Signed-off-by: Fran Mulero <fmulero@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: Fran Mulero <fmulero@vmware.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Fran Mulero
2024-05-29 11:08:57 +02:00
committed by GitHub
parent 0a1b8c1843
commit e7ca9a735b
5 changed files with 48 additions and 3 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 21.0.1 (2024-05-27)
## 21.1.0 (2024-05-28)
* [bitnami/ghost] Release 21.0.1 ([#26455](https://github.com/bitnami/charts/pull/26455))
* [bitnami/ghost] Enable PodDisruptionBudgets ([#26432](https://github.com/bitnami/charts/pull/26432))
## <small>21.0.1 (2024-05-27)</small>
* [bitnami/ghost] Release 21.0.1 (#26455) ([36352c8](https://github.com/bitnami/charts/commit/36352c82518a445588661a7f5143bafc31a80c11)), closes [#26455](https://github.com/bitnami/charts/issues/26455)
## 21.0.0 (2024-05-27)

View File

@@ -40,4 +40,4 @@ maintainers:
name: ghost
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/ghost
version: 21.0.1
version: 21.1.0

View File

@@ -272,6 +272,9 @@ See the [Parameters](#parameters) section to configure the PVC or to disable per
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for Ghost container(s) | `[]` |
| `sidecars` | Add additional sidecar containers to the Ghost pod | `[]` |
| `initContainers` | Add additional init containers to the Ghost pods | `[]` |
| `pdb.create` | Enable/disable a Pod Disruption Budget creation | `true` |
| `pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `""` |
| `pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty. | `""` |
| `lifecycleHooks` | Add lifecycle hooks to the Ghost deployment | `{}` |
| `podLabels` | Extra labels for Ghost pods | `{}` |
| `podAnnotations` | Annotations for Ghost pods | `{}` |

View File

@@ -0,0 +1,28 @@
{{- /*
Copyright Broadcom, Inc. All Rights Reserved.
SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.pdb.create }}
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: ghost
{{- 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 or .Values.pdb.maxUnavailable (not .Values.pdb.minAvailable) }}
maxUnavailable: {{ .Values.pdb.maxUnavailable | default 1 }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" (dict "values" (list .ValuespodLabels .Values.commonLabels) "context" .) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: ghost
{{- end }}

View File

@@ -239,6 +239,16 @@ sidecars: []
## containerPort: 1234
##
initContainers: []
## Pod Disruption Budget configuration
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb
## @param pdb.create Enable/disable a Pod Disruption Budget creation
## @param pdb.minAvailable Minimum number/percentage of pods that should remain scheduled
## @param pdb.maxUnavailable Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `pdb.minAvailable` and `pdb.maxUnavailable` are empty.
##
pdb:
create: true
minAvailable: ""
maxUnavailable: ""
## @param lifecycleHooks Add lifecycle hooks to the Ghost deployment
##
lifecycleHooks: {}