8
8
9
9
configv1 "github.com/openshift/api/config/v1"
10
10
configv1client "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"
11
+ "github.com/operator-framework/operator-lifecycle-manager/pkg/api/client/clientset/versioned"
11
12
log "github.com/sirupsen/logrus"
12
13
corev1 "k8s.io/api/core/v1"
13
14
k8serrors "k8s.io/apimachinery/pkg/api/errors"
@@ -27,7 +28,7 @@ const (
27
28
clusterOperatorCatalogSource = "operator-lifecycle-manager-catalog"
28
29
)
29
30
30
- func MonitorClusterStatus (name , namespace string , syncCh <- chan error , stopCh <- chan struct {}, opClient operatorclient.ClientInterface , configClient configv1client.ConfigV1Interface ) {
31
+ func MonitorClusterStatus (name , namespace string , syncCh <- chan error , stopCh <- chan struct {}, opClient operatorclient.ClientInterface , configClient configv1client.ConfigV1Interface , crClient versioned. Interface ) {
31
32
var (
32
33
syncs int
33
34
successfulSyncs int
@@ -113,7 +114,7 @@ func MonitorClusterStatus(name, namespace string, syncCh <-chan error, stopCh <-
113
114
},
114
115
},
115
116
})
116
- created .Status .RelatedObjects = relatedObjects (name , namespace )
117
+ created .Status .RelatedObjects = relatedObjects (name , namespace , opClient , crClient )
117
118
if createErr != nil {
118
119
log .Errorf ("Failed to create cluster operator: %v\n " , createErr )
119
120
return
@@ -246,7 +247,7 @@ func findOperatorStatusCondition(conditions []configv1.ClusterOperatorStatusCond
246
247
247
248
// relatedObjects returns RelatedObjects in the ClusterOperator.Status.
248
249
// RelatedObjects are consumed by https://github.com/openshift/must-gather
249
- func relatedObjects (name , namespace string ) []configv1.ObjectReference {
250
+ func relatedObjects (name , namespace string , opClient operatorclient. ClientInterface , crClient versioned. Interface ) []configv1.ObjectReference {
250
251
var objectReferences []configv1.ObjectReference
251
252
switch name {
252
253
case clusterOperatorOLM :
0 commit comments