-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding an optional deployment to increase AI pickup speed #688
base: main
Are you sure you want to change the base?
Conversation
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.6.1 to 2.7.0. - [Release notes](https://github.com/helm/chart-testing-action/releases) - [Commits](helm/chart-testing-action@v2.6.1...v2.7.0) --- updated-dependencies: - dependency-name: helm/chart-testing-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Daniel Hendricken <[email protected]>
Signed-off-by: Daniel Hendricken <[email protected]>
Signed-off-by: Daniel Hendricken <[email protected]>
Signed-off-by: Daniel Hendricken <[email protected]>
…rker deployment Signed-off-by: Daniel Hendricken <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In principle this is a good idea, but the entire system is shifting away from being cron based, so I don't know how much sense it makes to add this now.
Co-authored-by: Kate <[email protected]> Signed-off-by: Daniel Hendricken <[email protected]>
Alright no worries, I add these workers per kustomization myself at the moment. Works like a charm. I made the PR because I thought it might increase the ease of use for others that decide to use the assistant. Ah and I forgot to mention that I tested it with both the apache and fpm-alpine images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good first try.
volumeMounts: | ||
{{- include "aiWorker.volumeMounts" . | trim | nindent 12 }} | ||
volumes: | ||
- name: nextcloud-main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should we move that into _helpers.tpl and reuse it with deployment of nextcloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So then we would divide the nextcloud.volumeMounts into for example:
nextcloud.volumeMounts
nextcloud.configMounts
Then include both for the nextcloud deployment and only nextcloud.volumeMounts
for the ai-worker deployment
|
||
|
||
{{/* | ||
Create volume mounts for the nextcloud-aiworker container. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it needed without the defaultConfigs and configs like in nextcloud.volumeMounts
?
I believe we should use the same setup then in the main deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that the required config is written to disk by the main deployment. As the ai-worker deployment is dependent on the main deployment being ready I thought mounting them would be unnecessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all config are written down. The mounted one are read-only in the configmaps / secrets. So I believe you still need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright then I will make the adjustment
…me suffix '-ai-worker' Signed-off-by: Daniel Hendricken <[email protected]> chore(ai-worker): changed componant label to ai-worker and removed name suffix '-ai-worker'
Signed-off-by: Daniel Hendricken <[email protected]>
Signed-off-by: Daniel Hendricken <[email protected]>
Description of the change
The aim of this PR is to add the process described in increasing AI pickup speed in a simple but functional way to the helm-chart.
It functions similarly to the cronjob sidecar by mounting the volumes under nextcloud-main.
Benefits
The deployment is completely optional as it only has relevance to those who want to use the nextcloud-assistant or other AI integrations. Additionally this method allows for scaling by increasing the number of replicas of the deployment. (This is why I decided against using a container withing the main pod).
It makes use of the same image and volumes as the main nextcloud pod, so I don't think it will require additional maintenance unless something about how AI Tasks are handled changes in the future. Maybe we won't even need this anymore who knows :)
Possible drawbacks
None that I can think of.
Applicable issues
I didn't find any open issues concerning this functionality.
Additional information
I created a modified version of the nextcloud.volumeMounts helper template to reduce the required volumes that need to be mounted to the pods as much as possible.
Checklist
Chart.yaml
according to semver.