Skip to content

Commit 4650c24

Browse files
authored
feat(chart): use infisical (huggingface#1276)
1 parent 2ebc77f commit 4650c24

File tree

6 files changed

+39
-42
lines changed

6 files changed

+39
-42
lines changed

chart/env/prod.yaml

+2-13
Original file line numberDiff line numberDiff line change
@@ -347,20 +347,9 @@ envVars:
347347
WEBSEARCH_BLOCKLIST: '["youtube.com", "twitter.com"]'
348348
XFF_DEPTH: '2'
349349

350-
externalSecrets:
350+
infisical:
351351
enabled: true
352-
secretStoreName: "chat-ui-prod-secretstore"
353-
secretName: "chat-ui-prod-secrets"
354-
parameters:
355-
MONGODB_URL: "hub-prod-chat-ui-mongodb-url"
356-
OPENID_CONFIG: "hub-prod-chat-ui-openid-config"
357-
SERPER_API_KEY: "hub-prod-chat-ui-serper-api-key"
358-
HF_TOKEN: "hub-prod-chat-ui-hf-token"
359-
WEBHOOK_URL_REPORT_ASSISTANT: "hub-prod-chat-ui-webhook-report-assistant"
360-
ADMIN_API_SECRET: "hub-prod-chat-ui-admin-api-secret"
361-
USAGE_LIMITS: "hub-prod-chat-ui-usage-limits"
362-
MESSAGES_BEFORE_LOGIN: "hub-prod-chat-ui-messages-before-login"
363-
IP_TOKEN_SECRET: "hub-prod-chat-ui-ip-token-secret"
352+
env: "prod-us-east-1"
364353

365354
autoscaling:
366355
enabled: true

chart/templates/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ spec:
6161
envFrom:
6262
- configMapRef:
6363
name: {{ include "name" . }}
64-
{{- if $.Values.externalSecrets.enabled }}
64+
{{- if $.Values.infisical.enabled }}
6565
- secretRef:
66-
name: {{ $.Values.externalSecrets.secretName }}
66+
name: {{ include "name" $ }}-infisical-secret
6767
{{- end }}
6868
{{- with $.Values.extraEnvFrom }}
6969
{{- toYaml . | nindent 14 }}

chart/templates/infisical.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- if .Values.infisical.enabled }}
2+
apiVersion: secrets.infisical.com/v1alpha1
3+
kind: InfisicalSecret
4+
metadata:
5+
name: {{ include "name" $ }}-infisical-secret
6+
namespace: {{ $.Release.Namespace }}
7+
spec:
8+
authentication:
9+
universalAuth:
10+
credentialsRef:
11+
secretName: {{ .Values.infisical.operatorSecretName | quote }}
12+
secretNamespace: {{ .Values.infisical.operatorSecretNamespace | quote }}
13+
secretsScope:
14+
envSlug: {{ .Values.infisical.env | quote }}
15+
projectSlug: {{ .Values.infisical.project | quote }}
16+
secretsPath: /
17+
hostAPI: {{ .Values.infisical.url | quote }}
18+
managedSecretReference:
19+
creationPolicy: Owner
20+
secretName: {{ include "name" $ }}-secs
21+
secretNamespace: {{ .Release.Namespace | quote }}
22+
secretType: Opaque
23+
resyncInterval: {{ .Values.infisical.resyncInterval }}
24+
{{- end }}

chart/templates/secrets.yaml

-21
This file was deleted.

chart/values.yaml

+10-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,17 @@ nodeSelector: {}
3838
tolerations: []
3939

4040
envVars: { }
41-
externalSecrets:
41+
42+
infisical:
4243
enabled: false
43-
secretStoreName: ""
44-
secretName: ""
45-
parameters: { }
46-
# Allow to environment injections on top or instead of externalSecrets
44+
env: ""
45+
project: "huggingchat-v2-a1"
46+
url: ""
47+
resyncInterval: 60
48+
operatorSecretName: "huggingchat-operator-secrets"
49+
operatorSecretNamespace: "hub-utils"
50+
51+
# Allow to environment injections on top or instead of infisical
4752
extraEnvFrom: []
4853
extraEnv: []
4954

docs/source/installation/helm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ resources:
2929

3030
envVars:
3131
MONGODB_URL: mongodb://chat-ui-mongo:27017
32-
# Ensure that your values.yaml will not leak anywhere or use externalSecrets instead
32+
# Ensure that your values.yaml will not leak anywhere
3333
# PRs welcome for a chart rework with envFrom support!
3434
HF_TOKEN: secret_token
3535
```

0 commit comments

Comments
 (0)