Skip to content

Commit f43acf6

Browse files
committed
add mariadb as an option for installing pixelfed
1 parent 8fad504 commit f43acf6

File tree

4 files changed

+58
-17
lines changed

4 files changed

+58
-17
lines changed

charts/pixelfed/Chart.yaml

Lines changed: 1 addition & 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.16.0
18+
version: 0.17.0
1919

2020
# This is the version number of the application being deployed.
2121
# renovate:image=ghcr.io/mattlqx/docker-pixelfed

charts/pixelfed/README.md

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

3-
![Version: 0.16.0](https://img.shields.io/badge/Version-0.16.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)
3+
![Version: 0.17.0](https://img.shields.io/badge/Version-0.17.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

@@ -69,7 +69,13 @@ A Helm chart for deploying Pixelfed on Kubernetes
6969
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
7070
| ingress.tls | list | `[]` | |
7171
| 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.enabled | bool | `false` | enable mariadb subchart - currently experiemental for this chart read more about the values here: https://github.com/bitnami/charts/tree/main/bitnami/mariadb |
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 |
7379
| nameOverride | string | `""` | This is to override the chart name. |
7480
| nodeSelector | object | `{}` | put the pixelfed pod on a specific node/nodegroup |
7581
| phpConfigs | object | `{}` | PHP Configuration files Will be injected in /usr/local/etc/php-fpm.d |

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: 43 additions & 14 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
@@ -589,6 +602,22 @@ pixelfed:
589602
secret_access_key: ""
590603

591604
mariadb:
592-
# -- enable mariadb subchart - currently experiemental for this chart
593-
# read more about the values here: https://github.com/bitnami/charts/tree/main/bitnami/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
594607
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)