From 14099f07d5aa6fefc7c08127ae5d06ec2e0090a3 Mon Sep 17 00:00:00 2001 From: Jacek Wysocki Date: Fri, 8 Nov 2024 11:50:41 +0100 Subject: [PATCH 1/3] feat: pass TK_AI_TOKEN to the frontend --- charts/testkube-cloud-ui/templates/deployment.yaml | 11 +++++++++++ charts/testkube-cloud-ui/values.yaml | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/charts/testkube-cloud-ui/templates/deployment.yaml b/charts/testkube-cloud-ui/templates/deployment.yaml index b29bab456..406e04669 100644 --- a/charts/testkube-cloud-ui/templates/deployment.yaml +++ b/charts/testkube-cloud-ui/templates/deployment.yaml @@ -53,6 +53,17 @@ spec: - name: REACT_APP_AUTH_STRATEGY value: {{ .Values.ui.authStrategy }} {{- end }} + {{- if .Values.global.ai.enabled }} + - name: TK_AI_KEY + {{- if .Values.global.ai.secretRef }} + valueFrom: + secretKeyRef: + name: {{ .Values.global.ai.secretRef }} + key: "TK_AI_KEY" + {{- else }} + value: "{{ .Values.sentry.url }}" + {{- end }} + {{- end }} {{- if .Values.sentry.enabled }} - name: REACT_APP_SENTRY_KEY {{- if .Values.sentry.secretRef }} diff --git a/charts/testkube-cloud-ui/values.yaml b/charts/testkube-cloud-ui/values.yaml index aa5b71185..03d0575b6 100644 --- a/charts/testkube-cloud-ui/values.yaml +++ b/charts/testkube-cloud-ui/values.yaml @@ -31,6 +31,10 @@ global: containerSecurityContext: {} # -- Global security Context for all pods podSecurityContext: {} + ai: + enabled: false + secretRef: testkube-ai + replicaCount: 1 sentry: # -- Toggle whether to enable Sentry.io error reporting From 72006cf8c5fa2405b575f2ffc48432784d2d51bf Mon Sep 17 00:00:00 2001 From: Jacek Wysocki Date: Fri, 8 Nov 2024 11:51:39 +0100 Subject: [PATCH 2/3] fix: rem leftover --- charts/testkube-cloud-ui/templates/deployment.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/testkube-cloud-ui/templates/deployment.yaml b/charts/testkube-cloud-ui/templates/deployment.yaml index 406e04669..6de5c97a5 100644 --- a/charts/testkube-cloud-ui/templates/deployment.yaml +++ b/charts/testkube-cloud-ui/templates/deployment.yaml @@ -60,8 +60,6 @@ spec: secretKeyRef: name: {{ .Values.global.ai.secretRef }} key: "TK_AI_KEY" - {{- else }} - value: "{{ .Values.sentry.url }}" {{- end }} {{- end }} {{- if .Values.sentry.enabled }} From e258fa171af8e473098bd125d7b04e8768bec133 Mon Sep 17 00:00:00 2001 From: Jacek Wysocki Date: Fri, 8 Nov 2024 12:08:17 +0100 Subject: [PATCH 3/3] fix: added note --- charts/testkube-cloud-ui/values.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/charts/testkube-cloud-ui/values.yaml b/charts/testkube-cloud-ui/values.yaml index 03d0575b6..bb741c6cd 100644 --- a/charts/testkube-cloud-ui/values.yaml +++ b/charts/testkube-cloud-ui/values.yaml @@ -31,8 +31,11 @@ global: containerSecurityContext: {} # -- Global security Context for all pods podSecurityContext: {} + # -- Testkube AI service settings (ALPHA - for Kubecon purpose only for now) ai: + # -- Enable Testkube AI keys for frontend enabled: false + # -- Secret name secretRef: testkube-ai replicaCount: 1