Skip to content

feat(nextcloud): add notify_push support - #581

Open
wrenix wants to merge 2 commits into
nextcloud:mainfrom
wrenix:feat/notify_push
Open

feat(nextcloud): add notify_push support#581
wrenix wants to merge 2 commits into
nextcloud:mainfrom
wrenix:feat/notify_push

Conversation

@wrenix

@wrenixwrenix commented Jun 9, 2024

Copy link
Copy Markdown
Collaborator

Pull Request

Description of the change

Not yet tested

Benefits

  • support notify_push
  • improve ServiceMonitor (to collect data from nextcloud-exporter and notify_push)

Possible drawbacks

Applicable issues

Additional information

Checklist

TODO

  • redis password from existing secret (or URL)
  • put redis password from env to secrets
  • solve bootstrap problem (nextcloud and notify_push needs to be online)
  • option to set urlEnv on notifyPush (for external redis)

Todo after Review:

@wrenix
wrenixforce-pushed the feat/notify_push branch 2 times, most recently from 4c3cee5 to 46eb0e9CompareJune 9, 2024 22:57
@wrenixwrenix mentioned this pull request Jun 9, 2024
3 tasks
@wrenix
wrenixforce-pushed the feat/notify_push branch 3 times, most recently from f5f716e to 6ed673aCompareJune 9, 2024 23:19
@AndreKoepke

Copy link
Copy Markdown

Can we ensure that the notify_push-plugin is installed? Maybe something like this?

lifecycle:
postStart:
exec:
command: ["occ", "app:install notify_push"]

And we have to active that plugin by running sudo -u www-data ./occ notify_push:setup https://NEXTCLOUD_HOST/push. Maybe we should add a little script like this (pseudocode):

if (!notify_push installed)
install notify_push
/occ notify_push:setup https://NEXTCLOUD_HOST/push

@provokateurin

Copy link
Copy Markdown
Member

I think it makes sense to give this option so the installation and setup is completely automatic, but I'd rather put it behind a second config flag:

notify_push:
enabled: trueautomatic_setup: true

Maybe some people don't want to have this done automatically, so it's nice to give them the option.

@wrenix

wrenix commented Jun 14, 2024

Copy link
Copy Markdown
CollaboratorAuthor

Therefore we has that hook of the container script (see #525), i write a ConfigMap for it.

PS: the same way, then in #480 (@provokateurin you wanted to take a look there ...)

PSS: Does somebody test this/my code?

@AndreKoepke

AndreKoepke commented Jun 17, 2024

Copy link
Copy Markdown
andre@server:~/k8s/nextcloud$ helm upgrade -n nextcloud akops-nextcloud -f values.yml ./helm/charts/nextcloud/Error: UPGRADE FAILED: template: nextcloud/templates/notify_push/deployment.yaml:41:31: executing "nextcloud/templates/notify_push/deployment.yaml" at <$.Values.global.image.registry>: nil pointer evaluating interface {}.image

@AndreKoepkeAndreKoepke left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I remove the global-references, then I got this error:

andre@server:~/k8s/nextcloud$ helm upgrade -n nextcloud akops-nextcloud -f values.yml ./helm/charts/nextcloud/Error: UPGRADE FAILED: YAML parse error on nextcloud/templates/notify_push/deployment.yaml: error converting YAML to JSON: yaml: line 41: did not find expected key

Comment threadcharts/nextcloud/templates/notify_push/deployment.yaml Outdated
Comment threadcharts/nextcloud/templates/notify_push/deployment.yaml Outdated
@wrenix

Copy link
Copy Markdown
CollaboratorAuthor

Oh sorry, that was a copy-paste error.
normally i has on my helm-charts a global.image part to overwrite for registry and so on.

Comment threadcharts/nextcloud/templates/notify_push/deployment.yaml Outdated
@AndreKoepke

AndreKoepke commented Jun 18, 2024

Copy link
Copy Markdown

I was able to try an install. The result was this:

ConfiguringRedis as session handler
=>Searching for scripts (*.sh) to run, located in the folder:/docker-entrypoint-hooks.d/before-starting
==>Running the script (cwd:/var/www/html):"/docker-entrypoint-hooks.d/before-starting/notify_push.sh"
notify_push already installed
✓ redis is configured
🗴 push server is not receiving redis messages (received 272721789, got 0)
==>Failed at executing "/docker-entrypoint-hooks.d/before-starting/notify_push.sh".Exit code:1

Edit

I have a password for redis and it was not set. Can add this like this?

 - name: REDIS_URLvalue: "redis://:<PASSWORD>@{{ template "nextcloud.redis.fullname" . }}-master:{{ .Values.redis.master.service.ports.redis }}"

When I did this locally, then we have the chicken-egg-problem ...
The notify_push application needs a running nextcloud-instance to fully start. And the nextcloud-instance need a running notify_push.

Maybe there is a better hook after nextcloud has started?

Comment threadcharts/nextcloud/templates/notify_push/deployment.yaml
@AndreKoepke

Copy link
Copy Markdown

With the fixed port, I still unable to run it.

Logs from notify_push pod:

[2024-06-19 06:44:36.746890 +00:00] ERROR [notify_push] src/main.rs:78: Self test failed: Error while communicating with nextcloud instance: error sending request for url (http://akops-nextcloud.nextcloud.svc.cluster.local:8080/index.php/apps/notify_push/test/version): error trying to connect: tcp connect error: Connection refused (os error 111)

@jessebot

Copy link
Copy Markdown
Collaborator

@wrenix I'm updated your push file to be .tpl instead of .gotmpl to match the rest of the tpl files. I may also pop in here and write a quick test so this gets tested in CI?

Comment thread.github/workflows/lint-test.yaml Outdated
Comment threadcharts/nextcloud/templates/notify_push/deployment.yaml
@wrenix
wrenixforce-pushed the feat/notify_push branch 6 times, most recently from 43ba133 to fc97749CompareNovember 27, 2024 21:01
@wrenix
wrenixforce-pushed the feat/notify_push branch 9 times, most recently from 98d1ac1 to 9f12fdbCompareJanuary 28, 2025 14:36
@wrenix
wrenix marked this pull request as ready for review February 20, 2025 08:32
@wrenix

Copy link
Copy Markdown
CollaboratorAuthor

move the test developing to #697

@wrenixwrenix mentioned this pull request Feb 26, 2025
2 tasks
@wrenixwrenix added the 3. to review Waiting for reviews label Mar 6, 2025
@wrenix
wrenixforce-pushed the feat/notify_push branch 2 times, most recently from 01746cf to 21021f0CompareOctober 8, 2025 18:32
@wrenix
wrenixforce-pushed the feat/notify_push branch 3 times, most recently from e0481da to e87e507CompareNovember 22, 2025 12:10
@wrenix
wrenixforce-pushed the feat/notify_push branch 2 times, most recently from 62c7b33 to a1e156dCompareJanuary 21, 2026 17:33
@wrenixwrenix mentioned this pull request Mar 8, 2026
wrenix added 2 commits July 26, 2026 21:24
Signed-off-by: WrenIX <dev.github@wrenix.eu>
Signed-off-by: WrenIX <dev.github@wrenix.eu>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] High Performance File Backend

5 participants

@wrenix@AndreKoepke@provokateurin@jessebot@Sn3akyF0x