Skip to content

Commit

Permalink
use constants for ingress name and namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
dem4gus committed Sep 15, 2023
1 parent 93285b7 commit a79f7fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/monitor/cluster/certificateexpirationstatuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import (
const (
certificateExpirationMetricName = "certificate.expirationdate"
secretMissingMetricName = "certificate.secretnotfound"
ingressNamespace = "openshift-ingress-operator"
ingressName = "default"
)

func (mon *Monitor) emitCertificateExpirationStatuses(ctx context.Context) error {
Expand All @@ -41,8 +43,8 @@ func (mon *Monitor) emitCertificateExpirationStatuses(ctx context.Context) error
if dns.IsManagedDomain(mon.oc.Properties.ClusterProfile.Domain) {
ic := &operatorv1.IngressController{}
err := mon.clientset.Get(ctx, client.ObjectKey{
Namespace: "openshift-ingress-operator",
Name: "default",
Namespace: ingressNamespace,
Name: ingressName,
}, ic)
if err != nil {
return err
Expand Down

0 comments on commit a79f7fc

Please sign in to comment.