feat: add copilot impl (#6230)

fix CLOUD-22
fix CLOUD-24
This commit is contained in:
darkskygit
2024-04-10 11:15:31 +00:00
parent 46a368d7f1
commit e6a576551a
23 changed files with 669 additions and 34 deletions

View File

@@ -0,0 +1,9 @@
{{- if .Values.app.copilot.enabled -}}
apiVersion: v1
kind: Secret
metadata:
name: "{{ .Values.app.copilot.secretName }}"
type: Opaque
data:
openaiSecret: {{ .Values.app.copilot.openai.key | b64enc }}
{{- end }}

View File

@@ -148,6 +148,13 @@ spec:
name: "{{ .Values.app.captcha.secretName }}"
key: turnstileSecret
{{ end }}
{{ if .Values.app.copilot.enabled }}
- name: COPILOT_OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: "{{ .Values.app.copilot.secretName }}"
key: openaiSecret
{{ end }}
{{ if .Values.app.oauth.google.enabled }}
- name: OAUTH_GOOGLE_ENABLED
value: "true"

View File

@@ -24,6 +24,11 @@ app:
secretName: captcha
turnstile:
secret: ''
copilot:
enable: false
secretName: copilot
openai:
key: ''
objectStorage:
r2:
enabled: false