Skip to content

Commit b8027e1

Browse files
authored
[bitnami/ghost] Include diagnosticMode feature (#18396)
* [bitnami/ghost] Include diagnosticMode feature Signed-off-by: Fran Mulero <fmulero@vmware.com> * Update README.md Signed-off-by: Fran Mulero <fmulero@vmware.com> --------- Signed-off-by: Fran Mulero <fmulero@vmware.com>
1 parent d45970d commit b8027e1

File tree

4 files changed

+37
-13
lines changed

4 files changed

+37
-13
lines changed

bitnami/ghost/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ maintainers:
4040
name: ghost
4141
sources:
4242
- https://github.com/bitnami/charts/tree/main/bitnami/ghost
43-
version: 19.3.37
43+
version: 19.4.0

bitnami/ghost/README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,18 @@ The command removes all the Kubernetes components associated with the chart and
6565

6666
### Common parameters
6767

68-
| Name | Description | Value |
69-
| ------------------- | -------------------------------------------------- | --------------- |
70-
| `kubeVersion` | Override Kubernetes version | `""` |
71-
| `nameOverride` | String to partially override common.names.fullname | `""` |
72-
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
73-
| `commonLabels` | Labels to add to all deployed objects | `{}` |
74-
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
75-
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
76-
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
68+
| Name | Description | Value |
69+
| ------------------------ | --------------------------------------------------------------------------------------- | --------------- |
70+
| `kubeVersion` | Override Kubernetes version | `""` |
71+
| `nameOverride` | String to partially override common.names.fullname | `""` |
72+
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
73+
| `commonLabels` | Labels to add to all deployed objects | `{}` |
74+
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
75+
| `clusterDomain` | Kubernetes cluster domain name | `cluster.local` |
76+
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
77+
| `diagnosticMode.enabled` | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | `false` |
78+
| `diagnosticMode.command` | Command to override all containers in the deployment | `["sleep"]` |
79+
| `diagnosticMode.args` | Args to override all containers in the deployment | `["infinity"]` |
7780

7881
### Ghost Image parameters
7982

bitnami/ghost/templates/deployment.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,19 @@ spec:
110110
{{- if .Values.lifecycleHooks }}
111111
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
112112
{{- end }}
113-
{{- if .Values.command }}
113+
{{- if .Values.diagnosticMode.enabled }}
114+
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
115+
{{- else if .Values.command }}
114116
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
115117
{{- end }}
116-
{{- if .Values.args }}
118+
{{- if .Values.diagnosticMode.enabled }}
119+
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
120+
{{- else if .Values.args }}
117121
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
118122
{{- end }}
119123
env:
120124
- name: BITNAMI_DEBUG
121-
value: {{ ternary "true" "false" .Values.image.debug | quote }}
125+
value: {{ ternary "true" "false" (or .Values.image.debug .Values.diagnosticMode.enabled) | quote }}
122126
- name: ALLOW_EMPTY_PASSWORD
123127
value: {{ ternary "yes" "no" .Values.allowEmptyPassword | quote }}
124128
- name: GHOST_DATABASE_HOST
@@ -235,6 +239,7 @@ spec:
235239
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
236240
successThreshold: {{ .Values.startupProbe.successThreshold }}
237241
{{- end }}
242+
{{- if not .Values.diagnosticMode.enabled }}
238243
{{- if .Values.customLivenessProbe }}
239244
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.customLivenessProbe "context" $) | nindent 12 }}
240245
{{- else if .Values.livenessProbe.enabled }}
@@ -273,6 +278,7 @@ spec:
273278
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
274279
successThreshold: {{ .Values.readinessProbe.successThreshold }}
275280
{{- end }}
281+
{{- end }}
276282
{{- if .Values.resources }}
277283
resources: {{- toYaml .Values.resources | nindent 12 }}
278284
{{- end }}

bitnami/ghost/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,21 @@ clusterDomain: cluster.local
4343
##
4444
extraDeploy: []
4545

46+
## Enable diagnostic mode in the deployment
47+
##
48+
diagnosticMode:
49+
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
50+
##
51+
enabled: false
52+
## @param diagnosticMode.command Command to override all containers in the deployment
53+
##
54+
command:
55+
- sleep
56+
## @param diagnosticMode.args Args to override all containers in the deployment
57+
##
58+
args:
59+
- infinity
60+
4661
## @section Ghost Image parameters
4762

4863
## Bitnami Ghost image

0 commit comments

Comments
 (0)