Skip to content

Commit 2959328

Browse files
Merge pull request #1012 from jpeeler/add-fields-related-objects
Bug 1717638 fix(olm): report name and group for related objects
2 parents 21160c2 + 80a0850 commit 2959328

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/lib/operatorstatus/status.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
configv1 "github.com/openshift/api/config/v1"
1010
configv1client "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1"
1111
log "github.com/sirupsen/logrus"
12+
corev1 "k8s.io/api/core/v1"
1213
k8serrors "k8s.io/apimachinery/pkg/api/errors"
1314
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1415
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -254,11 +255,13 @@ func relatedObjects(name, namespace string) []configv1.ObjectReference {
254255
Group: olmv1.GroupName,
255256
Resource: olmv1.OperatorGroupKind,
256257
Namespace: namespace,
258+
Name: clusterOperatorOLM,
257259
},
258260
{
259261
Group: olmv1alpha1.GroupName,
260262
Resource: olmv1alpha1.ClusterServiceVersionKind,
261263
Namespace: namespace,
264+
Name: clusterOperatorOLM,
262265
},
263266
}
264267
case clusterOperatorCatalogSource:
@@ -267,15 +270,18 @@ func relatedObjects(name, namespace string) []configv1.ObjectReference {
267270
Group: olmv1alpha1.GroupName,
268271
Resource: olmv1alpha1.SubscriptionKind,
269272
Namespace: namespace,
273+
Name: clusterOperatorCatalogSource,
270274
},
271275
{
272276
Group: olmv1alpha1.GroupName,
273277
Resource: olmv1alpha1.InstallPlanKind,
274278
Namespace: namespace,
279+
Name: clusterOperatorCatalogSource,
275280
},
276281
}
277282
}
278283
namespaces := configv1.ObjectReference{
284+
Group: corev1.GroupName,
279285
Resource: "namespaces",
280286
Name: namespace,
281287
}

0 commit comments

Comments
 (0)