-
-
Notifications
You must be signed in to change notification settings - Fork 50
feat: simplified helm charts #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -108,10 +108,8 @@ Generate provider API key entries for the Secret stringData. | |||||
| */}} | ||||||
| {{- define "gomodel.providerSecretData" -}} | ||||||
| {{- range $name, $config := .Values.providers }} | ||||||
| {{- if and (kindIs "map" $config) (hasKey $config "enabled") }} | ||||||
| {{- if and $config.enabled $config.apiKey }} | ||||||
| {{- if and (kindIs "map" $config) (hasKey $config "apiKey") $config.apiKey }} | ||||||
|
||||||
| {{ upper $name }}_API_KEY: {{ $config.apiKey | quote }} | ||||||
| {{- end }} | ||||||
| {{- end }} | ||||||
| {{- end }} | ||||||
| {{- end }} | ||||||
|
|
@@ -122,7 +120,7 @@ Generate provider environment variables for the Deployment. | |||||
| {{- define "gomodel.providerEnvVars" -}} | ||||||
| {{- $secretName := include "gomodel.providerSecretName" . -}} | ||||||
| {{- range $name, $config := .Values.providers }} | ||||||
| {{- if and (kindIs "map" $config) (hasKey $config "enabled") $config.enabled }} | ||||||
| {{- if and (kindIs "map" $config) (hasKey $config "apiKey") $config.apiKey }} | ||||||
|
||||||
| {{- if and (kindIs "map" $config) (hasKey $config "apiKey") $config.apiKey }} | |
| {{- if and (kindIs "map" $config) (or (and (hasKey $config "apiKey") $config.apiKey) (and (hasKey $config "enabled") $config.enabled)) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic correctly preserves backward compatibility by checking both enabled flag and apiKey, but it's inconsistent with the template helpers which only check apiKey. This discrepancy means NOTES.txt might show a provider as enabled when it won't actually be configured in the deployment. Consider adding a check for existingSecret as well:
{{- if or .Values.providers.openai.enabled .Values.providers.openai.apiKey .Values.providers.existingSecret }}