v1

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v1 contains API Schema definitions for the e2etest.grpc.io v1 API group +kubebuilder:object:generate=true +groupName=e2etest.grpc.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "e2etest.grpc.io", Version: "v1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var ContainerError = "ContainerError"

ContainerError is the reason string when a container has failed on one of the load test's pods.

View Source
var FailedSettingDefaultsError = "FailedSettingDefaults"

FailedSettingDefaultsError is the reason string when defaults could not be set on a load test.

View Source
var InitContainerError = "InitContainerError"

InitContainerError is the reason string when an init container has failed on one of the load test's pods.

View Source
var KubernetesError = "KubernetesError"

KubernetesError is the reason string when an issue occurs with Kubernetes that is not known to be directly related to a load test.

View Source
var PodsMissing = "PodsMissing"

PodsMissing is the reason string when the load test is missing pods and is still in the Initializing state.

Functions

This section is empty.

Types

type Build

type Build struct {
	// Image is the name of the container image that can build code,
	// placing an executable in the /src/workspace directory.
	//
	// This field is optional when a Language is specified on the
	// Component. For example, a developer may specify a "java" server.
	// Then, this image will default to the most recent gradle image.
	// +optional
	Image *string `json:"image,omitempty"`

	// Command is the path to the executable that will build the code in
	// the /src/workspace directory. If unspecified, the entrypoint for
	// the container is used.
	// +optional
	Command []string `json:"command,omitempty"`

	// Args provide command line arguments to the command. If a command
	// is not specified, these arguments will be ignored in favor of the
	// default arguments for container's entrypoint.
	// +optional
	Args []string `json:"args,omitempty"`

	// Env are environment variables that should be set within the build
	// container. This is provided for compilers that alter behavior due
	// to certain environment variables.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`
}

Build defines expectations regarding which container image, command, arguments and environment variables are used to build the component.

func (*Build) DeepCopy

func (in *Build) DeepCopy() *Build

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build.

func (*Build) DeepCopyInto

func (in *Build) DeepCopyInto(out *Build)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Client

type Client struct {
	Component `json:",inline"`
}

Client defines a component that sends traffic to a server component.

func (*Client) DeepCopy

func (in *Client) DeepCopy() *Client

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Client.

func (*Client) DeepCopyInto

func (in *Client) DeepCopyInto(out *Client)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Clone

type Clone struct {
	// Image is the name of the container image that can clone code, placing
	// it in a /src/workspace directory.
	//
	// This field is optional. When omitted, a container that can clone
	// public GitHub repos over HTTPs is used.
	// +optional
	Image *string `json:"image,omitempty"`

	// Repo is the URL to clone a git repository. With GitHub, this should
	// end in a `.git` extension.
	// +optional
	Repo *string `json:"repo,omitempty"`

	// GitRef is a branch, tag or commit hash to checkout after a
	// successful clone. This will be the version of the code in the
	// /src/workspace directory.
	// +optional
	GitRef *string `json:"gitRef,omitempty"`
}

Clone defines expectations regarding which repository and snapshot the test should use.

func (*Clone) DeepCopy

func (in *Clone) DeepCopy() *Clone

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Clone.

func (*Clone) DeepCopyInto

func (in *Clone) DeepCopyInto(out *Clone)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Component

type Component struct {
	// Name is a string which uniquely identifies the component when
	// compared to other components in the load test. If omitted, the
	// system will assign a globally unique name.
	// +optional
	Name *string `json:"name,omitempty"`

	// Language is the code that identifies the programming language used by
	// the component. For example, "cxx" may represent C++.
	//
	// Specifying a language is required. Aside from metadata, It allows the
	// image field on the Build and Run objects to be inferred.
	Language string `json:"language"`

	// Pool specifies the name of the set of nodes where this component should
	// be scheduled. If unset, the controller will choose a pool based on the
	// type of component.
	Pool *string `json:"pool,omitempty"`

	// Clone specifies the repository and snapshot where the code can be
	// found. This is used to build and run tests.
	// +optional
	Clone *Clone `json:"clone,omitempty"`

	// Build describes how the cloned code should be built, including any
	// compiler arguments or flags.
	// +optional
	Build *Build `json:"build,omitempty"`

	// Run describes the runtime of the container during the test
	// itself. This is required, because the system must run some
	// container.
	Run Run `json:"run"`
}

Component defines a runnable unit of the test.

func (*Component) DeepCopy

func (in *Component) DeepCopy() *Component

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Component.

func (*Component) DeepCopyInto

func (in *Component) DeepCopyInto(out *Component)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Driver

type Driver struct {
	Component `json:",inline"`
}

Driver defines a component that orchestrates the server and clients in the test.

func (*Driver) DeepCopy

func (in *Driver) DeepCopy() *Driver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Driver.

func (*Driver) DeepCopyInto

func (in *Driver) DeepCopyInto(out *Driver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadTest

type LoadTest struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   LoadTestSpec   `json:"spec,omitempty"`
	Status LoadTestStatus `json:"status,omitempty"`
}

LoadTest is the Schema for the loadtests API

func (*LoadTest) DeepCopy

func (in *LoadTest) DeepCopy() *LoadTest

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTest.

func (*LoadTest) DeepCopyInto

func (in *LoadTest) DeepCopyInto(out *LoadTest)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LoadTest) DeepCopyObject

func (in *LoadTest) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LoadTestList

type LoadTestList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LoadTest `json:"items"`
}

LoadTestList contains a list of LoadTest

func (*LoadTestList) DeepCopy

func (in *LoadTestList) DeepCopy() *LoadTestList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTestList.

func (*LoadTestList) DeepCopyInto

func (in *LoadTestList) DeepCopyInto(out *LoadTestList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LoadTestList) DeepCopyObject

func (in *LoadTestList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LoadTestSpec

type LoadTestSpec struct {
	// Driver is the component that orchestrates the test. It may be
	// unspecified, allowing the system to choose the appropriate driver.
	// +optional
	Driver *Driver `json:"driver,omitempty"`

	// Servers are a list of components that receive traffic from
	// clients.
	// +optional
	Servers []Server `json:"servers,omitempty"`

	// Clients are a list of components that send traffic to servers.
	// +optional
	Clients []Client `json:"clients,omitempty"`

	// Results configures where the results of the test should be
	// stored. When omitted, the results will only be stored in
	// Kubernetes for a limited time.
	// +optional
	Results *Results `json:"results,omitempty"`

	// ScenariosJSON is string with the contents of a Scenarios message,
	// formatted as JSON. See the Scenarios protobuf definition for details:
	// https://github.com/grpc/grpc-proto/blob/master/grpc/testing/control.proto.
	// +optional
	ScenariosJSON string `json:"scenariosJSON,omitempty"`
}

LoadTestSpec defines the desired state of LoadTest

func (*LoadTestSpec) DeepCopy

func (in *LoadTestSpec) DeepCopy() *LoadTestSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTestSpec.

func (*LoadTestSpec) DeepCopyInto

func (in *LoadTestSpec) DeepCopyInto(out *LoadTestSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadTestState

type LoadTestState string

LoadTestState reflects the derived state of the load test from its components. If any one component has errored, the load test will be marked in an Errored state, too. This will occur even if the other components are running or succeeded. +kubebuilder:default=Unrecognized

const (
	// Unknown states indicate that the load test is in an indeterminate state.
	// Something may have gone wrong, but it may be recoverable. No assumption
	// should be made about the next state. It may transition to any other state
	// or remain Unknown until a timeout occurs.
	Unknown LoadTestState = "Unknown"

	// Initializing states indicate that load test's pods are under construction.
	// This may mean that code is being cloned, built or assembled.
	Initializing LoadTestState = "Initializing"

	// Running states indicate that the initialization for a load test's pods has
	// completed successfully. The run container has started.
	Running LoadTestState = "Running"

	// Succeeded states indicate the driver pod's run container has terminated
	// successfully, signaled by a zero exit code.
	Succeeded LoadTestState = "Succeeded"

	// Errored states indicate the load test encountered a problem that prevented
	// a successful run.
	Errored LoadTestState = "Errored"
)

func (LoadTestState) IsTerminated

func (lts LoadTestState) IsTerminated() bool

IsTerminated returns true if the test has finished due to a success, failure or error. Otherwise, it returns false.

type LoadTestStatus

type LoadTestStatus struct {
	// State identifies the current state of the load test. It is
	// important to note that this state is level-based. This means its
	// transition is non-deterministic.
	State LoadTestState `json:"state"`

	// Reason is a camel-case string that indicates the reasoning behind the
	// current state.
	// +optional
	Reason string `json:"reason,omitempty"`

	// Message is a human legible string that describes the current state.
	// +optional
	Message string `json:"message,omitempty"`

	// StartTime is the time when the controller first reconciled the load test.
	// It is maintained in a best-attempt effort; meaning, it is not guaranteed to
	// be correct.
	// +optional
	StartTime *metav1.Time `json:"startTime,omitempty"`

	// StopTime is the time when the controller last entered the Succeeded,
	// Failed or Errored states.
	// +optional
	StopTime *metav1.Time `json:"stopTime,omitempty"`
}

LoadTestStatus defines the observed state of LoadTest

func (*LoadTestStatus) DeepCopy

func (in *LoadTestStatus) DeepCopy() *LoadTestStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadTestStatus.

func (*LoadTestStatus) DeepCopyInto

func (in *LoadTestStatus) DeepCopyInto(out *LoadTestStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Results

type Results struct {
	// BigQueryTable names a dataset where the results of the test
	// should be stored. If omitted, no results are saved to BigQuery.
	// +optional
	BigQueryTable *string `json:"bigQueryTable,omitempty"`
}

Results defines where and how test results and artifacts should be stored.

func (*Results) DeepCopy

func (in *Results) DeepCopy() *Results

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Results.

func (*Results) DeepCopyInto

func (in *Results) DeepCopyInto(out *Results)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Run

type Run struct {
	// Image is the name of the container image that provides the
	// runtime for the test component.
	//
	// This field is optional when a Language is specified on the
	// Component. For example, a developer may specify a "python3"
	// client. This field will be implicitly set to the most recent
	// supported python3 image.
	// +optional
	Image *string `json:"image,omitempty"`

	// Command is the path to the executable that will run the component
	// of the test. When unset, the entrypoint of the container image
	// will be used.
	// +optional
	Command []string `json:"command,omitempty"`

	// Args provide command line arguments to the command.
	// +optional
	Args []string `json:"args,omitempty"`

	// Env are environment variables that should be set within the
	// running container.
	// +optional
	Env []corev1.EnvVar `json:"env,omitempty"`

	// VolumeMounts permit sharing directories across containers.
	// +optional
	VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

Run defines expectations regarding the runtime environment for the test component itself.

func (*Run) DeepCopy

func (in *Run) DeepCopy() *Run

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Run.

func (*Run) DeepCopyInto

func (in *Run) DeepCopyInto(out *Run)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Server

type Server struct {
	Component `json:",inline"`
}

Server defines a component that receives traffic from a set of client components.

func (*Server) DeepCopy

func (in *Server) DeepCopy() *Server

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server.

func (*Server) DeepCopyInto

func (in *Server) DeepCopyInto(out *Server)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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