Skip to content

Commit 8b971df

Browse files
authored
Merge pull request #1 from vshn/initial_version
Add chart for mariadb-instances
2 parents 2af7754 + 88d7700 commit 8b971df

File tree

7 files changed

+191
-0
lines changed

7 files changed

+191
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ helm repo add vshn https://charts.appcat.ch
1515

1616
| Downloads & Changelog | Chart |
1717
| --- | --- |
18+
| [![chart downloads](https://img.shields.io/github/downloads/vshn/appcat-charts/vshnmariadb-0.0.1/total)](https://github.com/vshn/appcat-charts/releases/tag/vshnmariadb-0.0.1) | [vshnmariadb](charts/vshnmariadb/README.md) |
1819

1920
## Add / Update Charts
2021

charts/vshnmariadb/Chart.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: v1
2+
appVersion: 2.7.3
3+
description: A Helm chart for MariaDB instances using the mariadb-operator
4+
name: vshnmariadb
5+
version: 0.0.1
6+
maintainers:
7+
- name: Schedar Team
8+
email: info@vshn.ch
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!---
2+
The README.md file is automatically generated with helm-docs!
3+
4+
Edit the README.gotmpl.md template instead.
5+
-->
6+
7+
## Introduction
8+
9+
This helm chart is used to deploy mariadb instances using the [mariadb-operator](https://github.com/mariadb-operator/mariadb-operator).
10+
11+
## Configuration
12+
13+
The following table lists the configurable parameters chart. For default values and examples, consult `values.yaml`.
14+
15+
### Generic parameters
16+
| Parameter | Description | Default
17+
|--- | --- | ---
18+
| `image` | Image name to be used by the MariaDB instances. The supported format is <image>:<tag>.
19+
Only MariaDB official images are supported. |
20+
| `replicas` | Number of replicas to deploy | 3
21+
| `myCnf` | Custom MariaDB configuration | ""
22+
| `storage.size` | PVC size of the instance | 1Gi
23+
| `resources` | Resources describes the compute resource requirements. |
24+
| `rootPasswordSecretKeyRef` | Reference to the secret containing the root password |
25+
26+
### Galera
27+
28+
| Parameter | Description | Default
29+
|--- | --- | ---
30+
| `galera.enabled` | If galera should be enabled | true
31+
| `galera.config.resuseStorageVolume` | ReuseStorageVolume indicates that storage volume used by MariaDB should be reused to store the Galera configuration files. | true
32+
| `galera.providerOptions` | ProviderOptions is map of Galera configuration parameters. [More info]( https://mariadb.com/kb/en/galera-cluster-system-variables/#wsrep_provider_options). | `{'gcs.fc_single_primary': yes', 'cert.log_conflicts': 'yes'}`
33+
34+
### Metrics
35+
36+
| Parameter | Description | Default
37+
| --- | --- | ---
38+
| `metrics.enabled` | Enabled is a flag to enable Metrics | true
39+
| `exporter.image` | Image name to be used as metrics exporter. The supported format is <image>:<tag>. |

charts/vshnmariadb/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# vshnmariadb
2+
3+
![Version: 0.0.1](https://img.shields.io/badge/Version-0.0.1-informational?style=flat-square) ![AppVersion: 2.7.3](https://img.shields.io/badge/AppVersion-2.7.3-informational?style=flat-square)
4+
5+
A Helm chart for MariaDB instances using the mariadb-operator
6+
7+
## Installation
8+
9+
```bash
10+
helm repo add appcat https://charts.appcat.ch
11+
helm install vshnmariadb vshn/vshnmariadb
12+
```
13+
<!---
14+
The README.md file is automatically generated with helm-docs!
15+
16+
Edit the README.gotmpl.md template instead.
17+
-->
18+
19+
## Introduction
20+
21+
This helm chart is used to deploy mariadb instances using the [mariadb-operator](https://github.com/mariadb-operator/mariadb-operator).
22+
23+
## Configuration
24+
25+
The following table lists the configurable parameters chart. For default values and examples, consult `values.yaml`.
26+
27+
### Generic parameters
28+
| Parameter | Description | Default
29+
|--- | --- | ---
30+
| `image` | Image name to be used by the MariaDB instances. The supported format is <image>:<tag>.
31+
Only MariaDB official images are supported. |
32+
| `replicas` | Number of replicas to deploy | 3
33+
| `myCnf` | Custom MariaDB configuration | ""
34+
| `storage.size` | PVC size of the instance | 1Gi
35+
| `resources` | Resources describes the compute resource requirements. |
36+
| `rootPasswordSecretKeyRef` | Reference to the secret containing the root password |
37+
38+
### Galera
39+
40+
| Parameter | Description | Default
41+
|--- | --- | ---
42+
| `galera.enabled` | If galera should be enabled | true
43+
| `galera.config.resuseStorageVolume` | ReuseStorageVolume indicates that storage volume used by MariaDB should be reused to store the Galera configuration files. | true
44+
| `galera.providerOptions` | ProviderOptions is map of Galera configuration parameters. [More info]( https://mariadb.com/kb/en/galera-cluster-system-variables/#wsrep_provider_options). | `{'gcs.fc_single_primary': yes', 'cert.log_conflicts': 'yes'}`
45+
46+
### Metrics
47+
48+
| Parameter | Description | Default
49+
| --- | --- | ---
50+
| `metrics.enabled` | Enabled is a flag to enable Metrics | true
51+
| `exporter.image` | Image name to be used as metrics exporter. The supported format is <image>:<tag>. |
52+
53+
<!---
54+
Common/Useful Link references from values.yaml
55+
-->
56+
[resource-units]: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes
57+
[prometheus-operator]: https://github.com/coreos/prometheus-operator
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{{/* vim: set filetype=mustache: */}}
2+
{{/*
3+
Expand the name of the chart.
4+
*/}}
5+
{{- define "mariadb.name" -}}
6+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
7+
{{- end -}}
8+
9+
{{/*
10+
Create a default fully qualified app name.
11+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12+
If release name contains chart name it will be used as a full name.
13+
*/}}
14+
{{- define "mariadb.fullname" -}}
15+
{{- if .Values.fullnameOverride -}}
16+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
17+
{{- else -}}
18+
{{- $name := default .Chart.Name .Values.nameOverride -}}
19+
{{- if contains $name .Release.Name -}}
20+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
21+
{{- else -}}
22+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
23+
{{- end -}}
24+
{{- end -}}
25+
{{- end -}}
26+
27+
{{/*
28+
Create chart name and version as used by the chart label.
29+
*/}}
30+
{{- define "mariadb.chart" -}}
31+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
32+
{{- end -}}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: k8s.mariadb.com/v1alpha1
2+
kind: MariaDB
3+
metadata:
4+
name: {{ include "mariadb.fullname" . }}
5+
labels:
6+
app.kubernetes.io/name: {{ include "mariadb.name" . }}
7+
helm.sh/chart: {{ include "mariadb.chart" . }}
8+
app.kubernetes.io/instance: {{ .Release.Name }}
9+
app.kubernetes.io/managed-by: {{ .Release.Service }}
10+
spec:
11+
{{- with .Values.rootPasswordSecretKeyRef }}
12+
rootPasswordSecretKeyRef: {{ . | toYaml | nindent 4 }}
13+
{{- end }}
14+
image: {{ .Values.image }}
15+
replicas: {{ .Values.replicas }}
16+
myCnf: {{ .Values.myCnf }}
17+
{{- with .Values.resources }}
18+
resources: {{ . | toYaml | nindent 4 }}
19+
{{- end }}
20+
metrics:
21+
enabled: {{ .Values.metrics.enabled }}
22+
exporter:
23+
image: {{ .Values.metrics.exporter.image }}
24+
galera:
25+
enabled: {{ .Values.galera.enabled }}
26+
config:
27+
reuseStorageVolume: {{ .Values.galera.config.reuseStorageVolume }}
28+
{{- with .Values.galera.providerOptions }}
29+
providerOptions: {{ . | toYaml | nindent 6 }}
30+
{{- end }}
31+
storage:
32+
size: {{ .Values.storage.size }}
33+

charts/vshnmariadb/values.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
replicas: 3
2+
myCfn: nil
3+
rootPasswordSecretKeyRef: {}
4+
image: nil
5+
6+
storage:
7+
size: 1Gi
8+
resources: {}
9+
10+
galera:
11+
enabled: true
12+
config:
13+
reuseStorageVolume: true
14+
providerOptions:
15+
'gcs.fc_single_primary': 'yes'
16+
'cert.log_conflicts': 'yes'
17+
18+
metrics:
19+
enabled: true
20+
exporter:
21+
image: nil

0 commit comments

Comments
 (0)