Documentation ¶
Index ¶
- Variables
- func BuildClientset(kubeCfgPath string) (*kubernetes.Clientset, error)
- func CreateTempFileWithContent(data []byte) (_name string, _cleanup func() error, retErr error)
- func DeployAndRepeatRollingUpdateDeployments(ctx context.Context, kubeCfgPath string, releaseName string, ...) (rollingUpdateFn, cleanupFn func(), retErr error)
- func DeployRunnerGroup(ctx context.Context, kubeCfgPath, runnerImage, rgCfgFile string, ...) (*types.RunnerGroupsReport, error)
- func FetchAPIServerCores(ctx context.Context, kubeCfgPath string) (map[string]int, error)
- func FetchNodeProviderIDByType(ctx context.Context, kubeCfgPath string, instanceType string) (string, error)
- func NSLookup(domainURL string) ([]string, error)
- func NewLoadProfileFromEmbed(target string, tweakFn func(*types.RunnerGroupSpec) error) (_name string, _cleanup func() error, _ error)
- func RepeatJobWith3KPod(ctx context.Context, kubeCfgPath string, namespace string, ...)
- type KperfRunner
- func (kr *KperfRunner) DeleteNodepool(ctx context.Context, timeout time.Duration, name string) error
- func (kr *KperfRunner) NewNodepool(ctx context.Context, timeout time.Duration, name string, nodes int, ...) error
- func (kr *KperfRunner) RGDelete(ctx context.Context, timeout time.Duration) error
- func (kr *KperfRunner) RGResult(ctx context.Context, timeout time.Duration) (string, error)
- func (kr *KperfRunner) RGRun(ctx context.Context, timeout time.Duration, ...) error
- type KubectlRunner
- func (kr *KubectlRunner) Apply(ctx context.Context, timeout time.Duration, filePath string) error
- func (kr *KubectlRunner) CreateNamespace(ctx context.Context, timeout time.Duration, name string) error
- func (kr *KubectlRunner) Delete(ctx context.Context, timeout time.Duration, filePath string) error
- func (kr *KubectlRunner) DeleteNamespace(ctx context.Context, timeout time.Duration, name string) error
- func (kr *KubectlRunner) DeploymentRestart(ctx context.Context, timeout time.Duration, name string) error
- func (kr *KubectlRunner) DeploymentRolloutStatus(ctx context.Context, timeout time.Duration, name string) error
- func (kr *KubectlRunner) FQDN(ctx context.Context, timeout time.Duration) (string, error)
- func (kr *KubectlRunner) Metrics(ctx context.Context, timeout time.Duration, fqdn, ip string) ([]byte, error)
- func (kr *KubectlRunner) Wait(ctx context.Context, timeout time.Duration, ...) error
Constants ¶
This section is empty.
Variables ¶
var ( // EKSIdleNodepoolInstanceType is the instance type of idle nodepool. // // NOTE: The EKS cloud provider will delete all the NOT-READY nodes // which aren't managed by it. When kwok-controller fails to update // virtual node's lease, the EKS cloud provider would delete that // virtual node. It's unexpected behavior. In order to avoid this case, // we should create a idle nodepool with one node and use that node's // provider ID for all the virtual nodes so that EKS cloud provider // won't delete our virtual nodes. EKSIdleNodepoolInstanceType = "m4.large" // EKSRunnerNodepoolInstanceType is the instance type of nodes for kperf // runners. // // NOTE: This is default type. Please align it with ../manifests/loadprofile/ekswarmup.yaml. EKSRunnerNodepoolInstanceType = "m4.4xlarge" )
Functions ¶
func BuildClientset ¶ added in v0.1.0
func BuildClientset(kubeCfgPath string) (*kubernetes.Clientset, error)
BuildClientset returns kubernetes clientset.
func CreateTempFileWithContent ¶
CreateTempFileWithContent creates temporary file with data.
func DeployAndRepeatRollingUpdateDeployments ¶ added in v0.1.0
func DeployAndRepeatRollingUpdateDeployments( ctx context.Context, kubeCfgPath string, releaseName string, total, replica, paddingBytes int, internal time.Duration, ) (rollingUpdateFn, cleanupFn func(), retErr error)
DeployAndRepeatRollingUpdateDeployments deploys and repeats to rolling-update deployments.
func DeployRunnerGroup ¶
func DeployRunnerGroup(ctx context.Context, kubeCfgPath, runnerImage, rgCfgFile string, runnerFlowControl, runnerGroupAffinity string) (*types.RunnerGroupsReport, error)
DeployRunnerGroup deploys runner group for benchmark.
func FetchAPIServerCores ¶
FetchAPIServerCores fetchs core number for each kube-apiserver.
func FetchNodeProviderIDByType ¶
func FetchNodeProviderIDByType(ctx context.Context, kubeCfgPath string, instanceType string) (string, error)
FetchNodeProviderIDByType is used to get one node's provider id with a given instance type.
func NewLoadProfileFromEmbed ¶
func NewLoadProfileFromEmbed(target string, tweakFn func(*types.RunnerGroupSpec) error) (_name string, _cleanup func() error, _ error)
NewLoadProfileFromEmbed reads load profile from embed memory.
Types ¶
type KperfRunner ¶
type KperfRunner struct {
// contains filtered or unexported fields
}
KperfRunner is the wrapper of exec.Command to execute kperf command.
func NewKperfRunner ¶
func NewKperfRunner(kubeCfgPath string, runnerImage string) *KperfRunner
func (*KperfRunner) DeleteNodepool ¶
func (kr *KperfRunner) DeleteNodepool(ctx context.Context, timeout time.Duration, name string) error
DeleteNodepool deletes a virtual nodepool by a given name.
func (*KperfRunner) NewNodepool ¶
func (kr *KperfRunner) NewNodepool( ctx context.Context, timeout time.Duration, name string, nodes int, cpu, memory, maxPods int, affinity string, sharedProviderID string, ) error
NewNodepool creates new virtual nodepool.
type KubectlRunner ¶
type KubectlRunner struct {
// contains filtered or unexported fields
}
KubectlRunner is the wrapper of exec.Command to execute kubectl command.
func NewKubectlRunner ¶
func NewKubectlRunner(kubeCfgPath string, namespace string) *KubectlRunner
func (*KubectlRunner) CreateNamespace ¶
func (kr *KubectlRunner) CreateNamespace(ctx context.Context, timeout time.Duration, name string) error
CreateNamespace creates a new namespace.
func (*KubectlRunner) DeleteNamespace ¶
func (kr *KubectlRunner) DeleteNamespace(ctx context.Context, timeout time.Duration, name string) error
DeleteNamespace delete a namespace.
func (*KubectlRunner) DeploymentRestart ¶ added in v0.0.9
func (kr *KubectlRunner) DeploymentRestart(ctx context.Context, timeout time.Duration, name string) error
DeploymentRestart restats a deployment.
func (*KubectlRunner) DeploymentRolloutStatus ¶ added in v0.0.9
func (kr *KubectlRunner) DeploymentRolloutStatus(ctx context.Context, timeout time.Duration, name string) error
DeploymentRolloutStatus watches the rollout status of a deployment.