Move email and uuid to labels
This commit is contained in:
parent
bdd9206c92
commit
89dbe6120a
@ -72,10 +72,12 @@ 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,
|
||||
},
|
||||
}
|
||||
@ -187,7 +189,7 @@ func (acc *Account) Login(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
acc.Data.UUID = string(sec.Data["uuid"])
|
||||
acc.Data.UUID = string(sec.ObjectMeta.Labels["uuid"])
|
||||
tokenName := fmt.Sprintf("sa-%s", acc.Data.UUID)
|
||||
saSec := &corev1.Secret{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
@ -26,6 +26,7 @@ type Environemnt struct {
|
||||
|
||||
type EnvironemntData struct {
|
||||
Name string
|
||||
FmtName string
|
||||
Description string
|
||||
Provider string
|
||||
Kubernetes string
|
||||
@ -39,12 +40,14 @@ SP_PROVIDER=%s
|
||||
SP_KUBERNETES=%s
|
||||
SP_SERVER_TYPE=%s
|
||||
SP_SERVER_LOCATION=%s
|
||||
SP_DESCRIPTION=%s`,
|
||||
SP_DESCRIPTION=%s
|
||||
SP_NAME=%s`,
|
||||
e.Provider,
|
||||
e.Kubernetes,
|
||||
e.ServerType,
|
||||
e.Location,
|
||||
e.Description,
|
||||
e.Name,
|
||||
)
|
||||
|
||||
return vars, nil
|
||||
|
Loading…
Reference in New Issue
Block a user