mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
PT-2134 - support for PostgreSQL and MySQL operators (#567)
* PT-2134 - Support for PostgreSQL and PS MySQL operators For PS MySQL operator: added support of pt-mysql-summary For PostgreSQL operator: added support for pg_gather Options added: - kubeconfig - path to kubeconfig - forwardport - port to use when calling pt-*-summary tools ad pt_gather Options changed: - resource - now default value is (was pxc). New values added: psql - for PostgreSQL operator ps - for PS MySQL operator if default value () is used: only K8 information is collected Otherwise resource-specific summary is collected * PT-2134_support_for_PostgreSQL_and_MySQL_operators Fixed summary collection when connecting to PostgreSQL opertor and no resource specified * PT-2134 - support for PostgreSQL and MySQL operators Added test case for full supported set of values for option --resource, added --kubeconfig and --forwardport options for test cases, added support for environment variables KUBECONFIG_PXC, KUBECONFIG_PS, KUBECONFIG_PSMDB, KUBECONFIG_PSQL, FORWARDPORT for test cases * PT-2134 - support for PostgreSQL and MySQL operators updated docs/pt-k8s-debug-collector.rst, replaced README.md in src/go/pt-k8s-debug-collector wih symbolic link to docs/pt-k8s-debug-collector.rst to avoid having inconsistent documentation * PT-2134 - support for PostgreSQL and MySQL operators Removed curl STDERR from the command output * PT-2134 - support for PostgreSQL and MySQL operators typo in pt-k8s-debug-collector.rst * PT-2134 - support for PostgreSQL and MySQL operators Renamed --resource=psql to --resource=pg after review suggestion by Ege and collecting feedback from potential users Co-authored-by: EvgeniyPatlan <evgeniy.patlan@percona.com> Co-authored-by: Carlos Salguero <carlos.salguero@percona.com>
This commit is contained in:
@@ -12,17 +12,21 @@ func main() {
|
||||
namespace := ""
|
||||
resource := ""
|
||||
clusterName := ""
|
||||
kubeconfig := ""
|
||||
forwardport := ""
|
||||
|
||||
flag.StringVar(&namespace, "namespace", "", "Namespace for collecting data. If empty data will be collected from all namespaces")
|
||||
flag.StringVar(&resource, "resource", "pxc", "Resource name. Default value - 'pxc'")
|
||||
flag.StringVar(&resource, "resource", "none", "Collect data, specific to the resource. Supported values: pxc, psmdb, pg, ps, none")
|
||||
flag.StringVar(&clusterName, "cluster", "", "Cluster name")
|
||||
flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to kubeconfig")
|
||||
flag.StringVar(&forwardport, "forwardport", "", "Port to use for port forwarding")
|
||||
flag.Parse()
|
||||
|
||||
if len(clusterName) > 0 {
|
||||
resource += "/" + clusterName
|
||||
}
|
||||
|
||||
d := dumper.New("", namespace, resource)
|
||||
d := dumper.New("", namespace, resource, kubeconfig, forwardport)
|
||||
log.Println("Start collecting cluster data")
|
||||
|
||||
err := d.DumpCluster()
|
||||
|
Reference in New Issue
Block a user