Skip to content

Commit

Permalink
rename struct member
Browse files Browse the repository at this point in the history
  • Loading branch information
dem4gus committed Sep 15, 2023
1 parent a79f7fc commit e7bc84b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pkg/monitor/cluster/certificateexpirationstatuses.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ 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{
err := mon.ocpclientset.Get(ctx, client.ObjectKey{
Namespace: ingressNamespace,
Name: ingressName,
}, ic)
Expand Down Expand Up @@ -77,7 +77,7 @@ func (mon *Monitor) emitCertificateExpirationStatuses(ctx context.Context) error

func (mon *Monitor) getCertificate(ctx context.Context, secretNamespace, secretName, secretKey string) (*x509.Certificate, error) {
secret := &corev1.Secret{}
err := mon.clientset.Get(ctx, client.ObjectKey{
err := mon.ocpclientset.Get(ctx, client.ObjectKey{
Namespace: secretNamespace,
Name: secretName,
}, secret)
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitor/cluster/certificateexpirationstatuses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,14 @@ func buildMonitor(m *mock_metrics.MockEmitter, domain, id string, secrets ...cli
},
}

clientset := fake.
ocpclientset := fake.
NewClientBuilder().
WithObjects(ingressController).
WithObjects(secrets...).
Build()
mon := &Monitor{
clientset: clientset,
m: m,
ocpclientset: ocpclientset,
m: m,
oc: &api.OpenShiftCluster{
Properties: api.OpenShiftClusterProperties{
ClusterProfile: api.ClusterProfile{
Expand Down
6 changes: 3 additions & 3 deletions pkg/monitor/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Monitor struct {
m metrics.Emitter
arocli aroclient.Interface

clientset client.Client
ocpclientset client.Client
hiveclientset client.Client

// access below only via the helper functions in cache.go
Expand Down Expand Up @@ -92,7 +92,7 @@ func NewMonitor(log *logrus.Entry, restConfig *rest.Config, oc *api.OpenShiftClu
return nil, err
}

clientset, err := client.New(restConfig, client.Options{})
ocpclientset, err := client.New(restConfig, client.Options{})
if err != nil {
return nil, err
}
Expand All @@ -116,7 +116,7 @@ func NewMonitor(log *logrus.Entry, restConfig *rest.Config, oc *api.OpenShiftClu
mcocli: mcocli,
arocli: arocli,
m: m,
clientset: clientset,
ocpclientset: ocpclientset,
hiveclientset: hiveclientset,
}, nil
}
Expand Down

0 comments on commit e7bc84b

Please sign in to comment.