A stupid thing
This commit is contained in:
parent
80003e41ad
commit
308367dcdf
@ -142,6 +142,7 @@ func (env *Environemnt) Delete(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) {
|
func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) {
|
||||||
|
env.Controller.GetClient()
|
||||||
conf := &rest.Config{
|
conf := &rest.Config{
|
||||||
Host: "https://kubernetes.default.svc.cluster.local:443",
|
Host: "https://kubernetes.default.svc.cluster.local:443",
|
||||||
BearerToken: env.Token,
|
BearerToken: env.Token,
|
||||||
@ -159,7 +160,6 @@ func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) {
|
|||||||
labels := client.MatchingLabels{
|
labels := client.MatchingLabels{
|
||||||
"kind": "environment",
|
"kind": "environment",
|
||||||
}
|
}
|
||||||
|
|
||||||
ns := client.InNamespace(env.UserID)
|
ns := client.InNamespace(env.UserID)
|
||||||
if err := cl.List(ctx, &cms, labels, ns); err != nil {
|
if err := cl.List(ctx, &cms, labels, ns); err != nil {
|
||||||
return []string{}, err
|
return []string{}, err
|
||||||
|
Loading…
Reference in New Issue
Block a user