Get gets a cluster given name and namespace
( ctx context.Context, crudClient client.Client, namespace, name string, )
| 124 | |
| 125 | // Get gets a cluster given name and namespace |
| 126 | func Get( |
| 127 | ctx context.Context, |
| 128 | crudClient client.Client, |
| 129 | namespace, name string, |
| 130 | ) (*apiv1.Cluster, error) { |
| 131 | namespacedName := types.NamespacedName{ |
| 132 | Namespace: namespace, |
| 133 | Name: name, |
| 134 | } |
| 135 | cluster := &apiv1.Cluster{} |
| 136 | err := objects.Get(ctx, crudClient, namespacedName, cluster) |
| 137 | if err != nil { |
| 138 | return nil, err |
| 139 | } |
| 140 | return cluster, nil |
| 141 | } |
| 142 | |
| 143 | // ListPods gathers the current list of instance pods for a cluster in a namespace |
| 144 | func ListPods( |