Documentation ¶
Index ¶
- Constants
- Variables
- type Dispatcher
- func (m *Dispatcher) AddFilesToPod(ctx context.Context, pod *v1.Pod, filesMap map[string]string) (*v1.Pod, []v1.VolumeMount, error)
- func (d *Dispatcher) DeployNodeSet(ctx context.Context, wg *sync.WaitGroup, ns *playbook.NodeSet)
- func (d *Dispatcher) DispatcherPod(imageName string) (*v1.Pod, error)
- func (d *Dispatcher) RedisIPPort(ctx context.Context) (string, int32, error)
- func (d *Dispatcher) RunTest()
- type Error
Constants ¶
View Source
const ( Cmd = "dispatcher" PodPrefix = "dispatcher" EnvWorkerImage = "WORKER_IMAGE" EnvUID = "DISPATCHER_UID" EnvNamespace = "NAMESPACE" )
View Source
const ( MinioServiceName = "minio-service" MinioServicePort = 9000 MinioServiceExternalPort = 30505 // some random port MinioDeploymentName = "minio" MinioImage = "minio/minio:RELEASE.2024-01-28T22-35-53Z" MinioStorageClassName = "standard" // standard | gp2 | default MinioVolumeClaimName = "minio-data" MinioVolumeMountPath = "/data" MinioPVCStorageSize = "1Gi" // TODO: WARNING: MINIO_ACCESS_KEY and MINIO_SECRET_KEY are deprecated. // TODO: Please use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD EnvMinioAccessKey = "MINIO_ACCESS_KEY" EnvMinioSecretKey = "MINIO_SECRET_KEY" )
View Source
const ( RedisImage = "redis:latest" RedisPort = 6379 RedisPassword = "redisPassword" RedisDB = "0" // the db to use RedisTotalDBs = "2" // the total number of databases )
Variables ¶
View Source
var ( ErrNilNodeSet = &Error{Code: "NilNodeSet", Message: "nil nodeset"} ErrNoWorkersInNodeSet = &Error{Code: "NoWorkersInNodeSet", Message: "no workers in nodeset"} ErrAddingFileToPod = &Error{Code: "AddingFileToPod", Message: "error adding file to pod"} ErrGettingDeployment = &Error{Code: "GettingDeployment", Message: "error getting deployment"} ErrCreatingDeployment = &Error{Code: "CreatingDeployment", Message: "error creating deployment"} ErrCreatingAutoScaler = &Error{Code: "CreatingAutoScaler", Message: "error creating autoscaler"} ErrWaitingForRedis = &Error{Code: "WaitingForRedis", Message: "error waiting for redis"} ErrWaitingForMinio = &Error{Code: "WaitingForMinio", Message: "error waiting for minio"} ErrCreatingService = &Error{Code: "CreatingService", Message: "error creating service"} ErrGettingService = &Error{Code: "GettingService", Message: "error getting service"} ErrWaitingForRedisService = &Error{Code: "WaitingForRedisService", Message: "error waiting for redis service"} ErrWaitingForMinioService = &Error{Code: "WaitingForMinioService", Message: "error waiting for minio service"} ErrTimeout = &Error{Code: "Timeout", Message: "timeout"} ErrFailedConnection = &Error{Code: "FailedConnection", Message: "failed connection"} ErrLoadBalancerIPNotAvailable = &Error{Code: "LoadBalancerIPNotAvailable", Message: "load balancer IP not available"} ErrGettingNodes = &Error{Code: "GettingNodes", Message: "error getting nodes"} ErrNoNodesFound = &Error{Code: "NoNodesFound", Message: "no nodes found"} ErrGettingMinioEndpoint = &Error{Code: "GettingMinioEndpoint", Message: "error getting minio endpoint"} ErrParsingStorageSize = &Error{Code: "ParsingStorageSize", Message: "error parsing storage size"} ErrListingPersistentVolumes = &Error{Code: "ListingPersistentVolumes", Message: "error listing persistent volumes"} ErrCreatingPersistentVolume = &Error{Code: "CreatingPersistentVolume", Message: "error creating persistent volume"} ErrCreatingPersistentVolumeClaim = &Error{Code: "CreatingPersistentVolumeClaim", Message: "error creating persistent volume claim"} )
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { Clientset kubernetes.Interface Namespace string Playbook playbook.Playbook WorkerImage string }
Dispatcher orchestrates the test and communicates with worker nodes.
func (*Dispatcher) AddFilesToPod ¶
func (m *Dispatcher) AddFilesToPod(ctx context.Context, pod *v1.Pod, filesMap map[string]string) (*v1.Pod, []v1.VolumeMount, error)
AddFilesToPod adds files to a pod and returns the updated pod and the volume mounts. The files are added to the pod as a ConfigMap. The mount points are determined by the `values` of the filesMap. Please note that, the files must be small in size, as they are stored in the ConfigMap. For large files, we should use either Minio or copy them directly into the docker image.
func (*Dispatcher) DeployNodeSet ¶
func (*Dispatcher) DispatcherPod ¶
func (d *Dispatcher) DispatcherPod(imageName string) (*v1.Pod, error)
func (*Dispatcher) RedisIPPort ¶
func (*Dispatcher) RunTest ¶
func (d *Dispatcher) RunTest()
RunTest executes the large-scale blockchain test.
Click to show internal directories.
Click to hide internal directories.