Skip to content

Commit f21332a

Browse files
fix: handle nil ai.openai.api_key to prevent template er… (#116)
* fix(intel-chart): handle nil ai.openai.api_key to prevent template errors Adjusted the Helm chart template for ai-secrets to avoid referencing ai.openai.api_key and ai.external.api_key when undefined. This fixes a fatal error during `helm template` when AI mode is set to `bundled` and no OpenAI config is present. Ensures compatibility with bundled-only deployments. * Changes to fix workflow issues
1 parent 56d5eee commit f21332a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

charts/intel/templates/secrets.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@ metadata:
44
name: ai-secrets
55
type: Opaque
66
data:
7+
{{- if .Values.ai.openai }}
8+
{{- if .Values.ai.openai.api_key }}
79
openai-api-key: {{ .Values.ai.openai.api_key | b64enc }}
10+
{{- end }}
11+
{{- end }}
12+
{{- if .Values.ai.external }}
13+
{{- if .Values.ai.external.api_key }}
814
external-ai-key: {{ .Values.ai.external.api_key | b64enc }}
15+
{{- end }}
16+
{{- end }}

0 commit comments

Comments
 (0)