Skip to content

Commit

Permalink
Fix Huggingface default Secret name (#184)
Browse files Browse the repository at this point in the history
Huggingface Secret name should be specific to "huggingface", I think
this was a regression from #133

```bash
(base) ➜  kubeai git:(main) helm template kubeai ./charts/kubeai | grep -A 2 Secret
kind: Secret
metadata:
  name: kubeai # OLD NAME
(base) ➜  kubeai git:(main) git checkout -
Switched to branch 'fix-huggingface-secret-name'
Your branch is up to date with 'origin/fix-huggingface-secret-name'.
(base) ➜  kubeai git:(fix-huggingface-secret-name) helm template kubeai ./charts/kubeai | grep -A 2 Secret
kind: Secret
metadata:
  name: kubeai-huggingface # NEW NAME
```

---------

Co-authored-by: Sam Stoelinga <[email protected]>
  • Loading branch information
nstogner and samos123 authored Sep 6, 2024
1 parent 113de25 commit 2eb15ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/kubeai/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.3.1
version: 0.3.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
6 changes: 5 additions & 1 deletion charts/kubeai/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ Create the name of the huggingface secret to use
*/}}
{{- define "kubeai.huggingfaceSecretName" -}}
{{- if .Values.secrets.huggingface.create -}}
{{- default (include "kubeai.fullname" .) .Values.secrets.huggingface.name }}
{{- if .Values.secrets.huggingface.name -}}
{{- .Values.secrets.huggingface.name -}}
{{- else }}
{{- (include "kubeai.fullname" .)}}-huggingface
{{- end}}
{{- else }}
{{- if not .Values.secrets.huggingface.name -}}
{{ fail "if secrets.huggingface.create is false, secrets.huggingface.name is required" }}
Expand Down

0 comments on commit 2eb15ef

Please sign in to comment.