Skip to content
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

Make it possible to disable SSE #492

Merged
merged 3 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions charts/ocis/docs/values-desc-table.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,12 @@ a| [subs=-attributes]
a| [subs=-attributes]
`3`
| Minimum number of characters to enter before a client should start a search for Share receivers. This setting can be used to customize the user experience if e.g too many results are displayed.
| features.sse.disabled
a| [subs=-attributes]
+bool+
a| [subs=-attributes]
`false`
| Disables SSE. When disabled, clients will no longer receive sse notifications.
| features.virusscan.enabled
a| [subs=-attributes]
+bool+
Expand Down
6 changes: 6 additions & 0 deletions charts/ocis/docs/values.adoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ features:
# -- Reference to a ConfigMap containing images that can be referenced from the html mail template.
# This ConfigMap is optional and can be omitted when images are not used.
htmlMailImagesConfigRef: "html-mail-images"

# SSE (server-sent events) settings.
sse:
# -- Disables SSE. When disabled, clients will no longer receive sse notifications.
disabled: false

# Sharing related settings
sharing:
# Sharing with users related settings
Expand Down
3 changes: 3 additions & 0 deletions charts/ocis/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ spec:
- name: FRONTEND_FULL_TEXT_SEARCH_ENABLED
value: {{ not (eq .Values.services.search.extractor.type "basic") | quote }}

- name: OCIS_DISABLE_SSE
value: {{ .Values.features.sse.disabled | quote }}

# cache
# the stat cache is disabled for now for performance reasons, see https://github.com/owncloud/ocis-charts/issues/214
- name: FRONTEND_OCS_STAT_CACHE_STORE
Expand Down
2 changes: 2 additions & 0 deletions charts/ocis/templates/sse/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if not .Values.features.sse.disabled }}
{{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSSE" "appNameSuffix" "") -}}
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -89,3 +90,4 @@ spec:
{{ else }}
emptyDir: {}
{{ end }}
{{ end }}
2 changes: 2 additions & 0 deletions charts/ocis/templates/sse/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ if not .Values.features.sse.disabled }}
{{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSSE" "appNameSuffix" "") -}}
{{- $_ := set . "autoscaling" (default (default (dict) .Values.autoscaling) .Values.services.sse.autoscaling) -}}
{{ include "ocis.hpa" . }}
{{ end }}
2 changes: 2 additions & 0 deletions charts/ocis/templates/sse/pdb.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
{{ if not .Values.features.sse.disabled }}
{{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSSE" "appNameSuffix" "") -}}
{{ include "ocis.pdb" . }}
{{ end }}
3 changes: 3 additions & 0 deletions charts/ocis/templates/userlog/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ spec:
name: {{ include "secrets.jwtSecret" . }}
key: jwt-secret

- name: OCIS_DISABLE_SSE
value: {{ .Values.features.sse.disabled | quote }}

{{- include "ocis.livenessProbe" . | nindent 10 }}

resources: {{ toYaml .resources | nindent 12 }}
Expand Down
6 changes: 6 additions & 0 deletions charts/ocis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ features:
# -- Reference to a ConfigMap containing images that can be referenced from the html mail template.
# This ConfigMap is optional and can be omitted when images are not used.
htmlMailImagesConfigRef: "html-mail-images"

# SSE (server-sent events) settings.
sse:
# -- Disables SSE. When disabled, clients will no longer receive sse notifications.
disabled: false

# Sharing related settings
sharing:
# Sharing with users related settings
Expand Down