Documentation
¶
Index ¶
Constants ¶
View Source
const ( // BazelCacheVolumeName holds the name of the volume which allows images to // share a bazel cache. BazelCacheVolumeName = "bazel-cache" // BazelCacheMountPath stores the directory where the bazel cache resides. For // a description of the bazel image and its cache/output directories, see // https://docs.bazel.build/versions/master/output_directories.html. BazelCacheMountPath = "/root/.cache/bazel" // BigQueryTableEnv specifies the name of the env variable that holds the name // of the table where results should be written. BigQueryTableEnv = "BQ_RESULT_TABLE" // BuildInitContainerName holds the name of the init container that assembles // a binary or other bundle required to run the tests. BuildInitContainerName = "build" // ClientRole is the value the controller expects for the RoleLabel // on a client component. ClientRole = "client" // CloneGitRefEnv specifies the name of the env variable that contains the // commit, tag or branch to checkout after cloning a git repository. CloneGitRefEnv = "CLONE_GIT_REF" // CloneInitContainerName holds the name of the init container that obtains // a copy of the code at a specific point in time. CloneInitContainerName = "clone" // CloneRepoEnv specifies the name of the env variable that contains the git // repository to clone. CloneRepoEnv = "CLONE_REPO" // ComponentNameLabel is a label used to distinguish between test // components with the same role. ComponentNameLabel = "loadtest-component" // DriverRole is the value the controller expects for the RoleLabel // on a driver component. DriverRole = "driver" // LoadTestLabel is a label which contains the test's unique name. LoadTestLabel = "loadtest" // ReadyInitContainerName holds the name of the init container that blocks a // driver from running until all worker pods are ready. ReadyInitContainerName = "ready" // ReadyMountPath is the absolute path where the ready volume should be // mounted in both the ready init container and the driver's run container. ReadyMountPath = "/var/data/qps_workers" // ReadyOutputFile is the name of the file where the ready init container // should write all IP addresses and port numbers for ready workers. ReadyOutputFile = ReadyMountPath + "/addresses" // ReadyVolumeName is the name of the volume that permits sharing files // between the ready init container and the driver's run container. ReadyVolumeName = "worker-addresses" // RoleLabel is a label with the role of a test component. For // example, "loadtest-role=server" indicates a server component. RoleLabel = "loadtest-role" // RunContainerName holds the name of the main container where the test is // executed. RunContainerName = "run" // ScenariosFileEnv specifies the name of an env variable that specifies the // path to a JSON file with scenarios. ScenariosFileEnv = "SCENARIOS_FILE" // ScenariosMountPath specifies where the JSON file with the scenario should // be mounted in the driver container. ScenariosMountPath = "/src/scenarios" // ServerRole is the value the controller expects for the RoleLabel // on a server component. ServerRole = "server" // WorkspaceMountPath contains the path to mount the volume identified by // `workspaceVolume`. WorkspaceMountPath = "/src/workspace" // WorkspaceVolumeName contains the name of the volume that is shared between // the init containers and containers for a driver or worker pod. WorkspaceVolumeName = "workspace" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Defaults ¶
type Defaults struct {
// ComponentNamespace is the default namespace for load test components. Note
// this is not the namespace for the manager.
ComponentNamespace string `json:"componentNamespace"`
// DriverPool is the name of a pool where driver components should
// be scheduled by default.
DriverPool string `json:"driverPool"`
// WorkerPool is the name of a pool where server and client
// components should be scheduled by default.
WorkerPool string `json:"workerPool"`
// DriverPort is the port through which the driver and workers
// communicate.
DriverPort int32 `json:"driverPort"`
// ServerPort is the port through which a server component accepts
// traffic from a client component.
ServerPort int32 `json:"serverPort"`
// CloneImage specifies the default container image to use for
// cloning Git repositories at a specific snapshot.
CloneImage string `json:"cloneImage"`
// ReadyImage specifies the container image to use to block the driver from
// starting before all worker pods are ready.
ReadyImage string `json:"readyImage"`
// DriverImage specifies a default driver image. This image will
// be used to orchestrate a test.
DriverImage string `json:"driverImage"`
// Languages specifies the default build and run container images
// for each known language.
Languages []LanguageDefault `json:"languages,omitempty"`
}
Defaults defines the default settings for the system.
func (*Defaults) SetLoadTestDefaults ¶
SetLoadTestDefaults applies default values for missing fields that are required to reconcile a load test.
This returns an error if the system has no viable default. For example, the system cannot infer a run image for "fortran" if a build image was not declared for this language in the Defaults object.
type LanguageDefault ¶
type LanguageDefault struct {
// Language uniquely identifies a programming language. When the
// system encounters this name, it will select the build image and
// run image as the defaults.
Language string `json:"language"`
// BuildImage specifies the default container image for building or
// assembling an executable or bundle for a language. This image
// likely contains a compiler and any required libraries for
// compilation.
BuildImage string `json:"buildImage"`
// RunImage specifies the default container image for the
// environment for the runtime of the test. It should provide any
// necessary interpreters or dependencies to run or use the output
// of the build image.
RunImage string `json:"runImage"`
}
LanguageDefault defines a programming language, as well as its default container images.
Click to show internal directories.
Click to hide internal directories.