diff --git a/charts/memos/Chart.lock b/charts/memos/Chart.lock
index 17bf92110..6ebdf3806 100644
--- a/charts/memos/Chart.lock
+++ b/charts/memos/Chart.lock
@@ -2,5 +2,8 @@ dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 1.5.1
-digest: sha256:3588c89621170f198d4938664d3ea4c469bd91fd78183c83cfcf63f474d348c4
-generated: "2023-08-06T06:21:34.122828388Z"
+- name: mariadb
+ repository: https://charts.bitnami.com/bitnami
+ version: 14.1.2
+digest: sha256:d4491041a329f81f6fe04ce7d4fd19806e896c8f32f84b334fe1149000777ed4
+generated: "2023-11-20T01:51:25.609262-06:00"
diff --git a/charts/memos/Chart.yaml b/charts/memos/Chart.yaml
index 707063dea..cdd86a27a 100644
--- a/charts/memos/Chart.yaml
+++ b/charts/memos/Chart.yaml
@@ -4,7 +4,7 @@ description: A lightweight, self-hosted memo hub. Open Source and Free forever.
home: https://charts.gabe565.com/charts/memos/
icon: https://raw.githubusercontent.com/gabe565/charts/main/charts/memos/icon.png
type: application
-version: 0.9.1
+version: 0.9.2
# renovate datasource=docker depName=ghcr.io/usememos/memos
appVersion: 0.17.1
kubeVersion: ">=1.22.0-0"
@@ -16,12 +16,16 @@ dependencies:
- name: common
repository: https://bjw-s.github.io/helm-charts
version: 1.5.1
+ - name: mariadb
+ version: 14.1.2
+ repository: https://charts.bitnami.com/bitnami
+ condition: mariadb.enabled
sources:
- https://github.com/usememos/memos
annotations:
artifacthub.io/changes: |-
- - kind: changed
- description: Update ghcr.io/usememos/memos docker tag to v0.17.1
+ - kind: added
+ description: Add mariadb subchart
artifacthub.io/links: |-
- name: App Source
url: https://github.com/usememos/memos
diff --git a/charts/memos/README.md b/charts/memos/README.md
index c1ad7c429..1eec8a802 100644
--- a/charts/memos/README.md
+++ b/charts/memos/README.md
@@ -2,7 +2,7 @@
-![Version: 0.9.1](https://img.shields.io/badge/Version-0.9.1-informational?style=flat)
+![Version: 0.9.2](https://img.shields.io/badge/Version-0.9.2-informational?style=flat)
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat)
![AppVersion: 0.17.1](https://img.shields.io/badge/AppVersion-0.17.1-informational?style=flat)
@@ -11,7 +11,7 @@ A lightweight, self-hosted memo hub. Open Source and Free forever.
**Homepage:**
**This chart is not maintained by the upstream project and any issues with the chart should be raised
-[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=memos&version=0.9.1)**
+[here](https://github.com/gabe565/charts/issues/new?assignees=gabe565&labels=bug&template=bug_report.yaml&name=memos&version=0.9.2)**
## Source Code
@@ -26,6 +26,7 @@ Kubernetes: `>=1.22.0-0`
| Repository | Name | Version |
|------------|------|---------|
| | common | 1.5.1 |
+| | mariadb | 14.1.2 |
## Installing the Chart
@@ -88,6 +89,7 @@ N/A
| image.repository | string | `"ghcr.io/usememos/memos"` | image repository |
| image.tag | string | `"0.17.1"` | image tag |
| ingress.main | object | See [values.yaml](./values.yaml) | Enable and configure ingress settings for the chart under this key. |
+| mariadb | object | See [values.yaml](./values.yaml) | Enable and configure mariadb database subchart under this key. For more options see [mariadb chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/mariadb) |
| persistence | object | See [values.yaml](./values.yaml) | Configure persistence settings for the chart under this key. |
| podSecurityContext.fsGroup | int | `65534` | Volume binds will be granted to `nobody` group |
| podSecurityContext.runAsGroup | int | `65534` | Run as `nobody` group |
diff --git a/charts/memos/templates/common.yaml b/charts/memos/templates/common.yaml
index a444608b2..26cd8df75 100644
--- a/charts/memos/templates/common.yaml
+++ b/charts/memos/templates/common.yaml
@@ -2,6 +2,17 @@
{{- define "memos.harcodedValues" -}}
env:
MEMOS_PORT: {{ .Values.service.main.ports.http.port }}
+
+ {{- with .Values.mariadb}}
+ {{- if .enabled }}
+ MEMOS_DRIVER: mysql
+ DB_PASSWORD:
+ secretKeyRef:
+ name: {{ $.Release.Name }}-mariadb
+ key: mariadb-password
+ MEMOS_DSN: {{ .auth.username }}:$(DB_PASSWORD)@tcp({{ $.Release.Name }}-mariadb)/{{ .auth.database }}
+ {{- end }}
+ {{- end }}
{{- end -}}
{{- $_ := merge .Values (include "memos.harcodedValues" . | fromYaml) -}}
diff --git a/charts/memos/values.yaml b/charts/memos/values.yaml
index f1ed8079e..59c524b6f 100644
--- a/charts/memos/values.yaml
+++ b/charts/memos/values.yaml
@@ -54,3 +54,19 @@ podSecurityContext:
runAsGroup: 65534
# -- Volume binds will be granted to `nobody` group
fsGroup: 65534
+
+# -- Enable and configure mariadb database subchart under this key.
+# For more options see [mariadb chart documentation](https://github.com/bitnami/charts/tree/master/bitnami/mariadb)
+# @default -- See [values.yaml](./values.yaml)
+mariadb:
+ enabled: false
+ auth:
+ database: memos
+ username: memos
+ password: changeme
+ rootPassword: changeme
+ primary:
+ persistence:
+ enabled: false
+ # storageClass: ""
+ # size: 8Gi