Skip to content

Commit

Permalink
Fix incorrect GVR
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Dec 12, 2024
1 parent a33f371 commit 13c270b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ocp-metadata/ocp-metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions ocp-metadata/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 13c270b

Please sign in to comment.