Skip to content

Commit 9e6ed7a

Browse files
committed
chore(ai-worker): added more basic configuration options to the ai-worker deployment
Signed-off-by: Daniel Hendricken <[email protected]>
1 parent 3c08ff1 commit 9e6ed7a

File tree

4 files changed

+51
-23
lines changed

4 files changed

+51
-23
lines changed

charts/nextcloud/Chart.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,21 @@ maintainers:
2626
url: https://wrenix.eu
2727
- name: jessebot
2828
url: https://jessebot.work
29-
dependencies:
30-
- name: postgresql
31-
version: 15.5.0
32-
repository: oci://registry-1.docker.io/bitnamicharts
33-
condition: postgresql.enabled
34-
- name: mariadb
35-
version: 18.2.0
36-
repository: oci://registry-1.docker.io/bitnamicharts
37-
condition: mariadb.enabled
38-
- name: redis
39-
version: 19.6.4
40-
repository: oci://registry-1.docker.io/bitnamicharts
41-
condition: redis.enabled
42-
- name: collabora-online
43-
version: 1.1.20
44-
repository: https://collaboraonline.github.io/online
45-
condition: collabora.enabled
46-
alias: collabora
29+
# dependencies:
30+
# - name: postgresql
31+
# version: 15.5.0
32+
# repository: oci://registry-1.docker.io/bitnamicharts
33+
# condition: postgresql.enabled
34+
# - name: mariadb
35+
# version: 18.2.0
36+
# repository: oci://registry-1.docker.io/bitnamicharts
37+
# condition: mariadb.enabled
38+
# - name: redis
39+
# version: 19.6.4
40+
# repository: oci://registry-1.docker.io/bitnamicharts
41+
# condition: redis.enabled
42+
# - name: collabora-online
43+
# version: 1.1.20
44+
# repository: https://collaboraonline.github.io/online
45+
# condition: collabora.enabled
46+
# alias: collabora

charts/nextcloud/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -770,11 +770,21 @@ We provide a deployment that filters and prioritizes background jobs for AI task
770770

771771
Check out the [official Nextcloud backup docs](https://docs.nextcloud.com/server/latest/admin_manual/ai/overview.html#improve-ai-task-pickup-speed) for more information.
772772

773-
| Parameter | Description | Default |
774-
|------------------------|----------------------------------------------------------------------------------------|-------------------|
775-
| `aiWorker.enabled` | Start the ai-worker deployment | false |
776-
| `aiWorker.replicaCount`| Number of ai-worker pod replicas to deploy | 1 |
777-
| `aiWorker.useHostName` | Set to `true` to use the host defined in nextcloud.host and `false` to use the service | false |
773+
| Parameter | Description | Default |
774+
|----------------------------------|----------------------------------------------------------------------------------------|-------------------|
775+
| `aiWorker.enabled` | Start the ai-worker deployment | `false` |
776+
| `aiWorker.replicaCount` | Number of ai-worker pod replicas to deploy | `1` |
777+
| `aiWorker.useHostName` | Set to `true` to use the host defined in nextcloud.host and `false` to use the service | `false` |
778+
| `aiWorker.resources` | ai-worker resources | `{}` |
779+
| `aiWorker.securityContext` | Optional security context for the ai-worker container | `{}` |
780+
| `aiWorker.podSecurityContext` | Optional security context for the ai-worker container | `{}` |
781+
| `aiWorker.affinity` | ai-worker pod affinity | `{}` |
782+
| `aiWorker.tolerations` | ai-worker pod tolerations | `[]` |
783+
| `aiWorker.deploymentAnnotations` | ai-worker deployment annotations | `{}` |
784+
| `aiWorker.deploymentLabels` | ai-worker deployment labels | `{}` |
785+
| `aiWorker.podAnnotations` | ai-worker pod annotations | `{}` |
786+
| `aiWorker.podLabels` | ai-worker pod labels | `{}` |
787+
778788

779789
# Backups
780790
Check out the [official Nextcloud backup docs](https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html). For your files, if you're using persistent volumes, and you'd like to back up to s3 backed storage (such as minio), consider using [k8up](https://github.com/k8up-io/k8up) or [velero](https://github.com/vmware-tanzu/velero).

charts/nextcloud/templates/nextcloud-ai-worker.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ spec:
3939
spec:
4040
affinity:
4141
{{- toYaml .Values.aiWorker.affinity | nindent 8 }}
42+
{{- with .Values.tolerations }}
43+
tolerations:
44+
{{- toYaml . | nindent 8 }}
45+
{{- end }}
4246
securityContext:
4347
{{- toYaml .Values.aiWorker.securityContext | nindent 8 }}
48+
podSecurityContext:
49+
{{- toYaml .Values.aiWorker.podSecurityContext | nindent 8 }}
4450
initContainers:
4551
- name: wait-for-service
4652
image: alpine/curl
@@ -60,6 +66,8 @@ spec:
6066
- "-c"
6167
- |-
6268
set -e; while true; do php occ background-job:worker -v -t 60 "OC\TaskProcessing\SynchronousBackgroundJob"; done
69+
resources:
70+
{{- toYaml .Values.aiWorker.resources | nindent 12 }}
6371
volumeMounts:
6472
{{- include "aiWorker.volumeMounts" . | trim | nindent 12 }}
6573
volumes:

charts/nextcloud/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,10 @@ aiWorker:
699699
# runAsNonRoot: true
700700
# readOnlyRootFilesystem: true
701701

702+
# Set podSecurityContext parameters. For example, you may need to define fsGroup directive
703+
podSecurityContext: {}
704+
# fsGroup: 33
705+
702706
# Set affinity parameters. For example, you may need to define a podAffinity when using a storageClass that doesn't support ReadWriteMany
703707
affinity: {}
704708
# podAffinity:
@@ -708,9 +712,15 @@ aiWorker:
708712
# app: nextcloud
709713
# topologyKey: "kubernetes.io/hostname"
710714

715+
# Set tolerations parameters. For example, you may need to define a toleration for a specific node taint
716+
tolerations: []
717+
711718
# Set to true to use the hostname to check nextcloud for readiness
712719
useHostName: true
713720

721+
# ai-worker resources
722+
resources: {}
723+
714724

715725
deploymentAnnotations: {}
716726
deploymentLabels: {}

0 commit comments

Comments
 (0)