Skip to content

Commit 24c5e7d

Browse files
authored
Merge pull request #48 from small-hack/add-mariadb-option
Add mariadb option
2 parents 472a9f0 + 2e0455e commit 24c5e7d

File tree

6 files changed

+72
-16
lines changed

6 files changed

+72
-16
lines changed

charts/pixelfed/Chart.lock

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@ dependencies:
55
- name: valkey
66
repository: oci://registry-1.docker.io/bitnamicharts
77
version: 2.2.3
8-
digest: sha256:ca16c63a3650650ff09c9555a4f62fb6a2d54ce588ad9a87c531c685090a1138
9-
generated: "2025-01-23T21:44:17.516108504Z"
8+
- name: mariadb
9+
repository: oci://registry-1.docker.io/bitnamicharts
10+
version: 20.2.2
11+
digest: sha256:ab9c547cea93017a3a65f289e1573ee936a6925d3762200bb24d6e5dc512003c
12+
generated: "2025-01-23T22:50:42.4566+01:00"

charts/pixelfed/Chart.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.17.1
18+
version: 0.18.0
1919

2020
# This is the version number of the application being deployed.
2121
# renovate:image=ghcr.io/mattlqx/docker-pixelfed
@@ -36,3 +36,8 @@ dependencies:
3636
version: 2.2.3
3737
repository: oci://registry-1.docker.io/bitnamicharts
3838
condition: valkey.enabled
39+
40+
- name: mariadb
41+
version: 20.2.2
42+
repository: oci://registry-1.docker.io/bitnamicharts
43+
condition: mariadb.enabled

charts/pixelfed/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pixelfed
22

3-
![Version: 0.17.1](https://img.shields.io/badge/Version-0.17.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.4-nginx](https://img.shields.io/badge/AppVersion-v0.12.4--nginx-informational?style=flat-square)
3+
![Version: 0.18.0](https://img.shields.io/badge/Version-0.18.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.12.4-nginx](https://img.shields.io/badge/AppVersion-v0.12.4--nginx-informational?style=flat-square)
44

55
A Helm chart for deploying Pixelfed on Kubernetes
66

@@ -14,6 +14,7 @@ A Helm chart for deploying Pixelfed on Kubernetes
1414

1515
| Repository | Name | Version |
1616
|------------|------|---------|
17+
| oci://registry-1.docker.io/bitnamicharts | mariadb | 20.2.2 |
1718
| oci://registry-1.docker.io/bitnamicharts | postgresql | 16.4.5 |
1819
| oci://registry-1.docker.io/bitnamicharts | valkey | 2.2.3 |
1920

@@ -68,6 +69,13 @@ A Helm chart for deploying Pixelfed on Kubernetes
6869
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
6970
| ingress.tls | list | `[]` | |
7071
| livenessProbe | object | `{}` | This is to setup the liveness probe more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
72+
| mariadb.auth.database | string | `"pixelfed"` | Name for a custom database to create |
73+
| mariadb.auth.existingSecret | string | `"new-password-secret"` | Use existing secret for password details (auth.rootPassword, auth.password, auth.replicationPassword will be ignored and picked up from this secret). The secret has to contain the keys mariadb-root-password, mariadb-replication-password and mariadb-password |
74+
| mariadb.auth.password | string | `"newUserPassword123"` | Password for the new user. Ignored if existing secret is provided |
75+
| mariadb.auth.replicationPassword | string | `"newReplicationPassword123"` | MariaDB replication user password. Ignored if existing secret is provided |
76+
| mariadb.auth.rootPassword | string | `"newRootPassword123"` | Password for the root user. Ignored if existing secret is provided. |
77+
| mariadb.auth.username | string | `"pixelfed"` | Name for a custom user to create |
78+
| mariadb.enabled | bool | `false` | enable mariadb subchart - currently experimental for this chart read more about the values: https://github.com/bitnami/charts/tree/main/bitnami/mariadb |
7179
| nameOverride | string | `""` | This is to override the chart name. |
7280
| nodeSelector | object | `{}` | put the pixelfed pod on a specific node/nodegroup |
7381
| phpConfigs | object | `{}` | PHP Configuration files Will be injected in /usr/local/etc/php-fpm.d |
61.4 KB
Binary file not shown.

charts/pixelfed/templates/configmap_env.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ data:
129129
DB_USERNAME: postgres
130130
DB_DATABASE: postgres
131131
{{- end }}
132+
{{- if .Values.mariadb.enabled }}
133+
DB_PORT: {{ .Values.mariadb.primary.service.ports.mysql | quote }}
134+
DB_HOST: {{ .Values.mariadb.fullnameOverride }}
135+
DB_USERNAME: {{ .Values.mariadb.auth.username }}
136+
DB_DATABASE: {{ .Values.mariadb.auth.database }}
137+
{{- end }}
132138

133139
# valkey (redis)
134140
{{- if .Values.valkey.enabled }}

charts/pixelfed/values.yaml

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
# This is a YAML-formatted file.
33
# Declare variables to be passed into your templates.
44

5-
# -- This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
5+
# -- This will set the replicaset count more information can be found here:
6+
# https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
67
replicaCount: 1
78

8-
# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
9+
# This sets the container image more information can be found here:
10+
# https://kubernetes.io/docs/concepts/containers/images/
911
image:
1012
registry: ghcr.io
1113
# -- you can see the source [ghcr.io/mattlqx/docker-pixelfed](https://ghcr.io/mattlqx/docker-pixelfed)
@@ -17,7 +19,9 @@ image:
1719
# so please either pin a sha tag or use dev-nging as the tag)
1820
tag: "7d1d62c8552683225456c2a552ba8ca36afb24b32f706e425310de5bf84aeab1"
1921

20-
# -- This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
22+
# -- This is for the secretes for pulling an image from a private repository
23+
# more information can be found here:
24+
# https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
2125
imagePullSecrets: []
2226

2327
# -- This is to override the chart name.
@@ -35,7 +39,8 @@ extraEnv: []
3539
# -- template out extra environment variables e.g. from ConfigMaps or Secrets
3640
extraEnvFrom: []
3741

38-
# This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/
42+
# This section builds out the service account more information can be found here:
43+
# https://kubernetes.io/docs/concepts/security/service-accounts/
3944
serviceAccount:
4045
# -- Specifies whether a service account should be created
4146
create: true
@@ -48,11 +53,13 @@ serviceAccount:
4853
name: ""
4954

5055
# -- This is for setting Kubernetes Annotations to a Pod.
51-
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
56+
# For more information checkout:
57+
# https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
5258
podAnnotations: {}
5359

5460
# -- This is for setting Kubernetes Labels to a Pod.
55-
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
61+
# For more information checkout:
62+
# https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
5663
podLabels: {}
5764

5865
# securityContext for the whole pixelfed pod
@@ -74,11 +81,14 @@ securityContext:
7481
# drop:
7582
# - ALL
7683

77-
# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
84+
# This is for setting up a service more information can be found here:
85+
# https://kubernetes.io/docs/concepts/services-networking/service/
7886
service:
79-
# -- This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
87+
# -- This sets the service type more information can be found here:
88+
# https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
8089
type: ClusterIP
81-
# -- This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
90+
# -- This sets the ports more information can be found here:
91+
# https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
8292
port: 80
8393
# -- Port to attach to on the pods. Also sets what port nginx listens on inside the container.
8494
targetPort: 8080
@@ -112,21 +122,24 @@ resources: {}
112122
# memory: 128Mi
113123

114124
# -- This is to setup the liveness probe
115-
# more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
125+
# more information can be found here:
126+
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
116127
livenessProbe: {}
117128
# httpGet:
118129
# path: /api/service/health-check
119130
# port: http
120131

121132
# -- This is to setup the readiness probe
122-
# more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
133+
# more information can be found here:
134+
# https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
123135
readinessProbe: {}
124136
# httpGet:
125137
# path: /api/service/health-check
126138
# port: http
127139

128140
autoscaling:
129-
# -- enable autoscaling. more information can be found [here](https://kubernetes.io/docs/concepts/workloads/autoscaling/)
141+
# -- enable autoscaling. more information can be found
142+
# [here](https://kubernetes.io/docs/concepts/workloads/autoscaling/)
130143
enabled: false
131144
# -- minimum replicas to always keep up
132145
minReplicas: 1
@@ -587,3 +600,24 @@ pixelfed:
587600
access_key_id: ""
588601
# -- key in existing Kubernetes Secret for secret_access_key. If set, ignores s3.secret_access_key
589602
secret_access_key: ""
603+
604+
mariadb:
605+
# -- enable mariadb subchart - currently experimental for this chart
606+
# read more about the values: https://github.com/bitnami/charts/tree/main/bitnami/mariadb
607+
enabled: false
608+
auth:
609+
# -- Name for a custom database to create
610+
database: "pixelfed"
611+
# -- Name for a custom user to create
612+
username: "pixelfed"
613+
# -- Password for the root user. Ignored if existing secret is provided.
614+
rootPassword: "newRootPassword123"
615+
# -- Password for the new user. Ignored if existing secret is provided
616+
password: "newUserPassword123"
617+
# -- MariaDB replication user password. Ignored if existing secret is provided
618+
replicationPassword: "newReplicationPassword123"
619+
# -- Use existing secret for password details (auth.rootPassword,
620+
# auth.password, auth.replicationPassword will be ignored and picked up
621+
# from this secret). The secret has to contain the keys mariadb-root-password,
622+
# mariadb-replication-password and mariadb-password
623+
existingSecret: new-password-secret

0 commit comments

Comments
 (0)