From cfb596e68b0a0071fdc5dd23b33613c71399daa8 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Wed, 22 May 2024 00:16:13 +0200 Subject: [PATCH] Add an API to reset the password --- internal/controllers/accounts.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/internal/controllers/accounts.go b/internal/controllers/accounts.go index 25ce3dd..733f746 100644 --- a/internal/controllers/accounts.go +++ b/internal/controllers/accounts.go @@ -231,20 +231,6 @@ func (acc *Account) ResetPassword(ctx context.Context, emailConfig email.EmailCo acc.Data.UUID = string(userdata.Data["uuid"]) - conf := &rest.Config{ - Host: "https://kubernetes.default.svc.cluster.local:443", - BearerToken: acc.Token, - TLSClientConfig: rest.TLSClientConfig{ - Insecure: true, - }, - } - - clientset, err = kubernetes.NewForConfig(conf) - if err != nil { - logrus.Error(err, "Couldn't create a new clientset") - return "", consts.ErrSystemError - } - secretName := "password-reset-code" number := encodeToString(6) secret := corev1.Secret{