cleanup: return error type in ReconcilePersistentVolume.getCredentials()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-08 14:21:56 +01:00 committed by mergify[bot]
parent a7a928d7ec
commit 37471c7a5f

View File

@ -92,7 +92,7 @@ func (r *ReconcilePersistentVolume) getCredentials(name, namespace string) (*uti
secret := &corev1.Secret{} secret := &corev1.Secret{}
err := r.client.Get(context.TODO(), types.NamespacedName{Name: name, Namespace: namespace}, secret) err := r.client.Get(context.TODO(), types.NamespacedName{Name: name, Namespace: namespace}, secret)
if err != nil { if err != nil {
return nil, fmt.Errorf("error getting secret %s in namespace %s: %v", name, namespace, err) return nil, fmt.Errorf("error getting secret %s in namespace %s: %w", name, namespace, err)
} }
credentials := map[string]string{} credentials := map[string]string{}