Skip to content

Commit

Permalink
Remove Grafana Alert Service Annotations (#1065)
Browse files Browse the repository at this point in the history
* removing application of annotations from alert service

* formatting grafana alert service
  • Loading branch information
celestialorb authored May 26, 2023
1 parent f41668f commit 7cf0481
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions controllers/model/grafanaAlertService.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,12 @@ func getAlertServiceLabels(cr *v1alpha1.Grafana) map[string]string {
return cr.Spec.Service.Labels
}

func getAlertServiceAnnotations(cr *v1alpha1.Grafana, existing map[string]string) map[string]string {
if cr.Spec.Service == nil {
return existing
}

return MergeAnnotations(cr.Spec.Service.Annotations, existing)
}

func GrafanaAlertService(cr *v1alpha1.Grafana) *v1.Service {
return &v1.Service{
ObjectMeta: v12.ObjectMeta{
Name: getAlertServiceName(),
Namespace: cr.Namespace,
Labels: getAlertServiceLabels(cr),
Annotations: getAlertServiceAnnotations(cr, nil),
Name: getAlertServiceName(),
Namespace: cr.Namespace,
Labels: getAlertServiceLabels(cr),
},
Spec: v1.ServiceSpec{
ClusterIP: "None",
Expand Down

0 comments on commit 7cf0481

Please sign in to comment.