e2e

package
v0.0.0-...-6acb6a6 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultTimeout is the default timeout for client operations
	DefaultClientTimeout = 30 * time.Second
	// DefaultPollInterval is the default interval for polling
	DefaultPollInterval = 5 * time.Second
	// DefaultPollTimeout is the default timeout for polling
	DefaultPollTimeout = 10 * time.Minute
)
View Source
const (
	// OLSNameSpace is the namespace where the operator is deployed
	OLSNameSpace = "openshift-lightspeed"
	// OperatorDeploymentName is the name of the operator deployment
	OperatorDeploymentName = "lightspeed-operator-controller-manager"
	// LLMTokenEnvVar is the environment variable containing the LLM API token
	LLMTokenEnvVar = "LLM_TOKEN"
	// LLMTokenFirstSecretName is the name of the first secret containing the LLM API token
	LLMTokenFirstSecretName = "llm-token-first" // #nosec G101
	// LLMTokenSecondSecretName is the name of the second secret containing the LLM API token
	LLMTokenSecondSecretName = "llm-token-second" // #nosec G101
	// LLMApiTokenFileName
	LLMApiTokenFileName = "apitoken"
	// LLMDefaultProvider
	LLMDefaultProvider = "openai"
	// LLMProviderEnvVar is the environment variable containing the LLM provider
	LLMProviderEnvVar = "LLM_PROVIDER"
	// LLMTypeEnvVar is the environment variable containing the LLM type
	LLMTypeEnvVar = "LLM_TYPE"
	// LLMDefaultType is the default LLM type
	LLMDefaultType = "openai"
	// OpenAIDefaultModel is the default model to use
	OpenAIDefaultModel = "gpt-3.5-turbo"
	// OpenAIAlternativeModel is the alternative model to test model change
	OpenAIAlternativeModel = "gpt-4-1106-preview"
	// LLMModelEnvVar is the environment variable containing the LLM model
	LLMModelEnvVar = "LLM_MODEL"
	// OLSCRName is the name of the OLSConfig CR
	OLSCRName = "cluster"
	// AppServerDeploymentName is the name of the OLS application server deployment
	AppServerDeploymentName = "lightspeed-app-server"
	// AppServerServiceName is the name of the OLS application server service
	AppServerServiceName = "lightspeed-app-server"
	// AppServerServiceHTTPSPort is the port number of the OLS application server service
	AppServerServiceHTTPSPort = 8443
	// ConsolePluginServiceName is the name of the OLS console plugin deployment
	ConsolePluginDeploymentName = "lightspeed-console-plugin"
	// ConsolePluginServiceName is the name of the OLS console plugin service
	ConsolePluginServiceName = "lightspeed-console-plugin"
	// ConsoleUIPluginName is the name of the OLS console plugin
	ConsoleUIPluginName = "lightspeed-console-plugin"
	// ConsoleUIConfigMapName is the name of the console UI nginx configmap
	ConsoleUIConfigMapName = "lightspeed-console-plugin"

	// OLSConsolePluginServiceHTTPSPort is the port number of the OLS console plugin service
	OLSConsolePluginServiceHTTPSPort = 9443
	// AppServerConfigMapName is the name of the OLS application server config map
	AppServerConfigMapName = "olsconfig"
	// AppServerConfigMapKey is the key of config file in the OLS application server config map
	AppServerConfigMapKey = "olsconfig.yaml"
	// AppServerTLSSecretName is the name of the OLS application server TLS secret
	AppServerTLSSecretName = "lightspeed-tls" // #nosec G101
	// ConditionTimeoutEnvVar is the environment variable containing the condition check timeout in seconds
	ConditionTimeoutEnvVar = "CONDITION_TIMEOUT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func GetClient

func GetClient(options *ClientOptions) (*Client, error)

func (*Client) Create

func (c *Client) Create(o client.Object) (err error)

func (*Client) Delete

func (c *Client) Delete(o client.Object) (err error)

func (*Client) ForwardPort

func (c *Client) ForwardPort(serviceName, namespaceName string, port int) (string, func(), error)

func (*Client) Get

func (c *Client) Get(o client.Object) (err error)

func (*Client) List

func (c *Client) List(o client.ObjectList, opts ...client.ListOption) (err error)

func (*Client) Update

func (c *Client) Update(o client.Object) (err error)

func (*Client) WaitForConfigMapContainString

func (c *Client) WaitForConfigMapContainString(cm *corev1.ConfigMap, key, substr string) error

func (*Client) WaitForDeploymentRollout

func (c *Client) WaitForDeploymentRollout(dep *appsv1.Deployment) error

func (*Client) WaitForObjectCreated

func (c *Client) WaitForObjectCreated(obj client.Object) error

func (*Client) WaitForSecretCreated

func (c *Client) WaitForSecretCreated(secret *corev1.Secret) error

func (*Client) WaitForServiceCreated

func (c *Client) WaitForServiceCreated(service *corev1.Service) error

type ClientOptions

type ClientOptions struct {
	// contains filtered or unexported fields
}

type HTTPSClient

type HTTPSClient struct {
	// contains filtered or unexported fields
}

func NewHTTPSClient

func NewHTTPSClient(host, serverName string, certificate []byte) *HTTPSClient

func (*HTTPSClient) Get

func (c *HTTPSClient) Get(queryUrl string) (*http.Response, error)

func (*HTTPSClient) PostJson

func (c *HTTPSClient) PostJson(queryUrl string, body []byte) (*http.Response, error)

Jump to

Keyboard shortcuts

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