CommandInInstancePod executes commands in a given instance pod, in the postgres container
( ctx context.Context, crudClient client.Client, kubeInterface kubernetes.Interface, restConfig *rest.Config, podLocator PodLocator, timeout *time.Duration, command ...string, )
| 78 | // CommandInInstancePod executes commands in a given instance pod, in the |
| 79 | // postgres container |
| 80 | func CommandInInstancePod( |
| 81 | ctx context.Context, |
| 82 | crudClient client.Client, |
| 83 | kubeInterface kubernetes.Interface, |
| 84 | restConfig *rest.Config, |
| 85 | podLocator PodLocator, |
| 86 | timeout *time.Duration, |
| 87 | command ...string, |
| 88 | ) (string, string, error) { |
| 89 | return CommandInContainer( |
| 90 | ctx, crudClient, kubeInterface, restConfig, |
| 91 | ContainerLocator{ |
| 92 | Namespace: podLocator.Namespace, |
| 93 | PodName: podLocator.PodName, |
| 94 | ContainerName: specs.PostgresContainerName, |
| 95 | }, timeout, command...) |
| 96 | } |
| 97 | |
| 98 | // DatabaseName is a special type for the database argument in an Exec call |
| 99 | type DatabaseName string |