Skip to content

Commit

Permalink
fix: missed secret
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolik committed Feb 11, 2025
1 parent e02d87f commit d97207e
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 d97207e

Please sign in to comment.