mirror of
https://github.com/bitnami/charts.git
synced 2026-03-05 14:57:31 +08:00
[bitnami/Joomla] Major version. Adapt Chart to apiVersion: v2 and Update MariaDB Dependency (#4348)
* Drop Helm 2 support and update mariadb major * Fix typos * Fix typos * Add update section * Fix typos * Change externaldb secret key * Update images revision * Add Helm v2 EOL support * Apply suggestions from code review Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> * Fix typos * Format/Fix linter issues in yaml * [bitnami/joomla] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: fdepaz <fdepaz@bitnami.com> Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Carlos Rodriguez Hernandez <crhernandez@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
committed by
GitHub
parent
6339dc6990
commit
3f58e53b24
9
bitnami/joomla/Chart.lock
Normal file
9
bitnami/joomla/Chart.lock
Normal file
@@ -0,0 +1,9 @@
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 9.0.1
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 1.0.1
|
||||
digest: sha256:7d78cbcd54bade2608462bb162c8487091689ff7f5cb65080a3d580dc6a24912
|
||||
generated: "2020-11-19T15:13:48.695523709Z"
|
||||
@@ -1,22 +1,30 @@
|
||||
apiVersion: v1
|
||||
name: joomla
|
||||
version: 8.1.10
|
||||
annotations:
|
||||
category: CMS
|
||||
apiVersion: v2
|
||||
appVersion: 3.9.22
|
||||
dependencies:
|
||||
- condition: mariadb.enabled
|
||||
name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 9.x.x
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 1.x.x
|
||||
description: PHP content management system (CMS) for publishing web content
|
||||
engine: gotpl
|
||||
home: https://github.com/bitnami/charts/tree/master/bitnami/joomla
|
||||
icon: https://bitnami.com/assets/stacks/joomla/img/joomla-stack-220x234.png
|
||||
keywords:
|
||||
- joomla
|
||||
- cms
|
||||
- blog
|
||||
- http
|
||||
- php
|
||||
home: https://github.com/bitnami/charts/tree/master/bitnami/joomla
|
||||
icon: https://bitnami.com/assets/stacks/joomla/img/joomla-stack-220x234.png
|
||||
maintainers:
|
||||
- email: containers@bitnami.com
|
||||
name: Bitnami
|
||||
name: joomla
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-joomla
|
||||
- http://www.joomla.org/
|
||||
maintainers:
|
||||
- name: Bitnami
|
||||
email: containers@bitnami.com
|
||||
engine: gotpl
|
||||
annotations:
|
||||
category: CMS
|
||||
version: 9.0.0
|
||||
|
||||
@@ -20,7 +20,7 @@ Bitnami charts can be used with [Kubeapps](https://kubeapps.com/) for deployment
|
||||
## Prerequisites
|
||||
|
||||
- Kubernetes 1.12+
|
||||
- Helm 2.12+ or Helm 3.0-beta3+
|
||||
- Helm 3.0-beta3+
|
||||
- PV provisioner support in the underlying infrastructure
|
||||
- ReadWriteMany volumes for deployment scaling
|
||||
|
||||
@@ -78,7 +78,7 @@ The following table lists the configurable parameters of the Joomla! chart and t
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
|
||||
| `affinity` | Map of node/pod affinities | `{}` |
|
||||
| `affinity` | Affinity for pod assignment | `{}` (evaluated as a template) |
|
||||
| `allowEmptyPassword` | Allow DB blank passwords | `yes` |
|
||||
| `args` | Override default container args (useful when using custom images) | `nil` |
|
||||
| `command` | Override default container command (useful when using custom images) | `nil` |
|
||||
@@ -99,6 +99,9 @@ The following table lists the configurable parameters of the Joomla! chart and t
|
||||
| `joomlaUsername` | User of the application | `user` |
|
||||
| `joomlaPassword` | Application password | _random 10 character alphanumeric string_ |
|
||||
| `joomlaEmail` | Admin email | `user@example.com` |
|
||||
| `nodeAffinityPreset.type` | Node affinity preset type. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `nodeAffinityPreset.key` | Node label key to match Ignored if `affinity` is set. | `""` |
|
||||
| `nodeAffinityPreset.values` | Node label values to match. Ignored if `affinity` is set. | `[]` |
|
||||
| `nodeSelector` | Node labels for pod assignment | `{}` (The value is evaluated as a template) |
|
||||
| `persistence.accessMode` | PVC Access Mode for Joomla! volume | `ReadWriteOnce` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
@@ -106,10 +109,13 @@ The following table lists the configurable parameters of the Joomla! chart and t
|
||||
| `persistence.hostPath` | Host mount path for Joomla! volume | `nil` (will not mount to a host path) |
|
||||
| `persistence.size` | PVC Storage Request for Joomla! volume | `8Gi` |
|
||||
| `persistence.storageClass` | PVC Storage Class for Joomla! volume | `nil` (uses alpha storage class annotation) |
|
||||
| `podAffinityPreset` | Pod affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `""` |
|
||||
| `podAntiAffinityPreset` | Pod anti-affinity preset. Ignored if `affinity` is set. Allowed values: `soft` or `hard` | `soft` |
|
||||
| `podAnnotations` | Pod annotations | `{}` |
|
||||
| `podLabels` | Add additional labels to the pod (evaluated as a template) | `nil` |
|
||||
| `podSecurityContext.enabled` | Enable Joomla! pods' Security Context | `true` |
|
||||
| `podSecurityContext.fsGroup` | Joomla! pods' group ID | `1001` |
|
||||
| `priorityClassName` | Define the priority class name to use for the joomla pods here. | `""` |
|
||||
| `readinessProbe` | Readiness probe configuration | `Check values.yaml file` |
|
||||
| `replicaCount` | Number of Joomla! Pods to run | `1` |
|
||||
| `resources` | CPU/Memory resource requests/limits | Memory: `512Mi`, CPU: `300m` |
|
||||
@@ -146,25 +152,26 @@ The following table lists the configurable parameters of the Joomla! chart and t
|
||||
|
||||
### Database parameters
|
||||
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------------|------------------------------------------|------------------------------------------------|
|
||||
| `mariadb.enabled` | Whether to use the MariaDB chart | `true` |
|
||||
| `mariadb.rootUser.password` | MariaDB admin password | `nil` |
|
||||
| `mariadb.db.name` | Database name to create | `bitnami_joomla` |
|
||||
| `mariadb.db.user` | Database user to create | `bn_joomla` |
|
||||
| `mariadb.db.password` | Password for the database | _random 10 character long alphanumeric string_ |
|
||||
| `mariadb.replication.enabled` | MariaDB replication enabled | `false` |
|
||||
| `mariadb.master.persistence.enabled` | Enable database persistence using PVC | `true` |
|
||||
| `mariadb.master.persistence.accessMode` | Database Persistent Volume Access Modes | `ReadWriteOnce` |
|
||||
| `mariadb.master.persistence.size` | Database Persistent Volume Size | `8Gi` |
|
||||
| `mariadb.master.persistence.existingClaim` | Enable persistence using an existing PVC | `nil` |
|
||||
| `mariadb.master.persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
|
||||
| `mariadb.master.persistence.hostPath` | Host mount path for MariaDB volume | `nil` (will not mount to a host path) |
|
||||
| `externalDatabase.user` | Existing username in the external db | `bn_joomla` |
|
||||
| `externalDatabase.password` | Password for the above username | `nil` |
|
||||
| `externalDatabase.database` | Name of the existing database | `bitnami_joomla` |
|
||||
| `externalDatabase.host` | Host of the existing database | `nil` |
|
||||
| `externalDatabase.port` | Port of the existing database | `3306` |
|
||||
| Parameter | Description | Default |
|
||||
|--------------------------------------------|-------------------------------------------------------|------------------------------------------------|
|
||||
| `mariadb.enabled` | Whether to use the MariaDB chart | `true` |
|
||||
| `mariadb.architecture` | MariaDB architecture (`standalone` or `replication`) | `standalone` |
|
||||
| `mariadb.auth.rootPassword` | Password for the MariaDB `root` user | _random 10 character alphanumeric string_ |
|
||||
| `mariadb.auth.database` | Database name to create | `bitnami_joomla` |
|
||||
| `mariadb.auth.username` | Database user to create | `bn_joomla` |
|
||||
| `mariadb.auth.password` | Password for the database | _random 10 character long alphanumeric string_ |
|
||||
| `mariadb.primary.persistence.enabled` | Enable database persistence using PVC | `true` |
|
||||
| `mariadb.primary.persistence.accessMode` | Database Persistent Volume Access Modes | `ReadWriteOnce` |
|
||||
| `mariadb.primary.persistence.size` | Database Persistent Volume Size | `8Gi` |
|
||||
| `mariadb.primary.persistence.existingClaim`| Enable persistence using an existing PVC | `nil` |
|
||||
| `mariadb.primary.persistence.storageClass` | PVC Storage Class | `nil` (uses alpha storage class annotation) |
|
||||
| `mariadb.primary.persistence.hostPath` | Host mount path for MariaDB volume | `nil` (will not mount to a host path) |
|
||||
| `externalDatabase.user` | Existing username in the external db | `bn_joomla` |
|
||||
| `externalDatabase.password` | Password for the above username | `nil` |
|
||||
| `externalDatabase.database` | Name of the existing database | `bitnami_joomla` |
|
||||
| `externalDatabase.host` | Host of the existing database | `nil` |
|
||||
| `externalDatabase.port` | Port of the existing database | `3306` |
|
||||
| `externalDatabase.existingSecret` | Name of the database existing Secret Object | `nil` |
|
||||
|
||||
### Metrics parameters
|
||||
|
||||
@@ -269,6 +276,77 @@ Find more information about how to deal with common errors related to Bitnami’
|
||||
|
||||
## Upgrading
|
||||
|
||||
### To 9.0.0
|
||||
|
||||
In this major there were two main changes introduced:
|
||||
|
||||
1. Adaptation to Helm v2 EOL
|
||||
2. Updated MariaDB dependency version
|
||||
|
||||
Please read the update notes carefully.
|
||||
|
||||
**1. Adaptation to Helm v2 EOL**
|
||||
|
||||
[On November 13, 2020, Helm v2 support was formally finished](https://github.com/helm/charts#status-of-the-project), this major version is the result of the required changes applied to the Helm Chart to be able to incorporate the different features added in Helm v3 and to be consistent with the Helm project itself regarding the Helm v2 EOL.
|
||||
|
||||
**What changes were introduced in this major version?**
|
||||
|
||||
- Previous versions of this Helm Chart use `apiVersion: v1` (installable by both Helm 2 and 3), this Helm Chart was updated to `apiVersion: v2` (installable by Helm 3 only). [Here](https://helm.sh/docs/topics/charts/#the-apiversion-field) you can find more information about the `apiVersion` field.
|
||||
- Move dependency information from the *requirements.yaml* to the *Chart.yaml*
|
||||
- After running `helm dependency update`, a *Chart.lock* file is generated containing the same structure used in the previous *requirements.lock*
|
||||
- The different fields present in the *Chart.yaml* file has been ordered alphabetically in a homogeneous way for all the Bitnami Helm Charts
|
||||
|
||||
**Considerations when upgrading to this version**
|
||||
|
||||
- If you want to upgrade to this version from a previous one installed with Helm v3, you shouldn't face any issues
|
||||
- If you want to upgrade to this version using Helm v2, this scenario is not supported as this version doesn't support Helm v2 anymore
|
||||
- If you installed the previous version with Helm v2 and wants to upgrade to this version with Helm v3, please refer to the [official Helm documentation](https://helm.sh/docs/topics/v2_v3_migration/#migration-use-cases) about migrating from Helm v2 to v3
|
||||
|
||||
**Useful links**
|
||||
|
||||
- https://docs.bitnami.com/tutorials/resolve-helm2-helm3-post-migration-issues/
|
||||
- https://helm.sh/docs/topics/v2_v3_migration/
|
||||
- https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3/
|
||||
|
||||
**2. Updated MariaDB dependency version**
|
||||
|
||||
In this major the MariaDB dependency version was also bumped to a new major version that introduces several incompatilibites. Therefore, backwards compatibility is not guaranteed unless an external database is used. Check [MariaDB Upgrading Notes](https://github.com/bitnami/charts/tree/master/bitnami/mariadb#to-800) for more information.
|
||||
|
||||
To upgrade to `9.0.0`, it should be done reusing the PVCs used to hold both the MariaDB and Joomla data on your previous release. To do so, follow the instructions below (the following example assumes that the release name is `joomla`):
|
||||
|
||||
> NOTE: Please, create a backup of your database before running any of those actions. The steps below would be only valid if your application (e.g. any plugins or custom code) is compatible with MariaDB 10.5.x
|
||||
|
||||
Obtain the credentials and the names of the PVCs used to hold both the MariaDB and Joomla data on your current release:
|
||||
|
||||
```console
|
||||
export JOOMLA_PASSWORD=$(kubectl get secret --namespace default joomla -o jsonpath="{.data.joomla-password}" | base64 --decode)
|
||||
export MARIADB_ROOT_PASSWORD=$(kubectl get secret --namespace default joomla-mariadb -o jsonpath="{.data.mariadb-root-password}" | base64 --decode)
|
||||
export MARIADB_PASSWORD=$(kubectl get secret --namespace default joomla-mariadb -o jsonpath="{.data.mariadb-password}" | base64 --decode)
|
||||
export MARIADB_PVC=$(kubectl get pvc -l app=mariadb,component=master,release=joomla -o jsonpath="{.items[0].metadata.name}")
|
||||
```
|
||||
|
||||
Upgrade your release (maintaining the version) disabling MariaDB and scaling Joomla replicas to 0:
|
||||
|
||||
```console
|
||||
$ helm upgrade joomla bitnami/joomla --set joomlaPassword=$JOOMLA_PASSWORD --set replicaCount=0 --set mariadb.enabled=false --version 8.1.9
|
||||
```
|
||||
|
||||
Finally, upgrade you release to 9.0.0 reusing the existing PVC, and enabling back MariaDB:
|
||||
|
||||
```console
|
||||
$ helm upgrade joomla bitnami/joomla --set mariadb.primary.persistence.existingClaim=$MARIADB_PVC --set mariadb.auth.rootPassword=$MARIADB_ROOT_PASSWORD --set mariadb.auth.password=$MARIADB_PASSWORD --set joomlaPassword=$JOOMLA_PASSWORD
|
||||
```
|
||||
|
||||
You should see the lines below in MariaDB container logs:
|
||||
|
||||
```console
|
||||
$ kubectl logs $(kubectl get pods -l app.kubernetes.io/instance=joomla,app.kubernetes.io/name=mariadb,app.kubernetes.io/component=primary -o jsonpath="{.items[0].metadata.name}")
|
||||
...
|
||||
mariadb 12:13:24.98 INFO ==> Using persisted data
|
||||
mariadb 12:13:25.01 INFO ==> Running mysql_upgrade
|
||||
...
|
||||
```
|
||||
|
||||
### To 8.0.0
|
||||
|
||||
The [Bitnami Joomla!](https://github.com/bitnami/bitnami-docker-joomla) image was migrated to a "non-root" user approach. Previously the container ran as the `root` user and the Apache daemon was started as the `daemon` user. From now on, both the container and the Apache daemon run as user `1001`. You can revert this behavior by setting the parameters `containerSecurityContext.runAsUser` to `root`.
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 7.10.4
|
||||
- name: common
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
version: 0.7.1
|
||||
digest: sha256:5f22fe7cbd6975ac37e970b3d200a18ed6f1eafe5ab80ca22d2aba0eb4472e80
|
||||
generated: "2020-10-13T15:26:54.995085372Z"
|
||||
@@ -1,8 +0,0 @@
|
||||
dependencies:
|
||||
- name: mariadb
|
||||
version: 7.x.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
condition: mariadb.enabled
|
||||
- name: common
|
||||
version: 0.7.x
|
||||
repository: https://charts.bitnami.com/bitnami
|
||||
@@ -18,23 +18,23 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "joomla.fullname" . }})
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "common.names.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo "Joomla! URL: http://$NODE_IP:$NODE_PORT/"
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
|
||||
** Please ensure an external IP is associated to the {{ template "joomla.fullname" . }} service before proceeding **
|
||||
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "joomla.fullname" . }} **
|
||||
** Please ensure an external IP is associated to the {{ template "common.names.fullname" . }} service before proceeding **
|
||||
** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }} **
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "joomla.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
|
||||
{{- $port:=.Values.service.port | toString }}
|
||||
echo "Joomla! URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "joomla.fullname" . }} 8080:{{ .Values.service.port }}
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} 8080:{{ .Values.service.port }}
|
||||
echo "Joomla! URL: http://127.0.0.1:8080/"
|
||||
|
||||
{{- end }}
|
||||
@@ -61,23 +61,26 @@ host. To configure Joomla! to use and external database host:
|
||||
|
||||
{{- include "joomla.checkRollingTags" . }}
|
||||
|
||||
{{- $passwordErrors := list -}}
|
||||
{{- $passwordValidationErrors := list -}}
|
||||
{{- $secretName := include "joomla.secretName" . -}}
|
||||
|
||||
{{- if not .Values.existingSecret -}}
|
||||
{{- $requiredJoomlaPassword := dict "valueKey" "joomlaPassword" "secret" $secretName "field" "joomla-password" "context" $ -}}
|
||||
{{- $requiredJoomlaPasswordError := include "common.validations.values.single.empty" $requiredJoomlaPassword -}}
|
||||
{{- $passwordErrors = append $passwordErrors $requiredJoomlaPasswordError -}}
|
||||
{{- $passwordValidationErrors = append $passwordValidationErrors $requiredJoomlaPasswordError -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $passwordMysqlErrors := include "common.validations.values.mariadb.passwords" (dict "secretName" (include "joomla.mariadb.fullname" .) "context" $) -}}
|
||||
{{- $passwordErrors = append $passwordErrors $passwordMysqlErrors -}}
|
||||
{{- $databaseSecretName := include "joomla.databaseSecretName" . -}}
|
||||
|
||||
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordErrors "context" $) -}}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
{{- $mariadbPasswordValidationErrors := include "common.validations.values.mariadb.passwords" (dict "secret" $databaseSecretName "subchart" true "context" $) -}}
|
||||
{{- $passwordValidationErrors = append $passwordValidationErrors $mariadbPasswordValidationErrors -}}
|
||||
{{- end }}
|
||||
|
||||
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}}
|
||||
|
||||
{{- if and (not .Values.mariadb.enabled) .Release.IsUpgrade -}}
|
||||
{{- $databaseSecretName := printf "%s-%s" .Release.Name "externaldb" -}}
|
||||
{{- $requiredExternalPassword := dict "valueKey" "externalDatabase.password" "secret" $databaseSecretName "field" "db-password" -}}
|
||||
{{- $requiredExternalPassword := dict "valueKey" "externalDatabase.password" "secret" $databaseSecretName "field" "mariadb-password" -}}
|
||||
|
||||
WARNING: Review values for the following password in the command, if they are correct please ignore this notice.
|
||||
{{- include "common.validations.values.multiple.empty" (dict "required" (list $requiredExternalPassword) "context" $) -}}
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "joomla.fullname" -}}
|
||||
{{- include "common.names.fullname" . -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
@@ -44,7 +36,7 @@ Return the proper Storage Class
|
||||
|
||||
{{/* Joomla! credential secret name */}}
|
||||
{{- define "joomla.secretName" -}}
|
||||
{{- coalesce .Values.existingSecret (include "joomla.fullname" .) -}}
|
||||
{{- coalesce .Values.existingSecret (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* Check if there are rolling tags in the images */}}
|
||||
@@ -52,3 +44,64 @@ Return the proper Storage Class
|
||||
{{- include "common.warnings.rollingTag" .Values.image -}}
|
||||
{{- include "common.warnings.rollingTag" .Values.metrics.image -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MariaDB Hostname
|
||||
*/}}
|
||||
{{- define "joomla.databaseHost" -}}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
{{- if eq .Values.mariadb.architecture "replication" }}
|
||||
{{- printf "%s-%s" (include "joomla.mariadb.fullname" .) "primary" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "joomla.mariadb.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" .Values.externalDatabase.host -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MariaDB Port
|
||||
*/}}
|
||||
{{- define "joomla.databasePort" -}}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
{{- printf "3306" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%d" (.Values.externalDatabase.port | int ) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MariaDB Database Name
|
||||
*/}}
|
||||
{{- define "joomla.databaseName" -}}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
{{- printf "%s" .Values.mariadb.auth.database -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" .Values.externalDatabase.database -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MariaDB User
|
||||
*/}}
|
||||
{{- define "joomla.databaseUser" -}}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
{{- printf "%s" .Values.mariadb.auth.username -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" .Values.externalDatabase.user -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the MariaDB Secret Name
|
||||
*/}}
|
||||
{{- define "joomla.databaseSecretName" -}}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
{{- printf "%s" (include "joomla.mariadb.fullname" .) -}}
|
||||
{{- else if .Values.externalDatabase.existingSecret -}}
|
||||
{{- printf "%s" .Values.externalDatabase.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" .Release.Name "externaldb" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "joomla.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -19,6 +20,7 @@ spec:
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -40,6 +42,11 @@ spec:
|
||||
{{- end }}
|
||||
{{- if .Values.affinity }}
|
||||
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
||||
{{- else }}
|
||||
affinity:
|
||||
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
|
||||
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
|
||||
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
||||
{{- end }}
|
||||
{{- if .Values.nodeSelector }}
|
||||
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
||||
@@ -47,6 +54,12 @@ spec:
|
||||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.priorityClassName }}
|
||||
priorityClassName: {{ .Values.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.initContainers }}
|
||||
initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
hostAliases:
|
||||
- ip: "127.0.0.1"
|
||||
hostnames:
|
||||
@@ -65,6 +78,9 @@ spec:
|
||||
securityContext:
|
||||
runAsUser: {{ .Values.containerSecurityContext.runAsUser }}
|
||||
{{- end }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: BITNAMI_DEBUG
|
||||
value: {{ ternary "true" "false" .Values.image.debug | quote }}
|
||||
@@ -74,35 +90,19 @@ spec:
|
||||
value: {{ .Values.containerPorts.http | quote }}
|
||||
- name: APACHE_HTTPS_PORT_NUMBER
|
||||
value: {{ .Values.containerPorts.https | quote }}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
- name: JOOMLA_DATABASE_HOST
|
||||
value: {{ template "joomla.mariadb.fullname" . }}
|
||||
value: {{ include "joomla.databaseHost" . | quote }}
|
||||
- name: JOOMLA_DATABASE_PORT_NUMBER
|
||||
value: "3306"
|
||||
value: {{ include "joomla.databasePort" . | quote }}
|
||||
- name: JOOMLA_DATABASE_NAME
|
||||
value: {{ .Values.mariadb.db.name | quote }}
|
||||
value: {{ include "joomla.databaseName" . | quote }}
|
||||
- name: JOOMLA_DATABASE_USER
|
||||
value: {{ .Values.mariadb.db.user | quote }}
|
||||
value: {{ include "joomla.databaseUser" . | quote }}
|
||||
- name: JOOMLA_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "joomla.mariadb.fullname" . }}
|
||||
name: {{ include "joomla.databaseSecretName" . }}
|
||||
key: mariadb-password
|
||||
{{- else }}
|
||||
- name: JOOMLA_DATABASE_HOST
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
- name: JOOMLA_DATABASE_PORT_NUMBER
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
- name: JOOMLA_DATABASE_NAME
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
- name: JOOMLA_DATABASE_USER
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
- name: JOOMLA_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: JOOMLA_SKIP_BOOTSTRAP
|
||||
value: {{ default "no" .Values.joomlaSkipInstall | quote }}
|
||||
- name: JOOMLA_USERNAME
|
||||
@@ -139,9 +139,6 @@ spec:
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.containerPorts.http }}
|
||||
@@ -211,7 +208,7 @@ spec:
|
||||
- name: joomla-data
|
||||
{{- if .Values.persistence.enabled }}
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.persistence.existingClaim | default (include "joomla.fullname" . ) }}
|
||||
claimName: {{ .Values.persistence.existingClaim | default (include "common.names.fullname" . ) }}
|
||||
{{- else }}
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
{{- if not .Values.mariadb.enabled }}
|
||||
{{- if (not (or .Values.mariadb.enabled .Values.externalDatabase.existingSecret)) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- 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 }}
|
||||
type: Opaque
|
||||
data:
|
||||
db-password: {{ default "" .Values.externalDatabase.password | b64enc | quote }}
|
||||
mariadb-password: {{ default "" .Values.externalDatabase.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{{- if .Values.ingress.enabled }}
|
||||
apiVersion: extensions/v1beta1
|
||||
apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "joomla.fullname" . }}
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -24,7 +25,7 @@ spec:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ include "joomla.fullname" $ }}
|
||||
serviceName: {{ include "common.names.fullname" $ }}
|
||||
servicePort: 80
|
||||
{{- range .Values.ingress.hosts }}
|
||||
- host: {{ .name }}
|
||||
@@ -32,7 +33,7 @@ spec:
|
||||
paths:
|
||||
- path: {{ default "/" .path }}
|
||||
backend:
|
||||
serviceName: {{ include "joomla.fullname" $ }}
|
||||
serviceName: {{ include "common.names.fullname" $ }}
|
||||
servicePort: http
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "joomla.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ template "joomla.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "joomla.fullname" . }}
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -11,6 +12,9 @@ metadata:
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -5,6 +5,7 @@ kind: Secret
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
labels: {{- include "common.labels.standard" $ | nindent 4 }}
|
||||
app.kubernetes.io/component: joomla
|
||||
{{- if $.Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"form": true,
|
||||
"description": "Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database switch this off and configure the external database details"
|
||||
},
|
||||
"master": {
|
||||
"primary": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"persistence": {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/joomla
|
||||
tag: 3.9.22-debian-10-r28
|
||||
tag: 3.9.22-debian-10-r36
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
@@ -32,11 +32,11 @@ image:
|
||||
##
|
||||
debug: false
|
||||
|
||||
## String to partially override joomla.fullname template (will maintain the release name)
|
||||
## String to partially override common.names.fullname template (will maintain the release name)
|
||||
##
|
||||
nameOverride:
|
||||
|
||||
## String to fully override joomla.fullname template
|
||||
## String to fully override common.names.fullname template
|
||||
##
|
||||
fullnameOverride:
|
||||
|
||||
@@ -137,6 +137,11 @@ existingSecret:
|
||||
## External database configuration
|
||||
##
|
||||
externalDatabase:
|
||||
## Use existing secret (ignores previous password)
|
||||
## must contain key `mariadb-password`
|
||||
## NOTE: When it's set, the `externalDatabase.password` parameter is ignored
|
||||
# existingSecret:
|
||||
|
||||
## Database host
|
||||
##
|
||||
host: ""
|
||||
@@ -174,31 +179,30 @@ mariadb:
|
||||
## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters
|
||||
##
|
||||
enabled: true
|
||||
## Disable MariaDB replication
|
||||
##
|
||||
replication:
|
||||
enabled: false
|
||||
|
||||
## Create a database and a database user
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
## MariaDB architecture. Allowed values: standalone or replication
|
||||
##
|
||||
db:
|
||||
name: bitnami_joomla
|
||||
user: bn_joomla
|
||||
## If the password is not specified, mariadb will generates a random password
|
||||
architecture: standalone
|
||||
|
||||
## MariaDB Authentication parameters
|
||||
##
|
||||
auth:
|
||||
## MariaDB root password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb#setting-the-root-password-on-first-run
|
||||
##
|
||||
password: ""
|
||||
|
||||
## MariaDB admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
rootUser:
|
||||
rootPassword: ""
|
||||
## MariaDB custom user and database
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-on-first-run
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
##
|
||||
database: bitnami_joomla
|
||||
username: bn_joomla
|
||||
password: ""
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
master:
|
||||
primary:
|
||||
persistence:
|
||||
enabled: true
|
||||
## mariadb data Persistent Volume Storage Class
|
||||
@@ -234,6 +238,10 @@ service:
|
||||
port: 80
|
||||
# HTTPS Port
|
||||
httpsPort: 443
|
||||
## loadBalancerIP for the Joomla Service (optional, cloud specific)
|
||||
## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer
|
||||
##
|
||||
## loadBalancerIP:
|
||||
##
|
||||
## nodePorts:
|
||||
## http: <to set explicitly, choose port between 30000-32767>
|
||||
@@ -334,7 +342,40 @@ persistence:
|
||||
##
|
||||
hostPath:
|
||||
|
||||
## Affinity for pod assignment
|
||||
## Pod affinity preset
|
||||
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
podAffinityPreset: ""
|
||||
|
||||
## Pod anti-affinity preset
|
||||
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
podAntiAffinityPreset: soft
|
||||
|
||||
## Node affinity preset
|
||||
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
|
||||
## Allowed values: soft, hard
|
||||
##
|
||||
nodeAffinityPreset:
|
||||
## Node affinity type
|
||||
## Allowed values: soft, hard
|
||||
type: ""
|
||||
## Node label key to match
|
||||
## E.g.
|
||||
## key: "kubernetes.io/e2e-az-name"
|
||||
##
|
||||
key: ""
|
||||
## Node label values to match
|
||||
## E.g.
|
||||
## values:
|
||||
## - e2e-az1
|
||||
## - e2e-az2
|
||||
##
|
||||
values: []
|
||||
|
||||
## Affinity for pod assignment. Evaluated as a template.
|
||||
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
|
||||
##
|
||||
affinity: {}
|
||||
@@ -348,6 +389,10 @@ nodeSelector: {}
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
##
|
||||
resources:
|
||||
# limits:
|
||||
## cpu: 100m
|
||||
## memory: 128Mi
|
||||
##
|
||||
requests:
|
||||
memory: 512Mi
|
||||
cpu: 300m
|
||||
@@ -388,6 +433,11 @@ customLivenessProbe: {}
|
||||
|
||||
customReadinessProbe: {}
|
||||
|
||||
## Joomla pods' priority.
|
||||
## ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
|
||||
##
|
||||
# priorityClassName: ""
|
||||
|
||||
## lifecycleHooks for the container to automate configuration before or after startup.
|
||||
##
|
||||
lifecycleHooks:
|
||||
@@ -409,7 +459,7 @@ metrics:
|
||||
image:
|
||||
registry: docker.io
|
||||
repository: bitnami/apache-exporter
|
||||
tag: 0.8.0-debian-10-r208
|
||||
tag: 0.8.0-debian-10-r217
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
|
||||
Reference in New Issue
Block a user