feat(task): implement single Redis instance deployment for Nextcloud

This commit is contained in:
Janik von Rotz committed 2026-08-04 13:04:11 +02:00
1 parent e4bc3fde84
commit 77fec7a038
4 files changed
+75 -6

No files matched your search

+11
View File
@@ -53,6 +53,10 @@ kubectl create secret generic s3-credentials \
| `nextcloud.persistence.enabled` | Enable persistence using PVC | `true` |
| `nextcloud.phpClientHttpsFix.enabled` | Fix HTTPS protocol detection behind reverse proxy | `true` |
| `nextcloud.internalDatabase.enabled` | Enable or disable the internal SQLite database | `false` |
| `nextcloud.redis.enabled` | Enable or disable the bitnami Redis subchart | `false` |
| `nextcloud.redis.auth.enabled` | Enable or disable Redis authentication | `false` |
| `nextcloud.externalRedis.enabled` | Enable or disable external Redis | `true` |
| `nextcloud.externalRedis.host` | Hostname or service name of the external Redis | `nextcloud-redis` |
| `nextcloud.externalDatabase.enabled` | Enable or disable external database usage | `true` |
| `nextcloud.externalDatabase.type` | Type of external database (e.g., postgresql, mysql) | `postgresql` |
| `nextcloud.externalDatabase.host` | Hostname or service name of the external database | `nextcloud-postgresql-rw` |
@@ -62,6 +66,13 @@ kubectl create secret generic s3-credentials \
| `nextcloud.externalDatabase.existingSecret.usernameKey` | Key in the secret containing the database username | `username` |
| `nextcloud.externalDatabase.existingSecret.passwordKey` | Key in the secret containing the database password | `password` |
### Redis parameters
| Name | Description | Value |
| --------------- | ----------------------- | -------------- |
| `redis.enabled` | Enable or disable Redis | `true` |
| `redis.image` | The image for Redis | `redis:alpine` |
### CloudNativePG parameters
| Name | Description | Value |
+36
View File
@@ -0,0 +1,36 @@
{{- if .Values.redis.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud-redis
labels:
app: nextcloud-redis
spec:
replicas: 1
selector:
matchLabels:
app: nextcloud-redis
template:
metadata:
labels:
app: nextcloud-redis
spec:
containers:
- name: redis
image: {{ .Values.redis.image }}
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: nextcloud-redis
labels:
app: nextcloud-redis
spec:
selector:
app: nextcloud-redis
ports:
- port: 6379
targetPort: 6379
{{- end }}
+18
View File
@@ -37,6 +37,17 @@ nextcloud:
internalDatabase:
## @param nextcloud.internalDatabase.enabled Enable or disable the internal SQLite database
enabled: false
redis:
## @param nextcloud.redis.enabled Enable or disable the bitnami Redis subchart
enabled: false
auth:
## @param nextcloud.redis.auth.enabled Enable or disable Redis authentication
enabled: false
externalRedis:
## @param nextcloud.externalRedis.enabled Enable or disable external Redis
enabled: true
## @param nextcloud.externalRedis.host Hostname or service name of the external Redis
host: nextcloud-redis
externalDatabase:
## @param nextcloud.externalDatabase.enabled Enable or disable external database usage
enabled: true
@@ -56,6 +67,13 @@ nextcloud:
## @param nextcloud.externalDatabase.existingSecret.passwordKey Key in the secret containing the database password
passwordKey: password
## @section Redis parameters
redis:
## @param redis.enabled Enable or disable Redis
enabled: true
## @param redis.image The image for Redis
image: redis:alpine
## @section CloudNativePG parameters
cnpg:
## @param cnpg.enabled Enable or disable CloudNativePG
+10 -6
View File
@@ -1,8 +1,8 @@
---
title: "Nextcloud use Redis"
state: draft
model:
input_tokens:
state: completed
model: moonshotai/Kimi-K2.6
input_tokens: 57.9K
---
# Run 07
@@ -39,6 +39,10 @@ Disable Redis authentication.
## Worklog
@Clanker Add a summary here once the task has been completed.
@Clanker Set frontmatter state to completed and update info about model and token usage.
- Created `nextcloud/templates/deploy-redis.yml` with a single-replica Redis Deployment and Service (`nextcloud-redis`), conditional on `.Values.redis.enabled`.
- Added `redis.enabled: true` and `redis.image: redis:alpine` to `nextcloud/values.yaml`.
- Configured the Nextcloud subchart to use the custom Redis by setting `nextcloud.externalRedis.enabled: true` and `nextcloud.externalRedis.host: nextcloud-redis` in `nextcloud/values.yaml`.
- Disabled the bitnami Redis sub-subchart (`nextcloud.redis.enabled: false`) and set `nextcloud.redis.auth.enabled: false` to prevent `REDIS_URL` from referencing a non-existent password.
- Fixed `values/nextcloud-uri-cloud.exo.mintcloud.ch.yaml` by moving `redis.enabled` and `externalRedis.host` from the incorrect `nextcloud.nextcloud` nesting to the correct `nextcloud` subchart level.
- Verified the final manifest with `./task template-manifest` — the Nextcloud pod receives `REDIS_HOST=nextcloud-redis`, `REDIS_HOST_PORT=6379`, and `REDIS_URL=redis://$(REDIS_HOST):$(REDIS_HOST_PORT)` with no authentication.
- Ran `./task lint` and `./task docs` successfully.