Consolidate controller bootstrap login in run command (#38)

This commit is contained in:
Fedor Korotkov
2023-03-21 15:36:55 -04:00
committed by GitHub
parent 10f56bb5e3
commit 9b5ad09841
7 changed files with 68 additions and 95 deletions
+2 -1
View File
@@ -116,7 +116,8 @@ func (controller *Controller) EnsureServiceAccount(serviceAccount *v1.ServiceAcc
}
if serviceAccount.Token == "" {
serviceAccount.Token = uuid.New().String()
return fmt.Errorf("%w: attempted to create a service account with an empty token",
ErrAdminTaskFailed)
}
serviceAccount.CreatedAt = time.Now()