github.com/redhat-appstudio/e2e-tests@v0.0.0-20230619105049-9a422b2094d7/pkg/utils/common/cluster.go (about)

     1  package common
     2  
     3  import (
     4  	"context"
     5  
     6  	openshiftApi "github.com/openshift/api/config/v1"
     7  	"k8s.io/apimachinery/pkg/types"
     8  )
     9  
    10  // Obtain the Openshift ingress specs
    11  func (s *SuiteController) GetOpenshiftIngress() (ingress *openshiftApi.Ingress, err error) {
    12  	var ing = &openshiftApi.Ingress{}
    13  	if err := s.KubeRest().Get(context.TODO(), types.NamespacedName{Name: "cluster"}, ing); err != nil {
    14  		return nil, err
    15  	}
    16  
    17  	return ing, nil
    18  }