Skip to content

Commit

Permalink
test/framework: fix disable metrics collection should not disable wat…
Browse files Browse the repository at this point in the history
…ching deployment

logs

Signed-off-by: Stefan Büringer [email protected]
  • Loading branch information
sbueringer committed Aug 9, 2021
1 parent 92e3867 commit ccaebbf
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/framework/clusterctl/clusterctl_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,14 @@ func InitManagementClusterAndWatchControllerLogs(ctx context.Context, input Init
LogPath: filepath.Join(input.LogFolder, "controllers"),
})

if input.DisableMetricsCollection {
return
if !input.DisableMetricsCollection {
framework.WatchPodMetrics(ctx, framework.WatchPodMetricsInput{
GetLister: client,
ClientSet: input.ClusterProxy.GetClientSet(),
Deployment: deployment,
MetricsPath: filepath.Join(input.LogFolder, "controllers"),
})
}
framework.WatchPodMetrics(ctx, framework.WatchPodMetricsInput{
GetLister: client,
ClientSet: input.ClusterProxy.GetClientSet(),
Deployment: deployment,
MetricsPath: filepath.Join(input.LogFolder, "controllers"),
})
}
}

Expand Down

0 comments on commit ccaebbf

Please sign in to comment.