Skip to content

Commit

Permalink
fix #232 secret token empty validation error (#233)
Browse files Browse the repository at this point in the history
Some users have reported validation issues with a secret that has an
empty string as value.
  • Loading branch information
samos123 committed Sep 22, 2024
1 parent 12f5e4f commit a1ec759
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion charts/kubeai/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{{- if .Values.secrets.huggingface.create -}}
# Only create the secret if the token is not empty.
# See: https://github.com/substratusai/kubeai/issues/232
{{- if and .Values.secrets.huggingface.create (not (empty .Values.secrets.huggingface.token)) -}}
apiVersion: v1
kind: Secret
metadata:
Expand Down
3 changes: 2 additions & 1 deletion internal/modelcontroller/model_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ func (r *ModelReconciler) vLLMPodForModel(m *kubeaiv1.Model, profile ModelConfig
LocalObjectReference: corev1.LocalObjectReference{
Name: r.HuggingfaceSecretName,
},
Key: "token",
Key: "token",
Optional: ptr.To(true),
},
},
},
Expand Down

0 comments on commit a1ec759

Please sign in to comment.