Try using ids

This commit is contained in:
Nikolai Rodionov 2024-05-02 13:15:55 +02:00
parent d6095a2361
commit 01cf7f04cc
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD

View File

@ -232,7 +232,6 @@ func (env *Environemnt) ListEnvs(ctx context.Context) ([]*Environemnt, error) {
}
result := []*Environemnt{}
log.Println(configmaps)
for _, cm := range configmaps.Items {
i := &Environemnt{}
data := &EnvironemntData{
@ -263,7 +262,7 @@ func (env *Environemnt) Get(ctx context.Context) error {
if err != nil {
return err
}
envData, err := clientset.CoreV1().ConfigMaps(env.UserID).Get(ctx, env.Data.Name, metav1.GetOptions{})
envData, err := clientset.CoreV1().ConfigMaps(env.UserID).Get(ctx, env.Data.UUID, metav1.GetOptions{})
if err != nil {
return err
}