Skip to content

Commit

Permalink
feat(memos): Add mariadb subchart
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Nov 20, 2023
1 parent 6c17b54 commit e663248
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
7 changes: 5 additions & 2 deletions charts/memos/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 7 additions & 3 deletions charts/memos/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions charts/memos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<img src="https://raw.githubusercontent.com/gabe565/charts/main/charts/memos/icon.png" align="right" width="92" alt="memos logo">

![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)

Expand All @@ -11,7 +11,7 @@ A lightweight, self-hosted memo hub. Open Source and Free forever.
**Homepage:** <https://charts.gabe565.com/charts/memos/>

**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

Expand All @@ -26,6 +26,7 @@ Kubernetes: `>=1.22.0-0`
| Repository | Name | Version |
|------------|------|---------|
| <https://bjw-s.github.io/helm-charts> | common | 1.5.1 |
| <https://charts.bitnami.com/bitnami> | mariadb | 14.1.2 |

## Installing the Chart

Expand Down Expand Up @@ -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 |
Expand Down
11 changes: 11 additions & 0 deletions charts/memos/templates/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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) -}}

Expand Down
16 changes: 16 additions & 0 deletions charts/memos/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e663248

Please sign in to comment.