File tree Expand file tree Collapse file tree 8 files changed +94
-5
lines changed
Expand file tree Collapse file tree 8 files changed +94
-5
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ helm repo add appcat 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.3 /total )] ( https://github.com/vshn/appcat-charts/releases/tag/vshnmariadb-0.0.3 ) | [ vshnmariadb] ( charts/vshnmariadb/README.md ) |
18+ | [ ![ chart downloads] ( https://img.shields.io/github/downloads/vshn/appcat-charts/vshnmariadb-0.0.4 /total )] ( https://github.com/vshn/appcat-charts/releases/tag/vshnmariadb-0.0.4 ) | [ vshnmariadb] ( charts/vshnmariadb/README.md ) |
1919
2020## Add / Update Charts
2121
Original file line number Diff line number Diff line change 11apiVersion : v1
2- appVersion : 0.0.3
2+ appVersion : 0.0.4
33description : A Helm chart for MariaDB instances using the mariadb-operator
44name : vshnmariadb
5- version : 0.0.3
5+ version : 0.0.4
66maintainers :
77 - name : Schedar Team
88 email : info@vshn.ch
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Only MariaDB official images are supported. |
2222| ` storage.size ` | PVC size of the instance | 1Gi
2323| ` resources ` | Resources describes the compute resource requirements. |
2424| ` rootPasswordSecretKeyRef ` | Reference to the secret containing the root password |
25+ | ` affinity ` | Definites the affinity for the pods |
2526
2627### Galera
2728
@@ -37,3 +38,13 @@ Only MariaDB official images are supported. |
3738| --- | --- | ---
3839| ` metrics.enabled ` | Enabled is a flag to enable Metrics | true
3940| ` exporter.image ` | Image name to be used as metrics exporter. The supported format is <image >:<tag >. |
41+
42+ ### Backup
43+
44+ | Parameter | Description | Default
45+ | --- | --- | ---
46+ | ` backup.enabled ` | Enabled is a flag to enable backups | false
47+ | ` backup.s3.bucket ` | Name of the s3 bucket for the backups |
48+ | ` backup.s3.endpoint ` | Name of the s3 endpoint for the backups |
49+ | ` backup.s3.accessKey ` | Access key for the s3 bucket |
50+ | ` backup.s3.secretKey ` | Secret key for the s3 bucket |
Original file line number Diff line number Diff line change 11# vshnmariadb
22
3- ![ Version: 0.0.3 ] ( https://img.shields.io/badge/Version-0.0.3 -informational?style=flat-square ) ![ AppVersion: 0.0.3 ] ( https://img.shields.io/badge/AppVersion-0.0.3 -informational?style=flat-square )
3+ ![ Version: 0.0.4 ] ( https://img.shields.io/badge/Version-0.0.4 -informational?style=flat-square ) ![ AppVersion: 0.0.4 ] ( https://img.shields.io/badge/AppVersion-0.0.4 -informational?style=flat-square )
44
55A Helm chart for MariaDB instances using the mariadb-operator
66
@@ -34,6 +34,7 @@ Only MariaDB official images are supported. |
3434| ` storage.size ` | PVC size of the instance | 1Gi
3535| ` resources ` | Resources describes the compute resource requirements. |
3636| ` rootPasswordSecretKeyRef ` | Reference to the secret containing the root password |
37+ | ` affinity ` | Definites the affinity for the pods |
3738
3839### Galera
3940
@@ -50,6 +51,16 @@ Only MariaDB official images are supported. |
5051| ` metrics.enabled ` | Enabled is a flag to enable Metrics | true
5152| ` exporter.image ` | Image name to be used as metrics exporter. The supported format is <image >:<tag >. |
5253
54+ ### Backup
55+
56+ | Parameter | Description | Default
57+ | --- | --- | ---
58+ | ` backup.enabled ` | Enabled is a flag to enable backups | false
59+ | ` backup.s3.bucket ` | Name of the s3 bucket for the backups |
60+ | ` backup.s3.endpoint ` | Name of the s3 endpoint for the backups |
61+ | ` backup.s3.accessKey ` | Access key for the s3 bucket |
62+ | ` backup.s3.secretKey ` | Secret key for the s3 bucket |
63+
5364<!-- -
5465Common/Useful Link references from values.yaml
5566-->
Original file line number Diff line number Diff line change 1+ {{- if .Values.backup.enabled -}}
2+ apiVersion : k8s.mariadb.com/v1alpha1
3+ kind : PhysicalBackup
4+ metadata :
5+ name : {{ include "mariadb.fullname" . }}
6+ labels :
7+ app.kubernetes.io/name : {{ include "mariadb.name" . }}
8+ helm.sh/chart : {{ include "mariadb.chart" . }}
9+ app.kubernetes.io/instance : {{ .Release.Name }}
10+ app.kubernetes.io/managed-by : {{ .Release.Service }}
11+ spec :
12+ mariaDbRef :
13+ name : {{ include "mariadb.fullname" . }}
14+ storage :
15+ schedule :
16+ {{/* Generate uniform random minute (0–59) */}}
17+ {{- $minute := (randNumeric 2 | atoi) -}}
18+ {{- if gt $minute 59 -}}{{- $minute = (mod $minute 60) -}}{{- end -}}
19+
20+ {{/* Random index 0–7 */}}
21+ {{- $r := (mod (atoi (randNumeric 2)) 8) -}}
22+
23+ {{/* Allowed night hours */}}
24+ {{- $nightHours := list 22 23 0 1 2 3 4 5 -}}
25+
26+ {{- $hour := index $nightHours $r -}}
27+ cron : {{ printf "%d %d * * *" $minute $hour }}
28+ s3 :
29+ bucket : {{ .Values.backup.s3.bucket }}
30+ endpoint : {{ .Values.backup.s3.endpoint }}
31+ accessKeyIdSecretKeyRef :
32+ name : backup
33+ key : access-key
34+ secretAccessKeySecretKeyRef :
35+ name : backup
36+ key : secret-key
37+ tls :
38+ enabled : true
39+ stagingStorage :
40+ persistentVolumeClaim :
41+ resources :
42+ requests :
43+ storage : {{ .Values.storage.size }}
44+ accessModes :
45+ - ReadWriteOnce
46+ {{- end -}}
Original file line number Diff line number Diff line change 1+ {{- if .Values.backup.enabled -}}
2+ apiVersion : v1
3+ kind : Secret
4+ metadata :
5+ name : backup
6+ namespace : {{ .Release.Namespace | quote }}
7+ labels :
8+ app.kubernetes.io/name : {{ include "mariadb.name" . }}
9+ helm.sh/chart : {{ include "mariadb.chart" . }}
10+ app.kubernetes.io/instance : {{ .Release.Name }}
11+ app.kubernetes.io/managed-by : {{ .Release.Service }}
12+ type : Opaque
13+ data :
14+ access-key : {{ .Values.backup.s3.accessKey | b64enc | quote }}
15+ secret-key : {{ .Values.backup.s3.secretKey | b64enc | quote }}
16+ {{- end -}}
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ metadata:
77 helm.sh/chart : {{ include "mariadb.chart" . }}
88 app.kubernetes.io/instance : {{ .Release.Name }}
99 app.kubernetes.io/managed-by : {{ .Release.Service }}
10-
1110spec :
1211 {{ if .Values.rootPasswordSecretKeyRef}}
1312 rootPasswordSecretKeyRef : {{ .Values.rootPasswordSecretKeyRef | toYaml | nindent 4 }}
3534 {{- end }}
3635 storage :
3736 size : {{ .Values.storage.size }}
37+ {{- with .Values.affinity }}
38+ affinity : {{ . | toYaml | nindent 4 }}
39+ {{- end }}
3840
Original file line number Diff line number Diff line change @@ -20,3 +20,6 @@ metrics:
2020 enabled : true
2121 exporter :
2222 image : nil
23+
24+ backup :
25+ enabled : false
You can’t perform that action at this time.
0 commit comments