Skip to content

Commit

Permalink
post rebase fix
Browse files Browse the repository at this point in the history
Signed-off-by: Thibault Mange <[email protected]>
  • Loading branch information
thibaultmg committed Jun 26, 2024
1 parent 615e083 commit 7330b67
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,7 @@ func (r *ObservabilityAddonReconciler) Reconcile(ctx context.Context, req ctrl.R
clusterType = operatorconfig.OcpThreeClusterType
}

isSNO, err := openshift.IsSNO(ctx, r.Client)
if err != nil {
if isSNO, err := openshift.IsSNO(ctx, r.Client); err != nil {
log.Error(err, "Failed to check if the cluster is SNO")
} else if isSNO {
clusterType = operatorconfig.SnoClusterType
Expand Down
2 changes: 2 additions & 0 deletions operators/endpointmetrics/pkg/status/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/util/retry"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down Expand Up @@ -54,6 +55,7 @@ var (
Status: metav1.ConditionTrue,
},
}
log = ctrl.Log.WithName("status")
)

func ReportStatus(ctx context.Context, client client.Client, conditionReason ConditionReason, addonName, addonNs string) error {
Expand Down
2 changes: 1 addition & 1 deletion operators/endpointmetrics/pkg/status/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func TestReportStatus(t *testing.T) {
{Type: "Degraded", Status: metav1.ConditionTrue},
{Type: "Available", Status: metav1.ConditionTrue},
},
newCondition: util.Deployed,
newCondition: status.Deployed,
expects: func(t *testing.T, conditions []oav1beta1.StatusCondition) {
assert.Len(t, conditions, 3)
for _, c := range conditions {
Expand Down

0 comments on commit 7330b67

Please sign in to comment.