diff --git a/charts/keep/Chart.yaml b/charts/keep/Chart.yaml index 8409506..9de1944 100644 --- a/charts/keep/Chart.yaml +++ b/charts/keep/Chart.yaml @@ -1,10 +1,10 @@ apiVersion: v2 name: keep -version: 0.1.29 +version: 0.1.30 description: Keep Helm Chart type: application icon: https://platform.keephq.dev/_next/image?url=%2Fkeep.png&w=48&q=75 -appVersion: 0.27.4 +appVersion: 0.27.5 deprecated: false annotations: app: keep diff --git a/charts/keep/templates/_helpers.tpl b/charts/keep/templates/_helpers.tpl index b108951..6fa0edb 100644 --- a/charts/keep/templates/_helpers.tpl +++ b/charts/keep/templates/_helpers.tpl @@ -110,7 +110,7 @@ Helper function for PUSHER_HOST {{- end -}} {{/* -Helper function for API_URL for the frontend +Helper function for API_URL_CLIENT for the frontend */}} {{- define "keep.apiUrlClient" -}} {{- $apiUrlClient := include "keep.findEnvVar" (list "API_URL_CLIENT" .) -}} @@ -121,6 +121,18 @@ Helper function for API_URL for the frontend {{- end -}} {{- end -}} +{{/* +Helper function for API_URL +*/}} +{{- define "keep.apiUrl" -}} +{{- $apiUrl := include "keep.findEnvVar" (list "API_URL" .) -}} +{{- if $apiUrl -}} + {{- $apiUrl -}} +{{- else -}} + {{- printf "http://%s-backend:%v" (include "keep.fullname" .) (.Values.backend.service.port) -}} +{{- end -}} +{{- end -}} + {{/* Expand the namespace of the release. */}} @@ -166,7 +178,7 @@ Helper function for NEXTAUTH_URL {{/* Helper function for KEEP_API_URL that handles both relative and absolute URLs */}} -{{- define "keep.apiUrl" -}} +{{- define "keep.keepApiUrl" -}} {{- $apiUrlClient := include "keep.apiUrlClient" . -}} {{- /* Check if the URL starts with http:// or https:// */ -}} {{- if or (hasPrefix "http://" $apiUrlClient) (hasPrefix "https://" $apiUrlClient) -}} diff --git a/charts/keep/templates/backend.yaml b/charts/keep/templates/backend.yaml index 8b03192..847925e 100644 --- a/charts/keep/templates/backend.yaml +++ b/charts/keep/templates/backend.yaml @@ -49,7 +49,7 @@ spec: protocol: TCP env: - name: KEEP_API_URL - value: {{ include "keep.apiUrl" . | quote }} + value: {{ include "keep.keepApiUrl" . | quote }} {{- range .Values.backend.env }} - name: {{ .name }} {{- if .secretKeyRef }} diff --git a/charts/keep/templates/frontend.yaml b/charts/keep/templates/frontend.yaml index 00fa9df..ce97ccc 100644 --- a/charts/keep/templates/frontend.yaml +++ b/charts/keep/templates/frontend.yaml @@ -46,12 +46,15 @@ spec: value: {{ include "keep.pusherHost" . | quote }} - name: API_URL_CLIENT value: {{ include "keep.apiUrlClient" . | quote }} + - name: API_URL + value: {{ include "keep.apiUrl" . | quote }} - name: NEXTAUTH_URL value: {{ include "keep.nextAuthUrl" . | quote }} {{- range .Values.frontend.env }} {{- if and (ne .name "PUSHER_HOST") (ne .name "API_URL_CLIENT") + (ne .name "API_URL") (ne .name "NEXTAUTH_URL") }} - name: {{ .name }} value: {{ .value | quote }} diff --git a/charts/keep/values.yaml b/charts/keep/values.yaml index 71874cc..5ea7db5 100644 --- a/charts/keep/values.yaml +++ b/charts/keep/values.yaml @@ -8,23 +8,27 @@ fullnameOverride: "" isGKE: false global: - # this section controls the ingress resource and - # not the ingress-nginx controller - # see the ingress-nginx section below for the - # controller configuration + # this section controls the ingress resource at nginx-ingress.yaml ingress: enabled: true className: "nginx" annotations: {} + # this is the prefix for the websocket route + # so the full url will be /websocket websocketPrefix: "/websocket" # can't use /api since its "catched" by the nextjs frontend e.g # . /api/auth/signin or /api/config backendPrefix: "/v2" + # this is the prefix for the frontend route + # so the full url will be / frontendPrefix: "/" + # to set the ingress host hosts: [] # uncomment when you want to use a custom domain # hosts: # - host: keep.example.com + + # this is the list of TLS certificates to use tls: [] # uncomment when you want to use a custom domain with TLS # tls: