mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/mariadb] Support for extraInitContainers like in other popular charts (#10423)
* Bump patch chart version Signed-off-by: alokrajiv <mail@alokrajiv.com> * add initContainer option for master Signed-off-by: alokrajiv <mail@alokrajiv.com> * add initContainer option for slave Signed-off-by: alokrajiv <mail@alokrajiv.com> * Add initContainer options into README docs Signed-off-by: alokrajiv <mail@alokrajiv.com> * Added extraInitContainers option into production values.yaml Signed-off-by: alokrajiv <mail@alokrajiv.com> * Chart bump up minor for new feature Signed-off-by: alokrajiv <mail@alokrajiv.com> * Add section in Readme for extraInitContainers Signed-off-by: alokrajiv <mail@alokrajiv.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
2f316acc41
commit
dca5b42f3d
@@ -1,5 +1,5 @@
|
||||
name: mariadb
|
||||
version: 5.3.1
|
||||
version: 5.4.0
|
||||
appVersion: 10.1.37
|
||||
description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. Highly available MariaDB cluster.
|
||||
keywords:
|
||||
|
||||
@@ -84,6 +84,7 @@ The following table lists the configurable parameters of the MariaDB chart and t
|
||||
| `master.persistence.storageClass` | Persistent Volume Storage Class | `` |
|
||||
| `master.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
|
||||
| `master.persistence.size` | Persistent Volume Size | `8Gi` |
|
||||
| `master.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (master) | |
|
||||
| `master.config` | Config file for the MariaDB Master server | `_default values in the values.yaml file_` |
|
||||
| `master.resources` | CPU/Memory resource requests/limits for master node | `{}` |
|
||||
| `master.livenessProbe.enabled` | Turn on and off liveness probe (master) | `true` |
|
||||
@@ -109,6 +110,7 @@ The following table lists the configurable parameters of the MariaDB chart and t
|
||||
| `slave.persistence.storageClass` | Persistent Volume Storage Class | `` |
|
||||
| `slave.persistence.accessModes` | Persistent Volume Access Modes | `[ReadWriteOnce]` |
|
||||
| `slave.persistence.size` | Persistent Volume Size | `8Gi` |
|
||||
| `slave.extraInitContainers` | Additional init containers as a string to be passed to the `tpl` function (slave) | |
|
||||
| `slave.config` | Config file for the MariaDB Slave replicas | `_default values in the values.yaml file_` |
|
||||
| `slave.resources` | CPU/Memory resource requests/limits for slave node | `{}` |
|
||||
| `slave.livenessProbe.enabled` | Turn on and off liveness probe (slave) | `true` |
|
||||
@@ -166,6 +168,20 @@ The [Bitnami MariaDB](https://github.com/bitnami/bitnami-docker-mariadb) image s
|
||||
|
||||
The chart mounts a [Persistent Volume](kubernetes.io/docs/user-guide/persistent-volumes/) volume at this location. The volume is created using dynamic volume provisioning, by default. An existing PersistentVolumeClaim can be defined.
|
||||
|
||||
## Extra Init Containers
|
||||
|
||||
The feature allows for specifying a template string for a initContainer in the master/slave pod. Usecases include situations when you need some pre-run setup. For example, in IKS (IBM Cloud Kubernetes Service), non-root users do not have write permission on the volume mount path for NFS-powered file storage. So, you could use a initcontainer to `chown` the mount. See a example below, where we add an initContainer on the master pod that reports to an external resource that the db is going to starting.
|
||||
`values.yaml`
|
||||
```yaml
|
||||
master:
|
||||
extraInitContainers: |
|
||||
- name: initcontainer
|
||||
image: alpine:latest
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- curl http://api-service.local/db/starting;
|
||||
```
|
||||
|
||||
## Upgrading
|
||||
|
||||
It's necessary to set the `rootUser.password` parameter when upgrading for readiness/liveness probes to work properly. When you install this chart for the first time, some notes will be displayed providing the credentials you must use under the 'Administrator credentials' section. Please note down the password and run the command below to upgrade your chart:
|
||||
|
||||
@@ -78,6 +78,10 @@ spec:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
{{- if .Values.master.extraInitContainers }}
|
||||
initContainers:
|
||||
{{ tpl .Values.master.extraInitContainers . | indent 6}}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "mariadb"
|
||||
|
||||
@@ -79,6 +79,10 @@ spec:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
{{- if .Values.master.extraInitContainers }}
|
||||
initContainers:
|
||||
{{ tpl .Values.master.extraInitContainers . | indent 6}}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: "mariadb"
|
||||
|
||||
@@ -158,6 +158,10 @@ master:
|
||||
##
|
||||
size: 8Gi
|
||||
##
|
||||
extraInitContainers: |
|
||||
# - name: do-something
|
||||
# image: busybox
|
||||
# command: ['do', 'something']
|
||||
|
||||
## Configure MySQL with a custom my.cnf file
|
||||
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||
@@ -249,6 +253,10 @@ slave:
|
||||
##
|
||||
size: 8Gi
|
||||
##
|
||||
extraInitContainers: |
|
||||
# - name: do-something
|
||||
# image: busybox
|
||||
# command: ['do', 'something']
|
||||
|
||||
## Configure MySQL slave with a custom my.cnf file
|
||||
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||
|
||||
@@ -158,6 +158,10 @@ master:
|
||||
##
|
||||
size: 8Gi
|
||||
##
|
||||
extraInitContainers: |
|
||||
# - name: do-something
|
||||
# image: busybox
|
||||
# command: ['do', 'something']
|
||||
|
||||
## Configure MySQL with a custom my.cnf file
|
||||
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||
@@ -248,6 +252,10 @@ slave:
|
||||
##
|
||||
size: 8Gi
|
||||
##
|
||||
extraInitContainers: |
|
||||
# - name: do-something
|
||||
# image: busybox
|
||||
# command: ['do', 'something']
|
||||
|
||||
## Configure MySQL slave with a custom my.cnf file
|
||||
## ref: https://mysql.com/kb/en/mysql/configuring-mysql-with-mycnf/#example-of-configuration-file
|
||||
|
||||
Reference in New Issue
Block a user