From 8bdb9edab82c673eef49f82a1f97d661615154bc Mon Sep 17 00:00:00 2001 From: Roman Perekhod <2403905@gmail.com> Date: Mon, 26 Feb 2024 15:49:29 +0100 Subject: [PATCH] added conditional running of the SSE service --- charts/ocis/docs/values.adoc.yaml | 2 +- charts/ocis/templates/sse/deployment.yaml | 2 ++ charts/ocis/templates/sse/hpa.yaml | 2 ++ charts/ocis/templates/sse/pdb.yaml | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/ocis/docs/values.adoc.yaml b/charts/ocis/docs/values.adoc.yaml index 2b0a26d51..af5ce0def 100644 --- a/charts/ocis/docs/values.adoc.yaml +++ b/charts/ocis/docs/values.adoc.yaml @@ -186,6 +186,7 @@ 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" + # -- Disables server-sent events (sse). When disabled, clients will no longer receive sse notifications. disableSse: false @@ -2328,4 +2329,3 @@ monitoring: interval: 60s # -- Scrape timeout. scrapeTimeout: 60s - diff --git a/charts/ocis/templates/sse/deployment.yaml b/charts/ocis/templates/sse/deployment.yaml index 5a1bb7dbd..6ff294344 100644 --- a/charts/ocis/templates/sse/deployment.yaml +++ b/charts/ocis/templates/sse/deployment.yaml @@ -1,3 +1,4 @@ +{{ if not .Values.features.disableSse }} {{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSSE" "appNameSuffix" "") -}} apiVersion: apps/v1 kind: Deployment @@ -89,3 +90,4 @@ spec: {{ else }} emptyDir: {} {{ end }} +{{ end }} diff --git a/charts/ocis/templates/sse/hpa.yaml b/charts/ocis/templates/sse/hpa.yaml index 58b58daea..6df45b1e9 100644 --- a/charts/ocis/templates/sse/hpa.yaml +++ b/charts/ocis/templates/sse/hpa.yaml @@ -1,3 +1,5 @@ +{{ if not .Values.features.disableSse }} {{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSSE" "appNameSuffix" "") -}} {{- $_ := set . "autoscaling" (default (default (dict) .Values.autoscaling) .Values.services.sse.autoscaling) -}} {{ include "ocis.hpa" . }} +{{ end }} diff --git a/charts/ocis/templates/sse/pdb.yaml b/charts/ocis/templates/sse/pdb.yaml index 8c108c828..bd33abfb7 100644 --- a/charts/ocis/templates/sse/pdb.yaml +++ b/charts/ocis/templates/sse/pdb.yaml @@ -1,2 +1,4 @@ +{{ if not .Values.features.disableSse }} {{- include "ocis.basicServiceTemplates" (dict "scope" . "appName" "appNameSSE" "appNameSuffix" "") -}} {{ include "ocis.pdb" . }} +{{ end }}