From f97e2c0151b9ecb9f2ef98bbf6e9daaf0270e12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Sevilla?= Date: Thu, 12 Dec 2024 11:44:27 +0100 Subject: [PATCH] Fix incorrect GVR (#52) Signed-off-by: Raul Sevilla --- ocp-metadata/ocp-metadata.go | 2 +- ocp-metadata/types.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ocp-metadata/ocp-metadata.go b/ocp-metadata/ocp-metadata.go index 6068754..7afb95e 100644 --- a/ocp-metadata/ocp-metadata.go +++ b/ocp-metadata/ocp-metadata.go @@ -168,7 +168,7 @@ func (meta *Metadata) GetCurrentVMICount() (int, error) { // GetDefaultIngressDomain returns default ingress domain of the default ingress controller func (meta *Metadata) GetDefaultIngressDomain() (string, error) { - ingressController, err := meta.dynamicClient.Resource(routeGVR). + ingressController, err := meta.dynamicClient.Resource(ingressControllerGRV). Namespace("openshift-ingress-operator").Get(context.TODO(), "default", metav1.GetOptions{}) if err != nil { return "", err diff --git a/ocp-metadata/types.go b/ocp-metadata/types.go index cec1e18..9a10620 100644 --- a/ocp-metadata/types.go +++ b/ocp-metadata/types.go @@ -35,6 +35,12 @@ var routeGVR = schema.GroupVersionResource{ Resource: "routes", } +var ingressControllerGRV = schema.GroupVersionResource{ + Group: "operator.openshift.io", + Version: "v1", + Resource: "ingresscontrollers", +} + var vmiGVR = schema.GroupVersionResource{ Group: "kubevirt.io", Version: "v1",