mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 07:30:02 +00:00
Additonally accomodated the review comments on PR : https://github.com/percona/percona-toolkit/pull/764, further simplified the code to remove the extra CASE switch
This commit is contained in:
@@ -422,14 +422,14 @@ func (d *Dumper) getPodSummary(resource, podName, crName string, namespace strin
|
||||
ports = port + ":3306"
|
||||
summCmdName = "pt-mysql-summary"
|
||||
summCmdArgs = []string{"--host=127.0.0.1", "--port=" + port, "--user=root", "--password='" + string(pass) + "'"}
|
||||
case "pg":
|
||||
case "pg","pgv2":
|
||||
var kubeconfig string=""
|
||||
if d.kubeconfig != "" {
|
||||
kubeconfig=" --kubeconfig=" + d.kubeconfig
|
||||
}
|
||||
summCmdName = "sh"
|
||||
summCmdArgs = []string{"-c", "curl https://raw.githubusercontent.com/percona/support-snippets/master/postgresql/pg_gather/gather.sql | " +
|
||||
d.cmd + " -n "+ namespace + " exec -i "+ podName +" -- psql -X -f - "}
|
||||
case "pgv2":
|
||||
summCmdName = "sh"
|
||||
summCmdArgs = []string{"-c", "curl https://raw.githubusercontent.com/percona/support-snippets/master/postgresql/pg_gather/gather.sql | " +
|
||||
d.cmd + " -n "+ namespace +" exec -i "+ podName +" -- psql -X -f - "}
|
||||
summCmdArgs = []string{"-c", "curl https://raw.githubusercontent.com/percona/support-snippets/master/postgresql/pg_gather/gather.sql 2>/dev/null | " +
|
||||
d.cmd + kubeconfig + " -n "+ namespace + " exec -i "+ podName +" -- psql -X -f - "}
|
||||
case "psmdb":
|
||||
var port string
|
||||
if d.forwardport != "" {
|
||||
|
Reference in New Issue
Block a user