From 8f589f135ba45edb5aba8fbe98124a3ec1407026 Mon Sep 17 00:00:00 2001 From: Quan TRAN Date: Thu, 18 Feb 2021 09:55:21 +0100 Subject: [PATCH] [bitnami/apache] Add extra-list.yaml & extra initContainers & sidecars (#5534) * [bitnami/apache] extra-list.yaml * [bitnami/apache] add initContainers & sidecars --- bitnami/apache/Chart.yaml | 2 +- bitnami/apache/README.md | 19 +++++++++++++--- bitnami/apache/templates/deployment.yaml | 16 ++++++++++---- bitnami/apache/templates/extra-list.yaml | 4 ++++ bitnami/apache/values.yaml | 28 ++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 8 deletions(-) create mode 100644 bitnami/apache/templates/extra-list.yaml diff --git a/bitnami/apache/Chart.yaml b/bitnami/apache/Chart.yaml index 1f004bf836..df263b2b46 100644 --- a/bitnami/apache/Chart.yaml +++ b/bitnami/apache/Chart.yaml @@ -26,4 +26,4 @@ name: apache sources: - https://github.com/bitnami/bitnami-docker-apache - https://httpd.apache.org -version: 8.2.3 +version: 8.3.0 diff --git a/bitnami/apache/README.md b/bitnami/apache/README.md index 43063f29a0..1bc266f8ff 100644 --- a/bitnami/apache/README.md +++ b/bitnami/apache/README.md @@ -47,15 +47,26 @@ $ helm delete my-release The command removes all the Kubernetes components associated with the chart and deletes the release. +### Global parameters + +| Parameter | Description | Default | +|---------------------------|-------------------------------------------------|---------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | +| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | + +### Common parameters + +| Parameter | Description | Default | +|---------------------|----------------------------------------------------------------------|--------------------------------| +| `extraDeploy` | Array of extra objects to deploy with the release | `[]` (evaluated as a template) | +| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` | + ## Parameters The following tables lists the configurable parameters of the Apache chart and their default values. | Parameter | Description | Default | |----------------------------------|-------------------------------------------------------------------------------------------|--------------------------------------------------------------| -| `global.imageRegistry` | Global Docker image registry | `nil` | -| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) | -| `kubeVersion` | Force target Kubernetes version (using Helm capabilities if not set) | `nil` | | `image.registry` | Apache Docker image registry | `docker.io` | | `image.repository` | Apache Docker image name | `bitnami/apache` | | `image.tag` | Apache Docker image tag | `{TAG_NAME}` | @@ -122,6 +133,8 @@ The following tables lists the configurable parameters of the Apache chart and t | `extraVolumes` | Array to add extra volumes | `[]` (evaluated as a template) | | `extraVolumeMounts` | Array to add extra mount | `[]` (evaluated as a template) | | `extraEnvVars` | Array to add extra environment variables | `[]` (evaluated as a template) | +| `initContainers` | Add additional init containers to the Apache pods | `{}` (evaluated as a template) | +| `sidecars` | Add additional sidecar containers to the Apache pods | `{}` (evaluated as a template) | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/bitnami/apache/templates/deployment.yaml b/bitnami/apache/templates/deployment.yaml index 7862856538..02094fde73 100644 --- a/bitnami/apache/templates/deployment.yaml +++ b/bitnami/apache/templates/deployment.yaml @@ -40,8 +40,9 @@ spec: {{- if .Values.tolerations }} tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} {{- end }} - {{- if .Values.cloneHtdocsFromGit.enabled }} + {{- if or .Values.initContainers .Values.cloneHtdocsFromGit.enabled }} initContainers: + {{- if .Values.cloneHtdocsFromGit.enabled }} - name: git-clone-repository image: {{ include "git.image" . }} imagePullPolicy: {{ .Values.git.pullPolicy | quote }} @@ -54,7 +55,13 @@ spec: volumeMounts: - name: htdocs mountPath: /app + {{- end }} + {{- if .Values.initContainers }} + {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }} + {{- end }} + {{- end }} containers: + {{- if .Values.cloneHtdocsFromGit.enabled }} - name: git-repo-syncer image: {{ include "git.image" . }} imagePullPolicy: {{ .Values.git.pullPolicy | quote }} @@ -70,9 +77,7 @@ spec: volumeMounts: - name: htdocs mountPath: /app - {{- else }} - containers: - {{- end }} + {{- end }} - name: apache image: {{ include "apache.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} @@ -153,6 +158,9 @@ spec: resources: {{- toYaml .Values.metrics.resources | nindent 12 }} {{- end }} {{- end }} + {{- if .Values.sidecars }} + {{- include "common.tplvalues.render" ( dict "value" .Values.sidecars "context" $) | nindent 8 }} + {{- end }} volumes: {{- if (include "apache.useHtdocs" .) }} - name: htdocs diff --git a/bitnami/apache/templates/extra-list.yaml b/bitnami/apache/templates/extra-list.yaml new file mode 100644 index 0000000000..9ac65f9e16 --- /dev/null +++ b/bitnami/apache/templates/extra-list.yaml @@ -0,0 +1,4 @@ +{{- range .Values.extraDeploy }} +--- +{{ include "common.tplvalues.render" (dict "value" . "context" $) }} +{{- end }} diff --git a/bitnami/apache/values.yaml b/bitnami/apache/values.yaml index 67a08dec66..b6040a236c 100644 --- a/bitnami/apache/values.yaml +++ b/bitnami/apache/values.yaml @@ -34,6 +34,10 @@ image: ## debug: false +## Extra objects to deploy (value evaluated as a template) +## +extraDeploy: [] + ## Bitnami Git image version ## ref: https://hub.docker.com/r/bitnami/git/tags/ ## @@ -304,6 +308,30 @@ extraVolumeMounts: [] ## extraEnvVars: [] +## Add init containers to the Apache pods. +## Example: +## initContainers: +## - name: your-image-name +## image: your-image +## imagePullPolicy: Always +## ports: +## - name: portname +## containerPort: 1234 +## +initContainers: {} + +## Add sidecars to the Apache pods. +## Example: +## sidecars: +## - name: your-image-name +## image: your-image +## imagePullPolicy: Always +## ports: +## - name: portname +## containerPort: 1234 +## +sidecars: {} + ## Service parameters ## service: