Documentation ¶
Index ¶
- Constants
- type CustomClient
- func (c *CustomClient) DynamicClient() dynamic.Interface
- func (c *CustomClient) JvmbuildserviceClient() jvmbuildserviceclientset.Interface
- func (c *CustomClient) KubeInterface() kubernetes.Interface
- func (c *CustomClient) KubeRest() crclient.Client
- func (c *CustomClient) PipelineClient() pipelineclientset.Interface
- func (c *CustomClient) RouteClient() routeclientset.Interface
- type K8SClient
Constants ¶
const ( DefaultRetryInterval = time.Millisecond * 100 // make it short because a "retry interval" is waited before the first test DefaultTimeout = time.Second * 240 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomClient ¶
type CustomClient struct {
// contains filtered or unexported fields
}
func CreateAPIProxyClient ¶
func CreateAPIProxyClient(usertoken, proxyURL string) (*CustomClient, error)
CreateAPIProxyClient creates a client to the RHTAP api proxy using the given user token
func NewAdminKubernetesClient ¶
func NewAdminKubernetesClient() (*CustomClient, error)
Creates a kubernetes client from default kubeconfig. Will take it from KUBECONFIG env if it is defined and if in case is not defined will create the client from $HOME/.kube/config
func (*CustomClient) DynamicClient ¶
func (c *CustomClient) DynamicClient() dynamic.Interface
Returns a DynamicClient interface. Note: other client interfaces are likely preferred, except in rare cases.
func (*CustomClient) JvmbuildserviceClient ¶
func (c *CustomClient) JvmbuildserviceClient() jvmbuildserviceclientset.Interface
func (*CustomClient) KubeInterface ¶
func (c *CustomClient) KubeInterface() kubernetes.Interface
Kube returns the clientset for Kubernetes upstream.
func (*CustomClient) KubeRest ¶
func (c *CustomClient) KubeRest() crclient.Client
Return a rest client to perform CRUD operations on Kubernetes objects
func (*CustomClient) PipelineClient ¶
func (c *CustomClient) PipelineClient() pipelineclientset.Interface
func (*CustomClient) RouteClient ¶
func (c *CustomClient) RouteClient() routeclientset.Interface
type K8SClient ¶
type K8SClient struct { AsKubeAdmin *CustomClient AsKubeDeveloper *CustomClient ProxyUrl string SandboxController *sandbox.SandboxController UserName string UserNamespace string UserToken string }
func NewDevSandboxProxyClient ¶
func NewDevSandboxProxyClient(userName string, isStage bool, options utils.Options) (*K8SClient, error)
Creates Kubernetes clients: 1. Will create a kubernetes client from default kubeconfig as kubeadmin 2. Will create a sandbox user and will generate a client using user token a new client to create resources in RHTAP like a normal user