Skip to content

Commit

Permalink
Merge pull request #193 from hyperspike/fix-secret
Browse files Browse the repository at this point in the history
fix: missed secret
  • Loading branch information
dmolik authored Feb 11, 2025
2 parents e02d87f + d97207e commit aa95d80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/controller/valkey_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,10 @@ func (r *ValkeyReconciler) upsertConfigMap(ctx context.Context, valkey *hyperv1.
func (r *ValkeyReconciler) GetPassword(ctx context.Context, valkey *hyperv1.Valkey) (string, error) {
logger := log.FromContext(ctx)

if valkey.Spec.ServicePassword != nil {
return r.getServicePassword(ctx, valkey)
}

secret := &corev1.Secret{}
if err := r.Get(ctx, types.NamespacedName{Namespace: valkey.Namespace, Name: valkey.Name}, secret); err != nil {
logger.Error(err, "failed to get secret")
Expand Down

0 comments on commit aa95d80

Please sign in to comment.