Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ Uses @mattlqx's [docker image](https://ghcr.io/mattlqx/docker-pixelfed) which is

- includes bitnami subcharts for [valkey](https://github.com/bitnami/charts/blob/main/bitnami/valkey/README.md#parameters) (redis) and [postgresql](https://github.com/bitnami/charts/blob/main/bitnami/postgresql/README.md#parameters) (database)
- but you can also bring your own valkey, redis, or postgresql database
- we're also looking for anyone who wants to test the mariadb subchart
- helm parameter (values.yaml) docs autogenerated via [`helm-docs`](https://github.com/norwoodj/helm-docs) in [`README.md`](./charts/pixelfed/README.md)
- use existing Secrets for valkey, postgresql, and mail (smtp)
- RenovateBot keeps the subcharts and docker image up to date
- configurable liveness and readiness probes (or none at all)
- configure tolerations, affinity, nodeselectors
- configure persistence with a PVC we create, or bring your own
- use extra volumes, volumemounts, containers, initContainers

## TLDR
Expand Down
2 changes: 1 addition & 1 deletion charts/pixelfed/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.18.0
version: 0.19.0

# This is the version number of the application being deployed.
# renovate:image=ghcr.io/mattlqx/docker-pixelfed
Expand Down
7 changes: 6 additions & 1 deletion charts/pixelfed/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pixelfed

![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)
![Version: 0.19.0](https://img.shields.io/badge/Version-0.19.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)

A Helm chart for deploying Pixelfed on Kubernetes

Expand Down Expand Up @@ -78,6 +78,11 @@ A Helm chart for deploying Pixelfed on Kubernetes
| 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 |
| nameOverride | string | `""` | This is to override the chart name. |
| nodeSelector | object | `{}` | put the pixelfed pod on a specific node/nodegroup |
| persistence.accessModes | list | `["ReadWriteOnce"]` | accessMode |
| persistence.enabled | bool | `false` | enable persistence for the pixelfed pod |
| persistence.existingClaim | string | `""` | using an existing PVC instead of creating one with this chart |
| persistence.storage | string | `"2Gi"` | size of the persistent volume claim to create. Tgnored if persistence.existingClaim is set |
| persistence.storageClassName | string | `""` | storage class name |
| phpConfigs | object | `{}` | PHP Configuration files Will be injected in /usr/local/etc/php-fpm.d |
| pixelfed.account_deletion | bool | `true` | Enable account deletion (may be a requirement in some jurisdictions) |
| pixelfed.activity_pub.enabled | bool | `false` | enable ActivityPub |
Expand Down
17 changes: 15 additions & 2 deletions charts/pixelfed/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}

{{- if or .Values.extraVolumeMounts .Values.phpConfigs }}
{{- if or .Values.extraVolumeMounts .Values.phpConfigs .Values.persistence.enabled }}
volumeMounts:
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
Expand All @@ -269,13 +269,26 @@ spec:
mountPath: {{ print "/usr/local/etc/php-fpm.d/%s" $key | quote }}
subPath: {{ $key }}
{{- end }}
{{- if .Values.persistence.enabled }}
- name: storage
mountPath: /var/www/storage
{{- end }}
{{- end }}{{/* end volumeMounts */}}

{{- if or .Values.phpConfigs .Values.extraVolumes }}
{{- if or .Values.phpConfigs .Values.extraVolumes .Values.persistence.enabled }}
volumes:
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.persistence.enabled }}
- name: storage
persistentVolumeClaim:
{{- if .Values.persistence.existingClaim }}
claimName: {{ .Values.persistence.existingClaim }}
{{- else }}
claimName: {{ include "pixelfed.fullname" . }}
{{- end }}
{{- end }}
{{- if .Values.phpConfigs }}
- name: phpconfig
configMap:
Expand Down
14 changes: 14 additions & 0 deletions charts/pixelfed/templates/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim ) }}
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "pixelfed.fullname" . }}
spec:
storageClassName: {{ .Values.persistence.storageClassName }}
accessModes:
{{- toYaml .Values.persistence.accessModes | indent 4 }}
resources:
requests:
storage: {{ .Values.persistence.storage }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/pixelfed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,19 @@ phpConfigs: {}
# pm.min_spare_servers = 100
# pm.max_spare_servers = 280

persistence:
# -- enable persistence for the pixelfed pod
enabled: false
# -- storage class name
storageClassName: ""
# -- size of the persistent volume claim to create. Tgnored if persistence.existingClaim is set
storage: 2Gi
# -- accessMode
accessModes:
- ReadWriteOnce
# -- using an existing PVC instead of creating one with this chart
existingClaim: ""

pixelfed:
db:
# -- options: sqlite mysql pgsql sqlsrv
Expand Down
Loading