QueryInInstancePod executes a query in an instance pod, by connecting to the pod and the postgres container, and using a local connection with the postgres user
( ctx context.Context, crudClient client.Client, kubeInterface kubernetes.Interface, restConfig *rest.Config, podLocator PodLocator, dbname DatabaseName, query string, )
| 101 | // QueryInInstancePod executes a query in an instance pod, by connecting to the pod |
| 102 | // and the postgres container, and using a local connection with the postgres user |
| 103 | func QueryInInstancePod( |
| 104 | ctx context.Context, |
| 105 | crudClient client.Client, |
| 106 | kubeInterface kubernetes.Interface, |
| 107 | restConfig *rest.Config, |
| 108 | podLocator PodLocator, |
| 109 | dbname DatabaseName, |
| 110 | query string, |
| 111 | ) (string, string, error) { |
| 112 | timeout := time.Second * 10 |
| 113 | return QueryInInstancePodWithTimeout(ctx, crudClient, kubeInterface, restConfig, podLocator, dbname, query, timeout) |
| 114 | } |
| 115 | |
| 116 | // QueryInInstancePodWithTimeout executes a query in an instance pod, by connecting to the pod |
| 117 | // and the postgres container, and using a local connection with the postgres user |