[bitnami/discourse] Add feature discourse.plugins (#16196)

* [bitnami/discourse] Add feature discourse.plugins

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

* Update README.md with readme-generator-for-helm

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

* Apply suggestions

Signed-off-by: Miguel Ruiz <miruiz@vmware.com>

---------

Signed-off-by: Miguel Ruiz <miruiz@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:
Miguel Ruiz
2023-04-28 15:13:49 +02:00
committed by GitHub
parent ec601737b7
commit 64038e7c43
4 changed files with 25 additions and 1 deletions

View File

@@ -35,4 +35,4 @@ sources:
- https://github.com/bitnami/containers/tree/main/bitnami/discourse
- https://github.com/spinnaker
- https://www.discourse.org/
version: 10.1.0
version: 10.2.0

View File

@@ -131,6 +131,7 @@ The command removes all the Kubernetes components associated with the chart and
| Name | Description | Value |
| ------------------------------------------------- | -------------------------------------------------------------------------------------------- | --------------- |
| `discourse.skipInstall` | Do not run the Discourse installation wizard | `false` |
| `discourse.plugins` | List of plugins to be installed before the container initialization | `[]` |
| `discourse.command` | Custom command to override image cmd | `[]` |
| `discourse.args` | Custom args for the custom command | `[]` |
| `discourse.extraEnvVars` | Array with extra environment variables to add Discourse pods | `[]` |

View File

@@ -99,11 +99,26 @@ spec:
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
{{- else if .Values.discourse.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.discourse.command "context" $) | nindent 12 }}
{{- else }}
command:
- /bin/bash
{{- end }}
{{- if .Values.diagnosticMode.enabled }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
{{- else if .Values.discourse.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.discourse.args "context" $) | nindent 12 }}
{{- else }}
args:
- -c
- |
{{- if .Values.discourse.plugins }}
pushd "/opt/bitnami/discourse" >/dev/null || exit 1
{{- range $plugin := .Values.discourse.plugins }}
RAILS_ENV=production bundle exec rake plugin:install repo={{ $plugin }}
{{- end }}
popd >/dev/null || exit 1
{{- end }}
/opt/bitnami/scripts/discourse/entrypoint.sh /opt/bitnami/scripts/discourse/run.sh
{{- end }}
env:
- name: BITNAMI_DEBUG

View File

@@ -254,6 +254,14 @@ discourse:
## Use only in case you are importing an existing database.
##
skipInstall: false
## @param discourse.plugins List of plugins to be installed before the container initialization
## NOTE: This will be ignored if the values 'discourse.command' or 'discourse.args' are provided.
## Additionally, consider increasing the value discourse.livenessProbe.initialDelaySeconds if the container restarts before the initialization finishes.
## e.g:
## plugins:
## - https://github.com/discourse/discourse-oauth2-basic
##
plugins: []
## @param discourse.command Custom command to override image cmd
##
command: []