From 18936f7803f55dd6f8b97a27ff837467aec3cd9e Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Mon, 15 Apr 2024 17:12:52 +0200 Subject: [PATCH] Try using a clientset --- internal/controllers/environments.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/controllers/environments.go b/internal/controllers/environments.go index b14ba3d..aa64aa3 100644 --- a/internal/controllers/environments.go +++ b/internal/controllers/environments.go @@ -154,8 +154,7 @@ func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) { if err != nil { return []string{}, err } - //secrets, err := clientset.CoreV1().Secrets(env.UserID).List(ctx, metav1.ListOptions{LabelSelector: "kind=environment"}) - secrets, err := clientset.CoreV1().Secrets(env.UserID).List(ctx, metav1.ListOptions{}) + secrets, err := clientset.CoreV1().ConfigMaps(env.UserID).List(ctx, metav1.ListOptions{LabelSelector: "kind=environment"}) if err != nil { return []string{}, err }