Skip to content
Open
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: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 6.6.9
version: 6.7.0
# renovate: image=docker.io/library/nextcloud
appVersion: 30.0.6
description: A file sharing server that puts the control and security of your own data back into your hands.
Expand Down
52 changes: 48 additions & 4 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,15 +538,15 @@ We include an optional external preview provider from [h2non/imaginary](https://
|----------------------------------------|-----------------------------------------------------------------------------------------|-------------------|
| `imaginary.enabled` | Start Imaginary | `false` |
| `imaginary.replicaCount` | Number of imaginary pod replicas to deploy | `1` |
| `imaginary.image.registry` | Imaginary image name | `docker.io` |
| `imaginary.image.repository` | Imaginary image name | `h2non/imaginary` |
| `imaginary.image.registry` | Imaginary image registry | `docker.io` |
| `imaginary.image.repository` | Imaginary image repository | `h2non/imaginary` |
| `imaginary.image.tag` | Imaginary image tag | `1.2.4` |
| `imaginary.image.pullPolicy` | Imaginary image pull policy | `IfNotPresent` |
| `imaginary.image.pullSecrets` | Imaginary image pull secrets | `nil` |
| `imaginary.podAnnotations` | Additional annotations for imaginary | `{}` |
| `imaginary.podLabels` | Additional labels for imaginary | `{}` |
| `imaginary.nodeSelector` | Imaginary pod nodeSelector | `{}` |
| `imaginary.tolerations` | Imaginary pod tolerations | `[]` |
| `imaginary.nodeSelector` | Imaginary pod nodeSelector | `{}` |
| `imaginary.tolerations` | Imaginary pod tolerations | `[]` |
| `imaginary.resources` | imaginary resources | `{}` |
| `imaginary.securityContext` | Optional security context for the Imaginary container | `nil` |
| `imaginary.podSecurityContext` | Optional security context for the Imaginary pod (applies to all containers in the pod) | `nil` |
Expand All @@ -568,6 +568,50 @@ imaginary:
enabled: true
```


### Whiteboard

The chart can optionally also deploy the whiteboard backend to use with the [Nextcloud Whiteboard](https://github.com/nextcloud/whiteboard) app.

| Parameter | Description | Default |
| ------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------------- |
| `whiteboard.enabled` | Start Whiteboard | `false` |
| `whiteboard.replicaCount` | Number of whiteboard pod replicas to deploy | `1` |
| `whiteboard.host` | Whiteboard host domain | `whiteboard.kube.home` |
| `whiteboard.https` | Defines if https is used to connect to Whiteboard. Used to configure the whiteboard URL in Nextcloud | `false` |
| `whiteboard.nextcloudUrl` | Nextcloud Server URL to connect Whiteboard to. If not provided, defaults to service name | `""` |
| `whiteboard.nextcloudHttps` | Defines if https is used to connect from Whiteboard to Nextcloud when using the default URL | `false` (uses http) |
| `whiteboard.image.registry` | Whiteboard image registry | `ghcr.io` |
| `whiteboard.image.repository` | Whiteboard image repository | `nextcloud-releases/whiteboard` |
| `whiteboard.image.tag` | Whiteboard image tag | `v1.0.5` |
| `whiteboard.image.pullPolicy` | Whiteboard image pull policy | `IfNotPresent` |
| `whiteboard.image.pullSecrets` | Whiteboard image pull secrets | `nil` |
| `whiteboard.existingSecret.enabled` | Whether to use an existing secret or not | `false` |
| `whiteboard.existingSecret.secretName` | Name of the existing secret | `nil` |
| `whiteboard.existingSecret.jwtSecretKeyKey` | Name of the key that contains the JWT secret key | `nil` |
| `whiteboard.jwtSecretKey` | JWT secret key if no existing secret is used | random value |
| `whiteboard.podAnnotations` | Additional annotations for whiteboard | `{}` |
| `whiteboard.podLabels` | Additional labels for whiteboard | `{}` |
| `whiteboard.nodeSelector` | Whiteboard pod nodeSelector | `{}` |
| `whiteboard.tolerations` | Whiteboard pod tolerations | `[]` |
| `whiteboard.resources` | whiteboard resources | `{}` |
| `whiteboard.securityContext` | Optional security context for the Whiteboard container | `nil` |
| `whiteboard.podSecurityContext` | Optional security context for the Whiteboard pod (applies to all containers in the pod) | `nil` |
| `whiteboard.service.type` | Whiteboard: Kubernetes Service type | `ClusterIP` |
| `whiteboard.service.loadBalancerIP` | Whiteboard: LoadBalancerIp for service type LoadBalancer | `nil` |
| `whiteboard.service.nodePort` | Whiteboard: NodePort for service type NodePort | `nil` |
| `whiteboard.service.annotations` | Additional annotations for service whiteboard | `{}` |
| `whiteboard.service.labels` | Additional labels for service whiteboard | `{}` |
| `whiteboard.ingress.className` | Name of the ingress class to use | `nil` |
| `whiteboard.ingress.enabled` | Enable use of ingress controllers | `false` |
| `whiteboard.ingress.servicePort` | Ingress' backend servicePort | `http` |
| `whiteboard.ingress.annotations` | An array of service annotations | `nil` |
| `whiteboard.ingress.labels` | An array of service labels | `nil` |
| `whiteboard.ingress.path` | The `Path` to use in Ingress' `paths` | `/` |
| `whiteboard.ingress.pathType` | The `PathType` to use in Ingress' `paths` | `Prefix` |
| `whiteboard.ingress.tls` | Ingress TLS configuration | `[]` |


## Cron jobs

To execute [background tasks](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/background_jobs_configuration.html) by using system cron instead of default Ajax cron, set `cronjob.enabled` parameter to `true`. Background jobs are important for tasks that do not necessarily need user intervention, but still need to be executed frequently (cleaning up, sending some notifications, pulling RSS feeds, etc.).
Expand Down
28 changes: 24 additions & 4 deletions charts/nextcloud/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-redis" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified whiteboard app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "nextcloud.whiteboard.fullname" -}}
{{- printf "%s-whiteboard" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
Expand Down Expand Up @@ -216,7 +224,7 @@ Create environment variables used to configure the nextcloud container as well a
name: {{ .Values.nextcloud.existingSecret.secretName | default (include "nextcloud.fullname" .) }}
key: {{ .Values.nextcloud.existingSecret.smtpPasswordKey }}
{{- end }}
{{/*
{{- /*
Redis env vars
*/}}
{{- if .Values.redis.enabled }}
Expand All @@ -237,7 +245,7 @@ Redis env vars
{{- end }}
{{- end }}
{{- end }}{{/* end if redis.enabled */}}
{{/*
{{- /*
S3 as primary object store env vars
*/}}
{{- if .Values.nextcloud.objectStore.s3.enabled }}
Expand Down Expand Up @@ -312,7 +320,7 @@ S3 as primary object store env vars
value: {{ .Values.nextcloud.objectStore.s3.sse_c_key | quote }}
{{- end }}
{{- end }}{{/* end if nextcloud.objectStore.s3.enabled */}}
{{/*
{{- /*
Swift as primary object store env vars
*/}}
{{- if .Values.nextcloud.objectStore.swift.enabled }}
Expand All @@ -336,7 +344,19 @@ Swift as primary object store env vars
value: {{ .Values.nextcloud.objectStore.swift.url | quote }}
- name: OBJECTSTORE_SWIFT_CONTAINER_NAME
value: {{ .Values.nextcloud.objectStore.swift.container | quote }}
{{- end }}{{/* end if nextcloud.objectStore.s3.enabled */}}
{{- end }}{{/* end if nextcloud.objectStore.swift.enabled */}}
{{- /*
Whiteboard env vars
*/}}
{{- if .Values.whiteboard.enabled }}
- name: WHITEBOARD_URL
value: "http{{ if .Values.whiteboard.https }}s{{ end }}://{{ .Values.whiteboard.host }}"
- name: WHITEBOARD_JWT_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.whiteboard.existingSecret.secretName | default (include "nextcloud.whiteboard.fullname" .) }}
key: {{ .Values.whiteboard.existingSecret.jwtSecretKeyKey | default "whiteboard-jwt-secret-key" }}
{{- end }}{{/* end if nextcloud.whiteboard.enabled */}}
{{- if .Values.nextcloud.extraEnv }}
{{ toYaml .Values.nextcloud.extraEnv }}
{{- end }}
Expand Down
12 changes: 12 additions & 0 deletions charts/nextcloud/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ spec:
readOnly: true
{{- end }}
{{- end }}
{{- if .Values.whiteboard.enabled }}
- name: whiteboard-hook
mountPath: /docker-entrypoint-hooks.d/before-starting/configure-whiteboard.sh
subPath: configure-whiteboard.sh
readOnly: true
{{- end }}
{{- if not .Values.nginx.enabled }}
ports:
- name: http
Expand Down Expand Up @@ -367,6 +373,12 @@ spec:
configMap:
name: {{ template "nextcloud.fullname" . }}-nginxconfig
{{- end }}
{{- if .Values.whiteboard.enabled }}
- name: whiteboard-hook
configMap:
name: {{ template "nextcloud.whiteboard.fullname" . }}-hook
defaultMode: 0o755
{{- end }}
{{- if not (values .Values.nextcloud.hooks | compact | empty) }}
- name: nextcloud-hooks
configMap:
Expand Down
109 changes: 109 additions & 0 deletions charts/nextcloud/templates/whiteboard/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
{{- if .Values.whiteboard.enabled }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "nextcloud.whiteboard.fullname" . }}
labels:
{{- include "nextcloud.labels" ( dict "component" "whiteboard" "rootContext" $ ) | nindent 4 }}
spec:
replicas: {{ .Values.whiteboard.replicaCount }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: whiteboard
template:
metadata:
annotations:
{{- toYaml .Values.whiteboard.podAnnotations | nindent 8 }}
labels:
app.kubernetes.io/name: {{ include "nextcloud.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: whiteboard
{{- with .Values.whiteboard.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.whiteboard.image.pullSecrets }}
imagePullSecrets:
{{- range . }}
- name: {{ . }}
{{- end }}
{{- end }}
containers:
- name: whiteboard
{{- with .Values.whiteboard.image }}
image: "{{ .registry }}/{{ .repository }}:{{ .tag }}"
imagePullPolicy: {{ .pullPolicy }}
{{- end }}
env:
{{- if not .Values.whiteboard.nextcloudUrl }}
- name: NEXTCLOUD_URL
value: "http{{ if .Values.whiteboard.nextcloudHttps }}s{{ end }}://{{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}"
{{- else }}
- name: NEXTCLOUD_URL
value: {{ .Values.whiteboard.nextcloudUrl }}
{{- end }}
- name: JWT_SECRET_KEY
valueFrom:
secretKeyRef:
name: {{ .Values.whiteboard.existingSecret.secretName | default (include "nextcloud.whiteboard.fullname" .) }}
key: {{ .Values.whiteboard.existingSecret.jwtSecretKeyKey | default "whiteboard-jwt-secret-key" }}
ports:
- name: http
containerPort: 3002
volumeMounts:
- name: whiteboard-backup
mountPath: /app/backup
{{- with .Values.whiteboard.readinessProbe }}
{{- if .enabled }}
readinessProbe:
httpGet:
path: /health
port: http
scheme: HTTP
failureThreshold: {{ .failureThreshold }}
successThreshold: {{ .successThreshold }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
{{- end }}
{{- with .Values.whiteboard.livenessProbe }}
{{- if .enabled }}
livenessProbe:
httpGet:
path: /health
port: http
scheme: HTTP
failureThreshold: {{ .failureThreshold }}
successThreshold: {{ .successThreshold }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
{{- end }}
{{- with .Values.whiteboard.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.whiteboard.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
volumes:
- name: whiteboard-backup
emptyDir:
size: 500Mi
{{- with .Values.whiteboard.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.whiteboard.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.whiteboard.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/nextcloud/templates/whiteboard/hook-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.whiteboard.enabled }}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "nextcloud.whiteboard.fullname" . }}-hook
labels:
{{- include "nextcloud.labels" ( dict "component" "whiteboard" "rootContext" $ ) | nindent 4 }}
data:
configure-whiteboard.sh: |
#!/bin/sh
echo "Configuring whiteboard..."
./occ config:app:set whiteboard collabBackendUrl --value="${WHITEBOARD_URL}"
./occ config:app:set whiteboard jwt_secret_key --value="${WHITEBOARD_JWT_SECRET_KEY}"
{{- end }}
42 changes: 42 additions & 0 deletions charts/nextcloud/templates/whiteboard/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{- if and .Values.whiteboard.enabled .Values.whiteboard.ingress.enabled }}
---
apiVersion: {{ include "nextcloud.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "nextcloud.whiteboard.fullname" . }}
labels:
{{- include "nextcloud.labels" ( dict "component" "whiteboard" "rootContext" $ ) | nindent 4 }}
{{- with .Values.whiteboard.ingress.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.whiteboard.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.whiteboard.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
rules:
- host: {{ .Values.whiteboard.host }}
http:
paths:
- path: {{ .Values.whiteboard.ingress.path }}
{{- if (eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
pathType: {{ .Values.whiteboard.ingress.pathType }}
{{- end }}
backend:
{{- if (eq (include "nextcloud.ingress.apiVersion" $) "networking.k8s.io/v1") }}
service:
name: {{ template "nextcloud.whiteboard.fullname" . }}
port:
number: {{ .Values.whiteboard.service.port }}
{{- else }}
serviceName: {{ template "nextcloud.whiteboard.fullname" . }}
servicePort: {{ .Values.whiteboard.service.port }}
{{- end }}
{{- with .Values.whiteboard.ingress.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
Loading