Skip to content

Commit 7845a9a

Browse files
authored
fix: change the gorse.openaiAuthToken definition to include a default empty string so b64dec/b64enc never receives a nil value (#35)
1 parent e909997 commit 7845a9a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

charts/gorse/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ type: application
1616
# This is the chart version. This version number should be incremented each time you make changes
1717
# to the chart and its templates, including the app version.
1818
# Versions are expected to follow Semantic Versioning (https://semver.org/)
19-
version: 0.5.3-rc
19+
version: 0.5.4-rc
2020

2121
# This is the version number of the application being deployed. This version number should be
2222
# incremented each time you make changes to the application. Versions are not expected to
2323
# follow Semantic Versioning. They should reflect the version the application is using.
24-
appVersion: 0.5.3-rc
24+
appVersion: 0.5.4-rc
2525

2626
maintainers:
2727
- name: zhenghaoz

charts/gorse/templates/_helpers.tpl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ Return Gorse API Secret
7979
Return OpenAI Auth Token
8080
*/}}
8181
{{- define "gorse.openaiAuthToken" -}}
82-
{{- if not (empty .Values.gorse.openai.authToken) }}
82+
{{- if not (empty .Values.gorse.openai.authToken) -}}
8383
{{- .Values.gorse.openai.authToken -}}
8484
{{- else -}}
85-
{{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "common.names.fullname" .) "Length" 32 "Key" "openai-auth-token") -}}
85+
{{- $secretValue := include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "common.names.fullname" .) "Length" 32 "Key" "openai-auth-token") -}}
86+
{{- $secretValue | default "" -}}
8687
{{- end -}}
8788
{{- end -}}
8889

0 commit comments

Comments
 (0)