Skip to content

Commit

Permalink
chore(ai-worker): added more basic configuration options to the ai-wo…
Browse files Browse the repository at this point in the history
…rker deployment
  • Loading branch information
dhendricken committed Jan 23, 2025
1 parent d23a242 commit 8b45080
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 23 deletions.
36 changes: 18 additions & 18 deletions charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ maintainers:
url: https://wrenix.eu
- name: jessebot
url: https://jessebot.work
dependencies:
- name: postgresql
version: 15.5.0
repository: oci://registry-1.docker.io/bitnamicharts
condition: postgresql.enabled
- name: mariadb
version: 18.2.0
repository: oci://registry-1.docker.io/bitnamicharts
condition: mariadb.enabled
- name: redis
version: 19.6.4
repository: oci://registry-1.docker.io/bitnamicharts
condition: redis.enabled
- name: collabora-online
version: 1.1.20
repository: https://collaboraonline.github.io/online
condition: collabora.enabled
alias: collabora
# dependencies:
# - name: postgresql
# version: 15.5.0
# repository: oci://registry-1.docker.io/bitnamicharts
# condition: postgresql.enabled
# - name: mariadb
# version: 18.2.0
# repository: oci://registry-1.docker.io/bitnamicharts
# condition: mariadb.enabled
# - name: redis
# version: 19.6.4
# repository: oci://registry-1.docker.io/bitnamicharts
# condition: redis.enabled
# - name: collabora-online
# version: 1.1.20
# repository: https://collaboraonline.github.io/online
# condition: collabora.enabled
# alias: collabora
20 changes: 15 additions & 5 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,11 +770,21 @@ We provide a deployment that filters and prioritizes background jobs for AI task

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.

| Parameter | Description | Default |
|------------------------|----------------------------------------------------------------------------------------|-------------------|
| `aiWorker.enabled` | Start the ai-worker deployment | false |
| `aiWorker.replicaCount`| Number of ai-worker pod replicas to deploy | 1 |
| `aiWorker.useHostName` | Set to `true` to use the host defined in nextcloud.host and `false` to use the service | false |
| Parameter | Description | Default |
|----------------------------------|----------------------------------------------------------------------------------------|-------------------|
| `aiWorker.enabled` | Start the ai-worker deployment | `false` |
| `aiWorker.replicaCount` | Number of ai-worker pod replicas to deploy | `1` |
| `aiWorker.useHostName` | Set to `true` to use the host defined in nextcloud.host and `false` to use the service | `false` |
| `aiWorker.resources` | ai-worker resources | `{}` |
| `aiWorker.securityContext` | Optional security context for the ai-worker container | `{}` |
| `aiWorker.podSecurityContext` | Optional security context for the ai-worker container | `{}` |
| `aiWorker.affinity` | ai-worker pod affinity | `{}` |
| `aiWorker.tolerations` | ai-worker pod tolerations | `[]` |
| `aiWorker.deploymentAnnotations` | ai-worker deployment annotations | `{}` |
| `aiWorker.deploymentLabels` | ai-worker deployment labels | `{}` |
| `aiWorker.podAnnotations` | ai-worker pod annotations | `{}` |
| `aiWorker.podLabels` | ai-worker pod labels | `{}` |


# Backups
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).
Expand Down
8 changes: 8 additions & 0 deletions charts/nextcloud/templates/nextcloud-ai-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ spec:
spec:
affinity:
{{- toYaml .Values.aiWorker.affinity | nindent 8 }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.aiWorker.securityContext | nindent 8 }}
podSecurityContext:
{{- toYaml .Values.aiWorker.podSecurityContext | nindent 8 }}
initContainers:
- name: wait-for-service
image: alpine/curl
Expand All @@ -60,6 +66,8 @@ spec:
- "-c"
- |-
set -e; while true; do php occ background-job:worker -v -t 60 "OC\TaskProcessing\SynchronousBackgroundJob"; done
resources:
{{- toYaml .Values.aiWorker.resources | nindent 12 }}
volumeMounts:
{{- include "aiWorker.volumeMounts" . | trim | nindent 12 }}
volumes:
Expand Down
10 changes: 10 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,10 @@ aiWorker:
# runAsNonRoot: true
# readOnlyRootFilesystem: true

# Set podSecurityContext parameters. For example, you may need to define fsGroup directive
podSecurityContext: {}
# fsGroup: 33

# Set affinity parameters. For example, you may need to define a podAffinity when using a storageClass that doesn't support ReadWriteMany
affinity: {}
# podAffinity:
Expand All @@ -708,9 +712,15 @@ aiWorker:
# app: nextcloud
# topologyKey: "kubernetes.io/hostname"

# Set tolerations parameters. For example, you may need to define a toleration for a specific node taint
tolerations: []

# Set to true to use the hostname to check nextcloud for readiness
useHostName: true

# ai-worker resources
resources: {}


deploymentAnnotations: {}
deploymentLabels: {}
Expand Down

0 comments on commit 8b45080

Please sign in to comment.