Skip to content

Commit

Permalink
fix(notify_push): improve after review - change notifyPush.redisURLEn…
Browse files Browse the repository at this point in the history
…v to notifyPush.extraEnv

Signed-off-by: WrenIX <[email protected]>
  • Loading branch information
wrenix committed Jan 24, 2025
1 parent af879f0 commit f07a3ff
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 33 deletions.
48 changes: 24 additions & 24 deletions charts/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,32 +506,32 @@ The nextcloud deployment includes a series of different probes you can use to de
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` |
| 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.extraEnv` | option additional env (if a external redis is used, you need to set REDIS_URL) | `""` |
| `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={...})
> notify-push needs an redis (`redis.enabled=true` or `notifyPush.extraEnv=[{name:"REDIS_URL",...}]` )

### Collabora Configuration

Expand Down
11 changes: 4 additions & 7 deletions charts/nextcloud/templates/notify_push/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,14 @@ spec:
- name: METRICS_PORT
value: "9867"
{{- include "nextcloud.env.database" . | nindent 12 }}
{{- with .Values.notifyPush.redisURLEnv }}
- name: "REDIS_URL"
{{- toYaml . | nindent 14 }}
{{- else }}
{{- if not .Values.redis.enabled }}
{{- fail "notify-push needs an redis (redis.enabled=true or notifyPush.redisURLEnv={...})" }}
{{- end }}
{{- if .Values.redis.enabled }}
{{- include "nextcloud.env.redis" . | nindent 12 }}
{{- end }}
- name: NEXTCLOUD_URL # deployment.namespace.svc.cluster.local
value: "http{{ if .Values.notifyPush.https }}s{{ end }}://{{ template "nextcloud.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}"
{{- with .Values.notifyPush.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 7867
Expand Down
4 changes: 2 additions & 2 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,9 @@ notifyPush:
# @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:""}}`
# -- option additional env (if a external redis is used, you need to set REDIS_URL)
# @section -- Notify Push (Clientpush)
redisURLEnv:
extraEnv: []

# -- Additional annotations for notify-push pods
# @section -- Notify Push (Clientpush)
Expand Down

0 comments on commit f07a3ff

Please sign in to comment.