(ctx context.Context, allNamespaces bool)
| 108 | } |
| 109 | |
| 110 | func getClusters(ctx context.Context, allNamespaces bool) (apiv1.ClusterList, error) { |
| 111 | var clusterList apiv1.ClusterList |
| 112 | var opts []client.ListOption |
| 113 | if !allNamespaces { |
| 114 | opts = append(opts, client.InNamespace(plugin.Namespace)) |
| 115 | } |
| 116 | err := plugin.Client.List(ctx, &clusterList, opts...) |
| 117 | return clusterList, err |
| 118 | } |
| 119 | |
| 120 | func getCluster(ctx context.Context, clusterName string) (apiv1.ClusterList, error) { |
| 121 | var clusterList apiv1.ClusterList |