Skip to content

Commit 420fe70

Browse files
author
tony-landreth
committed
Removes unused error return type
1 parent 7e61cfa commit 420fe70

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

internal/controller/postgrescluster/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,7 @@ func (r *Reconciler) reconcileInstance(
12241224

12251225
// Add postgres-exporter to the instance Pod spec
12261226
if err == nil {
1227-
err = addPGMonitorExporterToInstancePodSpec(ctx, cluster, &instance.Spec.Template, exporterQueriesConfig, exporterWebConfig)
1227+
addPGMonitorExporterToInstancePodSpec(ctx, cluster, &instance.Spec.Template, exporterQueriesConfig, exporterWebConfig)
12281228
}
12291229

12301230
// add nss_wrapper init container and add nss_wrapper env vars to the database and pgbackrest

internal/controller/postgrescluster/pgmonitor.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,10 @@ func addPGMonitorExporterToInstancePodSpec(
233233
ctx context.Context,
234234
cluster *v1beta1.PostgresCluster,
235235
template *corev1.PodTemplateSpec,
236-
exporterQueriesConfig, exporterWebConfig *corev1.ConfigMap) error {
236+
exporterQueriesConfig, exporterWebConfig *corev1.ConfigMap) {
237237

238238
if !pgmonitor.ExporterEnabled(cluster) || feature.Enabled(ctx, feature.OpenTelemetryMetrics) {
239-
return nil
239+
return
240240
}
241241

242242
certSecret := cluster.Spec.Monitoring.PGMonitor.Exporter.CustomTLSSecret
@@ -369,8 +369,6 @@ func addPGMonitorExporterToInstancePodSpec(
369369
// add the proper label to support Pod discovery by Prometheus per pgMonitor configuration
370370
initialize.Labels(template)
371371
template.Labels[naming.LabelPGMonitorDiscovery] = "true"
372-
373-
return nil
374372
}
375373

376374
// reconcileExporterWebConfig reconciles the configmap containing the webconfig for exporter tls

0 commit comments

Comments
 (0)