Try using a clientset
This commit is contained in:
parent
fe1db0fdc3
commit
b39509f874
@ -154,7 +154,10 @@ func (env *Environemnt) ListEnvs(ctx context.Context) ([]string, error) {
|
||||
if err != nil {
|
||||
return []string{}, err
|
||||
}
|
||||
secrets, err := clientset.CoreV1().Secrets("").List(context.TODO(), metav1.ListOptions{LabelSelector: "kind=environment" })
|
||||
secrets, err := clientset.CoreV1().Secrets(env.UserID).List(context.TODO(), metav1.ListOptions{LabelSelector: "kind=environment" })
|
||||
if err != nil {
|
||||
return []string{}, err
|
||||
}
|
||||
|
||||
result := []string{}
|
||||
for _, env := range secrets.Items {
|
||||
|
Loading…
Reference in New Issue
Block a user