mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-20 10:55:01 +00:00
PT-1930: pt-k8s-debug-collector should not attempt collecting PXC information when running against PSMDB (#498)
* PT-1930: pt-k8s-debug-collector should not attempt collecting PXC information when running against PSMDB https://jira.percona.com/browse/PT-1930 Removed PXC resources to collect while running with `--resource psmdb` * Add more `psmdb` resources Also resolves https://jira.percona.com/browse/PT-1934 * Add `resourceType` function to collect summaries for PXC/PSMDB when option `--cluster` is specified
This commit is contained in:
@@ -43,10 +43,6 @@ func New(location, namespace, resource string) Dumper {
|
||||
"jobs",
|
||||
"podsecuritypolicies",
|
||||
"poddisruptionbudgets",
|
||||
"perconaxtradbbackups",
|
||||
"perconaxtradbclusterbackups",
|
||||
"perconaxtradbclusterrestores",
|
||||
"perconaxtradbclusters",
|
||||
"clusterrolebindings",
|
||||
"clusterroles",
|
||||
"rolebindings",
|
||||
@@ -57,6 +53,20 @@ func New(location, namespace, resource string) Dumper {
|
||||
}
|
||||
if len(resource) > 0 {
|
||||
resources = append(resources, resource)
|
||||
|
||||
if resourceType(resource) == "pxc" {
|
||||
resources = append(resources,
|
||||
"perconaxtradbbackups",
|
||||
"perconaxtradbclusterbackups",
|
||||
"perconaxtradbclusterrestores",
|
||||
"perconaxtradbclusters")
|
||||
} else if resourceType(resource) == "psmdb" {
|
||||
resources = append(resources,
|
||||
"perconaservermongodbbackups",
|
||||
"perconaservermongodbrestores",
|
||||
"perconaservermongodbs",
|
||||
)
|
||||
}
|
||||
}
|
||||
return Dumper{
|
||||
cmd: "kubectl",
|
||||
|
Reference in New Issue
Block a user