From 13c270bf40832f1971efffaf8e479f9e5bfc0c2a Mon Sep 17 00:00:00 2001 From: Raul Sevilla Date: Thu, 12 Dec 2024 11:31:31 +0100 Subject: [PATCH] Fix incorrect GVR 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",