From 308367dcdfb52ac081900f871e7a28e370c4459f Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Mon, 15 Apr 2024 16:16:25 +0200 Subject: [PATCH] A stupid thing --- internal/controllers/environments.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/controllers/environments.go b/internal/controllers/environments.go index 8c4a9e0..167fd03 100644 --- a/internal/controllers/environments.go +++ b/internal/controllers/environments.go @@ -142,6 +142,7 @@ func (env *Environemnt) Delete(ctx context.Context) error { } func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) { + env.Controller.GetClient() conf := &rest.Config{ Host: "https://kubernetes.default.svc.cluster.local:443", BearerToken: env.Token, @@ -159,7 +160,6 @@ func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) { labels := client.MatchingLabels{ "kind": "environment", } - ns := client.InNamespace(env.UserID) if err := cl.List(ctx, &cms, labels, ns); err != nil { return []string{}, err