parent
a53d507d4b
commit
e952ee40c1
@ -72,12 +72,10 @@ func (acc *Account) Create(ctx context.Context) error {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: acc.Data.Username,
|
||||
Namespace: "softplayer-accounts",
|
||||
Labels: map[string]string{
|
||||
"softplayer.net/email": acc.Data.Email,
|
||||
"softplayer.net/uuid": acc.Data.UUID,
|
||||
},
|
||||
},
|
||||
StringData: map[string]string{
|
||||
"uuid": acc.Data.UUID,
|
||||
"email": acc.Data.Email,
|
||||
"password": passwordHash,
|
||||
},
|
||||
}
|
||||
@ -189,7 +187,7 @@ func (acc *Account) Login(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
acc.Data.UUID = string(sec.ObjectMeta.Labels["uuid"])
|
||||
acc.Data.UUID = string(sec.Data["uuid"])
|
||||
tokenName := fmt.Sprintf("sa-%s", acc.Data.UUID)
|
||||
saSec := &corev1.Secret{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
@ -26,7 +26,6 @@ type Environemnt struct {
|
||||
|
||||
type EnvironemntData struct {
|
||||
Name string
|
||||
FmtName string
|
||||
Description string
|
||||
Provider string
|
||||
Kubernetes string
|
||||
@ -40,14 +39,12 @@ SP_PROVIDER=%s
|
||||
SP_KUBERNETES=%s
|
||||
SP_SERVER_TYPE=%s
|
||||
SP_SERVER_LOCATION=%s
|
||||
SP_DESCRIPTION=%s
|
||||
SP_NAME=%s`,
|
||||
SP_DESCRIPTION=%s`,
|
||||
e.Provider,
|
||||
e.Kubernetes,
|
||||
e.ServerType,
|
||||
e.Location,
|
||||
e.Description,
|
||||
e.Name,
|
||||
)
|
||||
|
||||
return vars, nil
|
||||
|
Loading…
Reference in New Issue
Block a user