@@ -252,22 +252,20 @@ func TestLoggingMetrics_Monitoring(t *testing.T) {
252
252
func installPrometheusOperator (c common.Cluster ) error {
253
253
manager := helm .New (c .KubeConfigFilePath ())
254
254
255
- err := manager .RunRepo (helm .WithArgs ("add" , "prometheus-community" , "https://prometheus-community.github.io/helm-charts" ))
256
- if err != nil {
257
- return fmt .Errorf ("failed to add prometheus-community repo: %w" , err )
255
+ if err := manager .RunRepo (helm .WithArgs ("add" , "prometheus-community" , "https://prometheus-community.github.io/helm-charts" )); err != nil {
256
+ return fmt .Errorf ("failed to add prometheus-community repo: %v" , err )
258
257
}
259
258
260
- err = manager .RunInstall (
259
+ if err : = manager .RunInstall (
261
260
helm .WithName ("prometheus" ),
262
261
helm .WithChart ("prometheus-community/kube-prometheus-stack" ),
263
262
helm .WithArgs ("--create-namespace" ),
264
263
helm .WithNamespace ("monitoring" ),
265
264
helm .WithArgs ("--set" , "prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false" ),
266
265
helm .WithArgs ("--set" , "prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false" ),
267
266
helm .WithWait (),
268
- )
269
- if err != nil {
270
- return fmt .Errorf ("failed to install prometheus-operator: %w" , err )
267
+ ); err != nil {
268
+ return fmt .Errorf ("failed to install prometheus: %v" , err )
271
269
}
272
270
273
271
return nil
0 commit comments