Skip to content

Commit

Permalink
fix(notify_push): improve after review
Browse files Browse the repository at this point in the history
Co-authored-by: Kate <[email protected]>
Signed-off-by: WrenIX <[email protected]>
  • Loading branch information
wrenix and provokateurin committed Jan 4, 2025
1 parent 9f3e65a commit 57b3806
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 11 deletions.
6 changes: 3 additions & 3 deletions charts/nextcloud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changelog

This Helm-Chart use semantic-releases, so only major version contains breaking changes.
This Helm-Chart increase there major version on every breaking change (or major version of Nextcloud itself) inspired by semantic releases.

Here we list, what is changed.
Here we list all major versions and their breaking changes for migration.


## v7

- move `metrics.serviceMonitor` to `prometheus.serviceMonitor`: It us used for nextcloud-exporter and notify-push
- move `metrics.serviceMonitor` to `prometheus.serviceMonitor`: It is used for nextcloud-exporter and notify-push
33 changes: 33 additions & 0 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ helm install my-release nextcloud/nextcloud
* [Headers set on NGINX](#headers-set-on-nginx)
* [Probes Configurations](#probes-configurations)
* [Collabora Configuration](#collabora-configuration)
* [Notify Push](#notify-push)
* [Imaginary](#imaginary)
* [Cron jobs](#cron-jobs)
* [Using the nextcloud docker image auto-configuration via env vars](#using-the-nextcloud-docker-image-auto-configuration-via-env-vars)
Expand Down Expand Up @@ -500,6 +501,38 @@ The nextcloud deployment includes a series of different probes you can use to de
> [!Note]
> If you are getting errors on initialization (such as `Fatal error: require_once(): Failed opening required '/var/www/html/lib/versioncheck.php'`, but you can get other errors as well), a good first step is to try and enable the startupProbe and/or increase the `initialDelaySeconds` for the `livenessProbe` and `readinessProbe` to something much greater (consider using `120` seconds instead of `10`. This is an especially good idea if your cluster is running on older hardware, has a slow internet connection, or you're using a slower storage class, such as NFS that's running with older disks or a slow connection.

### Notify Push

We include an optional Client Push [nextcloud/notify_push](https://github.com/nextcloud/notify_push).


| Parameter | Description | Default |
|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|------------------------|
| `notifyPush.enabled` | Enable another deployment to handle notify_push (sometimes called ClientPush) | `false` |
| `notifyPush.autoSetup` | Setup notify_push on nextcloud per docker-entrypoint-hooks before start | `false` |
| `notifyPush.replicaCount` | Number of notify-push pod replicas to deploy | `1` |
| `notifyPush.image.registry` | notify-push image registry | `docker.io` |
| `notifyPush.image.repository` | notify-push image name | `miles170/notify_push` |
| `notifyPush.image.tag` | notify-push image tag | `v0.7.0` |
| `notifyPush.image.pullPolicy` | notify-push image pull policy | `IfNotPresent` |
| `notifyPush.image.pullSecrets` | notify-push image pull secrets | `[]` |
| `notifyPush.redisURLEnv` | option to set the redis_url per env (if a external redis is used) e.g.: `value: ""` or `valueFrom: {secretKeyRef:{name:"",key:""}}` | `""` |
| `notifyPush.podAnnotations` | Additional annotations for notify-push pods | `{}` |
| `notifyPush.podLabels` | Additional labels for notify-push pods | `{}` |
| `notifyPush.podSecurityContext` | Optional security context for the notify-push pod | `nil` |
| `notifyPush.securityContext` | Optional security context for the notify-push container | `nil` |
| `notifyPush.resources` | notify-push resources | `{}` |
| `notifyPush.service.type` | notify-push: Kubernetes Service type | `ClusterIP` |
| `notifyPush.service.loadBalancerIP` | Use serviceLoadBalancerIP to request a specific static IP, otherwise leave blank | `nil` |
| `notifyPush.service.nodePort` | notify-push: NodePort for service type NodePort | `nil` |
| `notifyPush.service.annotations` | Additional annotations for service notify-push | `{}` |
| `notifyPush.service.labels` | Additional labels for service notify-push | `{}` |
| `notifyPush.ingress.path` | Add path in default ingress to notify_push service | `/push` |
| `notifyPush.ingress.pathType` | PathType for additional path in default ingress for notify-push path | `Prefix` |

> [!Note]
> notify-push needs an redis (redis.enabled=true or notifyPush.redisURLEnv={...})

### Collabora Configuration

This section provides options to enable and configure the Collabora Online server within your deployment. Please ensure to review the [Collabora Online Helm chart documentation](https://github.com/CollaboraOnline/online/tree/master/kubernetes/helm/collabora-online) for additional details and recommended values.
Expand Down
4 changes: 2 additions & 2 deletions charts/nextcloud/files/notify_push.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
/var/www/html/occ app:install notify_push
/var/www/html/occ config:app:set notify_push base_endpoint --value="https://{{ .Values.nextcloud.host }}{{ .Values.notifyPush.ingress.path }}"
# /var/www/html/occ notify_push:setup "https://{{ .Values.nextcloud.host }}{{ .Values.notifyPush.ingress.path }}"
/var/www/html/occ config:app:set notify_push base_endpoint --value="http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.nextcloud.host }}{{ .Values.notifyPush.ingress.path }}"
# /var/www/html/occ notify_push:setup "http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.nextcloud.host }}{{ .Values.notifyPush.ingress.path }}"
51 changes: 45 additions & 6 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,38 +694,77 @@ dnsConfig:

# Notify Push (Clientpush)
notifyPush:
# -- enable another deployment to handle notify_push (sometimes called ClientPush)
# -- Enable another deployment to handle notify_push (sometimes called ClientPush)
# @section -- Notify Push (Clientpush)
enabled: false
# -- Setup notify_push on nextcloud per docker-entrypoint-hooks before start
# @section -- Notify Push (Clientpush)
autoSetup: false

# -- Number of notify-push pod replicas to deploy
# @section -- Notify Push (Clientpush)
replicaCount: 1

image:
# -- notify-push image registry
# @section -- Notify Push (Clientpush)
registry: docker.io
# -- image of notify_push (there is no official image yet: https://github.com/nextcloud/notify_push/issues/106)
# -- notify-push image name (there is no official image yet: https://github.com/nextcloud/notify_push/issues/106)
# @section -- Notify Push (Clientpush)
repository: miles170/notify_push
# -- notify-push image tag
# @section -- Notify Push (Clientpush)
tag: v0.7.0
# -- notify-push image pull policy
# @section -- Notify Push (Clientpush)
pullPolicy: IfNotPresent
pullSecrets:
# -- notify-push image pull secrets
# e.g.
# - myRegistrKeySecretName
# @section -- Notify Push (Clientpush)
pullSecrets: []

# -- option to set the redis_url per env (if a external redis is used) e.g.: `value: ""` or `valueFrom: {secretKeyRef:{name:"",key:""}}`
# @section -- Notify Push (Clientpush)
redisURLEnv:

resources: {}

# -- Additional annotations for notify-push pods
# @section -- Notify Push (Clientpush)
podAnnotations: {}
# -- Additional labels for notify-push pods
# @section -- Notify Push (Clientpush)
podLabels: {}
# -- Optional security context for the notify-push pod
# @section -- Notify Push (Clientpush)
podSecurityContext: {}

# -- Optional security context for the notify-push container
# @section -- Notify Push (Clientpush)
securityContext: {}
# -- notify-push resources
# @section -- Notify Push (Clientpush)
resources: {}

service:
# -- notify-push: Kubernetes Service type
# @section -- Notify Push (Clientpush)
type: ClusterIP
# -- Use serviceLoadBalancerIP to request a specific static IP, otherwise leave blank
# @section -- Notify Push (Clientpush)
loadBalancerIP:
# -- Additional annotations for service notify-push
# @section -- Notify Push (Clientpush)
annotations: {}
# -- Additional labels for service notify-push
# @section -- Notify Push (Clientpush)
labels: {}

ingress:
# -- patch default ingress to forward following path to notify_push service
# -- Add path in default ingress to notify_push service
# @section -- Notify Push (Clientpush)
path: /push
# -- PathType for additional path in default ingress for notify-push path
# @section -- Notify Push (Clientpush)
pathType: Prefix

imaginary:
Expand Down

0 comments on commit 57b3806

Please sign in to comment.