Skip to content

Commit d064a61

Browse files
authored
Merge pull request #48 from Nold360/feat/envsecret
feat: env variables from secrets
2 parents 1fbf70e + 096ae83 commit d064a61

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

charts/local-ai/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ appVersion: 1.40
33
description: A Helm chart for deploying LocalAI to a Kubernetes cluster
44
name: local-ai
55
type: application
6-
version: 3.2.0
6+
version: 3.3.0

charts/local-ai/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ spec:
242242
{{- end }}
243243
- name: MODELS_PATH
244244
value: {{ .Values.deployment.modelsPath }}
245+
{{- if .Values.deployment.secretEnv }}
246+
{{- toYaml .Values.deployment.secretEnv | nindent 12 }}
247+
{{- end}}
245248
volumeMounts:
246249
{{- range $key, $pvc := $rootPersistence}}
247250
{{- if $pvc.enabled }}

charts/local-ai/values.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ deployment:
77
env:
88
threads: 4
99
context_size: 512
10+
11+
# # Inject Secrets into Environment:
12+
# secretEnv:
13+
# - name: HF_TOKEN
14+
# valueFrom:
15+
# secretKeyRef:
16+
# name: some-secret
17+
# key: hf-token
18+
1019
modelsPath: "/models"
1120
download_model:
1221
# To use cloud provided (eg AWS) image, provide it like: 1234356789.dkr.ecr.us-REGION-X.amazonaws.com/busybox

0 commit comments

Comments
 (0)