mirror of https://github.com/rancher/dartboard.git
use new util pkg funcs
This commit is contained in:
parent
9db04c8c4d
commit
82f158b2b2
15
go.mod
15
go.mod
|
|
@ -1,6 +1,8 @@
|
|||
module github.com/git-ival/dartboard
|
||||
|
||||
go 1.21
|
||||
go 1.22
|
||||
|
||||
toolchain go1.22.2
|
||||
|
||||
// needed for serve_hostnames.go
|
||||
replace (
|
||||
|
|
@ -14,7 +16,8 @@ replace (
|
|||
github.com/docker/distribution => github.com/docker/distribution v2.8.2+incompatible // rancher-machine requires a replace is set
|
||||
github.com/docker/docker => github.com/docker/docker v20.10.25+incompatible // rancher-machine requires a repalce is set
|
||||
github.com/grafana/grafana-api-golang-client => github.com/git-ival/grafana-api-golang-client v0.26.1-0.20231204163350-5dfef652c1e1
|
||||
github.com/rancher/shepherd => github.com/git-ival/shepherd v0.0.0-20240227052943-bd3174838b73
|
||||
github.com/rancher/shepherd => github.com/git-ival/shepherd v0.0.0-20240412200641-444750a22637
|
||||
helm.sh/helm/v3 => github.com/rancher/helm/v3 v3.12.3-rancher1
|
||||
oras.land/oras-go => oras.land/oras-go v1.2.2 // for docker 20.10.x compatibility
|
||||
)
|
||||
|
||||
|
|
@ -46,13 +49,13 @@ require (
|
|||
github.com/hashicorp/terraform-exec v0.20.0
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/prometheus/common v0.44.0
|
||||
github.com/rancher/rancher/pkg/apis v0.0.0-20230915232223-a9ea4ce4a5ba
|
||||
github.com/rancher/rancher/pkg/apis v0.0.0-20231012231324-73fed4503c08
|
||||
github.com/rancher/shepherd v0.0.0-00010101000000-000000000000
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/stretchr/testify v1.8.4
|
||||
golang.org/x/oauth2 v0.11.0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
helm.sh/helm/v3 v3.12.3
|
||||
helm.sh/helm/v3 v3.9.0
|
||||
k8s.io/klog/v2 v2.100.1
|
||||
sigs.k8s.io/yaml v1.3.0
|
||||
)
|
||||
|
|
@ -194,7 +197,7 @@ require (
|
|||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hc-install v0.6.2 // indirect
|
||||
github.com/hashicorp/terraform-json v0.20.0 // indirect
|
||||
github.com/hashicorp/terraform-json v0.21.0 // indirect
|
||||
github.com/huandu/xstrings v1.4.0 // indirect
|
||||
github.com/imdario/mergo v0.3.16 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
|
|
@ -268,7 +271,7 @@ require (
|
|||
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
|
||||
google.golang.org/grpc v1.57.0 // indirect
|
||||
google.golang.org/grpc v1.58.3 // indirect
|
||||
google.golang.org/protobuf v1.31.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
|
|
|
|||
24
go.sum
24
go.sum
|
|
@ -260,8 +260,8 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.m
|
|||
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
|
||||
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8=
|
||||
github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE=
|
||||
github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ=
|
||||
github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
|
|
@ -300,8 +300,8 @@ github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
|
|||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
|
||||
github.com/git-ival/grafana-api-golang-client v0.26.1-0.20231204163350-5dfef652c1e1 h1:jsHsEMvoyBdZDn7xU0Gw5NUshAyhCANzzJomPcgSkfE=
|
||||
github.com/git-ival/grafana-api-golang-client v0.26.1-0.20231204163350-5dfef652c1e1/go.mod h1:dz/SO7WgVFdBfSCXyWsAGxWjvaoeyJwjHmxMAMKgcys=
|
||||
github.com/git-ival/shepherd v0.0.0-20240227052943-bd3174838b73 h1:REAFWP8yLmjiLF6SgjLgs9NAnUyshm30ikI4oVUTRsc=
|
||||
github.com/git-ival/shepherd v0.0.0-20240227052943-bd3174838b73/go.mod h1:PVGWt4qZBe+UND1lqsgYCwnjwB/gsGO9umk1KAdtnJU=
|
||||
github.com/git-ival/shepherd v0.0.0-20240412200641-444750a22637 h1:dvKb3Kf7JtO12/ExRdUVBVb+kQ7Z4Rku+c39r9wEcME=
|
||||
github.com/git-ival/shepherd v0.0.0-20240412200641-444750a22637/go.mod h1:a9oHR2SIXUWdsrsdTC3X+BMGtayux7u92P2dwPI3hnc=
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
|
|
@ -558,8 +558,8 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p
|
|||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
|
||||
github.com/hashicorp/terraform-exec v0.20.0 h1:DIZnPsqzPGuUnq6cH8jWcPunBfY+C+M8JyYF3vpnuEo=
|
||||
github.com/hashicorp/terraform-exec v0.20.0/go.mod h1:ckKGkJWbsNqFKV1itgMnE0hY9IYf1HoiekpuN0eWoDw=
|
||||
github.com/hashicorp/terraform-json v0.20.0 h1:cJcvn4gIOTi0SD7pIy+xiofV1zFA3hza+6K+fo52IX8=
|
||||
github.com/hashicorp/terraform-json v0.20.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
|
||||
github.com/hashicorp/terraform-json v0.21.0 h1:9NQxbLNqPbEMze+S6+YluEdXgJmhQykRyRNd+zTI05U=
|
||||
github.com/hashicorp/terraform-json v0.21.0/go.mod h1:qdeBs11ovMzo5puhrRibdD6d2Dq6TyE/28JiU4tIQxk=
|
||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||
github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
|
||||
|
|
@ -878,12 +878,14 @@ github.com/rancher/fleet/pkg/apis v0.0.0-20231017140638-93432f288e79 h1:vfrBGudE
|
|||
github.com/rancher/fleet/pkg/apis v0.0.0-20231017140638-93432f288e79/go.mod h1:vqAYcX2NEkVb0AmUlY7luhh1TKIqbE2KRuERCKxW9pE=
|
||||
github.com/rancher/gke-operator v1.2.0 h1:Byd7IYDlg8T6Dk+bqj8QOXOWnTH5+s9pRairBCiTEx0=
|
||||
github.com/rancher/gke-operator v1.2.0/go.mod h1:R6zrDS1ihOe+ai6cqDOT8JOcod7u4gHWdc1hToT6HP4=
|
||||
github.com/rancher/helm/v3 v3.12.3-rancher1 h1:Qz1NbCydcPXPcjRc6PEnmJjjhbiSSJyg/9O6XGMctG8=
|
||||
github.com/rancher/helm/v3 v3.12.3-rancher1/go.mod h1:KPKQiX9IP5HX7o5YnnhViMnNuKiL/lJBVQ47GHe1R0k=
|
||||
github.com/rancher/lasso v0.0.0-20230830164424-d684fdeb6f29 h1:+kige/h8/LnzWgPjB5NUIHz/pWiW/lFpqcTUkN5uulY=
|
||||
github.com/rancher/lasso v0.0.0-20230830164424-d684fdeb6f29/go.mod h1:kgk9kJVMj9FIrrXU0iyM6u/9Je4bEjPImqswkTVaKsQ=
|
||||
github.com/rancher/norman v0.0.0-20230831160711-5de27f66385d h1:Ft/iTH91TlE2oBGmpkdO4I8o8cvUmCnytdwu52a/tN4=
|
||||
github.com/rancher/norman v0.0.0-20230831160711-5de27f66385d/go.mod h1:Sm2Xqai+aecgmJ86ygyEe+TdPMLkauEpykSstBAu4Ko=
|
||||
github.com/rancher/rancher/pkg/apis v0.0.0-20230915232223-a9ea4ce4a5ba h1:GTSOFeKvAsgm21b6ko+XcuH3skZzuYTYyfIbFx/QNQ8=
|
||||
github.com/rancher/rancher/pkg/apis v0.0.0-20230915232223-a9ea4ce4a5ba/go.mod h1:CygL4GxLAJpxMRpqImc8+wH4zW+0kNVYW+nb0IsJ04A=
|
||||
github.com/rancher/rancher/pkg/apis v0.0.0-20231012231324-73fed4503c08 h1:1PRBNM/lF5b+PumU5UYOlghU2U4XAWv/u2DEWxRJdgE=
|
||||
github.com/rancher/rancher/pkg/apis v0.0.0-20231012231324-73fed4503c08/go.mod h1:RJ6cxjZvPsvmYLyDuZvLx7uxWNHA4SUiGpOdRb2moNw=
|
||||
github.com/rancher/rke v1.5.0 h1:M/YryKnBs7IwzMGA2kh1EiypVQkme6o9KSg0hlllQa4=
|
||||
github.com/rancher/rke v1.5.0/go.mod h1:wZaVWzW46OTuGvyxgRHXGUyJ/QP0zOkKESO9hBOwTaY=
|
||||
github.com/rancher/system-upgrade-controller/pkg/apis v0.0.0-20210727200656-10b094e30007 h1:ru+mqGnxMmKeU0Q3XIDxkARvInDIqT1hH2amTcsjxI4=
|
||||
|
|
@ -1629,8 +1631,8 @@ google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu
|
|||
google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
|
||||
google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
|
||||
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
|
||||
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
|
||||
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
|
||||
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
|
||||
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
|
||||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
|
||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
||||
|
|
@ -1690,8 +1692,6 @@ gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
|
|||
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
|
||||
gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY=
|
||||
gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU=
|
||||
helm.sh/helm/v3 v3.12.3 h1:5y1+Sbty12t48T/t/CGNYUIME5BJ0WKfmW/sobYqkFg=
|
||||
helm.sh/helm/v3 v3.12.3/go.mod h1:KPKQiX9IP5HX7o5YnnhViMnNuKiL/lJBVQ47GHe1R0k=
|
||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package examples
|
||||
|
||||
const (
|
||||
ConfigurationFileKey = "tfexecInput"
|
||||
ConfigurationFileKey = "tfexec"
|
||||
)
|
||||
|
||||
type PlanOptions struct {
|
||||
|
|
|
|||
|
|
@ -2,15 +2,9 @@ package scale
|
|||
|
||||
import (
|
||||
provV1 "github.com/rancher/rancher/pkg/apis/provisioning.cattle.io/v1"
|
||||
"github.com/rancher/shepherd/clients/rancher"
|
||||
"github.com/rancher/shepherd/extensions/kubeconfig"
|
||||
"github.com/rancher/shepherd/pkg/config"
|
||||
log "github.com/sirupsen/logrus"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
"k8s.io/client-go/tools/clientcmd"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -60,57 +54,3 @@ func LoadScaleConfig() *Config {
|
|||
config.LoadConfig(ConfigurationFileKey, scaleConfig)
|
||||
return scaleConfig
|
||||
}
|
||||
|
||||
func getAllRancherLogs(r *rancher.Client, clusterID string, podName string, since metav1.Time) (string, error) {
|
||||
podLogOptions := &corev1.PodLogOptions{
|
||||
Container: "rancher",
|
||||
Timestamps: true,
|
||||
SinceTime: &since,
|
||||
}
|
||||
return kubeconfig.GetPodLogsWithOpts(r, clusterID, podName, "cattle-system", podLogOptions)
|
||||
}
|
||||
|
||||
func generateRancherMemProfile(r restclient.Config, podName string) (*kubeconfig.LogStreamer, error) {
|
||||
cmd := memProfileCommand()
|
||||
streamer, err := kubeconfig.KubectlExec(&r, podName, "cattle-system", cmd)
|
||||
if err != nil {
|
||||
log.Warnf("error executing memory profile command (%s): %v", cmd, err)
|
||||
}
|
||||
return streamer, err
|
||||
}
|
||||
|
||||
func getRancherMemProfile(r restclient.Config, k clientcmd.ClientConfig, podName string, dest string) error {
|
||||
_, err := generateRancherMemProfile(r, podName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = kubeconfig.CopyFileFromPod(&r, k, podName, "cattle-system", MemProfileFileName+ProfileFileExtension, dest)
|
||||
if err != nil {
|
||||
log.Warnf("error copying file (%s) from pod (%s) to dest (%s): %v", MemProfileFileName+ProfileFileExtension, podName, dest, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func generateRancherCPUProfile(r restclient.Config, podName string) (*kubeconfig.LogStreamer, error) {
|
||||
cmd := cpuProfileCommand()
|
||||
streamer, err := kubeconfig.KubectlExec(&r, podName, "cattle-system", cmd)
|
||||
if err != nil {
|
||||
log.Warnf("error executing cpu profile command (%s): %v", cmd, err)
|
||||
}
|
||||
return streamer, err
|
||||
}
|
||||
|
||||
func getRancherCPUProfile(r restclient.Config, k clientcmd.ClientConfig, podName string, dest string) error {
|
||||
_, err := generateRancherCPUProfile(r, podName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = kubeconfig.CopyFileFromPod(&r, k, podName, "cattle-system", CPUProfileFileName+ProfileFileExtension, dest)
|
||||
if err != nil {
|
||||
log.Warnf("error copying file (%s) from pod (%s) to dest (%s): %v", CPUProfileFileName+ProfileFileExtension, podName, dest, err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/git-ival/dartboard/test/utils/grafanautils"
|
||||
"github.com/git-ival/dartboard/test/utils/helpers"
|
||||
"github.com/git-ival/dartboard/test/utils/imageutils"
|
||||
"github.com/git-ival/dartboard/test/utils/rancherprofiling"
|
||||
|
||||
"github.com/git-ival/dartboard/test/utils/ranchermonitoring"
|
||||
"github.com/git-ival/dartboard/test/utils/ranchermonitoring/dashboards/rancherclusternodes"
|
||||
|
|
@ -297,20 +299,20 @@ func (s *ScaleChecksTestSuite) collectMetricsAndArtifacts(numClusters int, start
|
|||
for _, podName := range podNames {
|
||||
log.Info("Getting mem profile for: ", podName)
|
||||
memProfileDest := fmt.Sprintf("%s/%s-%s%s", s.outputPath, podName, MemProfileFileName, clustersSuffix+ProfileFileExtension)
|
||||
err = getRancherMemProfile(*s.restClient, *s.clientConfig, podName, memProfileDest)
|
||||
err = rancherprofiling.GetRancherMemProfile(*s.restClient, *s.clientConfig, podName, memProfileDest)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get Rancher memory profile: %v", err)
|
||||
continue
|
||||
}
|
||||
log.Info("Getting cpu profile for: ", podName)
|
||||
cpuProfileDest := fmt.Sprintf("%s/%s-%s%s", s.outputPath, podName, CPUProfileFileName, clustersSuffix+ProfileFileExtension)
|
||||
err = getRancherCPUProfile(*s.restClient, *s.clientConfig, podName, cpuProfileDest)
|
||||
err = rancherprofiling.GetRancherCPUProfile(*s.restClient, *s.clientConfig, podName, cpuProfileDest)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to get Rancher CPU profile: %v", err)
|
||||
continue
|
||||
}
|
||||
log.Info("Getting rancher logs for: ", podName)
|
||||
logs, err := getAllRancherLogs(s.client, s.clusterID, podName, start)
|
||||
logs, err := helpers.GetAllRancherLogs(s.client, s.clusterID, podName, start)
|
||||
if err != nil {
|
||||
log.Warnf("error getting pod logs for pod (%s): %v", podName, err)
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -84,7 +84,7 @@ func GetAllRancherLogs(r *rancher.Client, clusterID string, podName string, sinc
|
|||
SinceTime: &since,
|
||||
}
|
||||
log.Infof("Collecting Rancher logs since: %s", since.String())
|
||||
return kubeconfig.GetPodLogsWithOpts(r, clusterID, podName, "cattle-system", podLogOptions)
|
||||
return kubeconfig.GetPodLogsWithOpts(r, clusterID, podName, "cattle-system", "", podLogOptions)
|
||||
}
|
||||
|
||||
func CreateCustomMonitoringDashboards(t *testing.T, ts *session.Session, client *rancher.Client, configMapsDir string) error {
|
||||
|
|
@ -298,7 +298,7 @@ func CollectRancherMetricsAndArtifacts(t *testing.T, ts *session.Session, client
|
|||
go func(ctx context.Context, podName, logFileDest string, podLogOptions *corev1.PodLogOptions) {
|
||||
defer func() { done <- podName }() // Signal completion of goroutine
|
||||
log.Info("Getting pod logs")
|
||||
_, err := kubeconfig.GetPodLogsWithContext(ctx, client, "local", podName, "cattle-system", logFileDest, podLogOptions)
|
||||
_, err := kubeconfig.GetPodLogsWithContext(ctx, client, "local", podName, "cattle-system", "", logFileDest, true, podLogOptions)
|
||||
if err != nil {
|
||||
log.Warnf("error getting pod logs for pod (%s): %v", podName, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue