Skip to content

Commit

Permalink
merge with main
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumEnigmaa committed May 27, 2024
2 parents 0260d15 + 5446950 commit e8fc1dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add support for mimir in remoteWrite secret creation.
- Add mimir ingress secret for basic auth creation.

### Fixed

- Fix mimir heartbeat priority.

### Changed

- Do nothing if mimir is disabled to avoid deleting prometheus-meta-operator managed resources.

## [0.0.3] - 2024-05-24

### Changed
Expand Down
8 changes: 6 additions & 2 deletions internal/controller/cluster_monitoring_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,13 @@ func (r *ClusterMonitoringReconciler) Reconcile(ctx context.Context, req ctrl.Re
return ctrl.Result{}, errors.WithStack(err)
}

if !r.MonitoringEnabled {
logger.Info("Monitoring is disabled at the installation level")
return ctrl.Result{}, nil
}

// Handle deletion reconciliation loop.
if !cluster.ObjectMeta.DeletionTimestamp.IsZero() || !r.MonitoringEnabled {
if !cluster.ObjectMeta.DeletionTimestamp.IsZero() {
logger.Info("Handling deletion for Cluster", "cluster", cluster.Name)
return r.reconcileDelete(ctx, cluster)
}
Expand Down Expand Up @@ -173,6 +178,5 @@ func (r *ClusterMonitoringReconciler) reconcileDelete(ctx context.Context, clust
}
logger.Info("removed finalizer", "finalizer", monitoring.MonitoringFinalizer)
}
controllerutil.RemoveFinalizer(cluster, monitoring.MonitoringFinalizer)
return ctrl.Result{}, nil
}
2 changes: 1 addition & 1 deletion pkg/monitoring/heartbeat/opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (r OpsgenieHeartbeatRepository) makeHeartbeat() *heartbeat.Heartbeat {
Name: "alerts_router_team",
},
AlertTags: tags,
AlertPriority: "P1",
AlertPriority: "P3",
AlertMessage: fmt.Sprintf("Heartbeat [%s] is expired.", r.ManagementCluster.Name),
}
}
Expand Down

0 comments on commit e8fc1dd

Please sign in to comment.