client

package
v0.0.0-...-d01df85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL