(ctx context.Context)
| 90 | } |
| 91 | |
| 92 | func (cmd *pgBenchRun) getCluster(ctx context.Context) (*apiv1.Cluster, error) { |
| 93 | var cluster apiv1.Cluster |
| 94 | err := plugin.Client.Get( |
| 95 | ctx, |
| 96 | client.ObjectKey{Namespace: plugin.Namespace, Name: cmd.clusterName}, |
| 97 | &cluster) |
| 98 | if err != nil { |
| 99 | return nil, fmt.Errorf("could not get cluster: %v", err) |
| 100 | } |
| 101 | |
| 102 | return &cluster, nil |
| 103 | } |
| 104 | |
| 105 | func (cmd *pgBenchRun) getJobName() string { |
| 106 | if cmd.jobName == "" { |