jobs_echo

package module
v0.0.0-...-6d46272 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 27 Imported by: 1

Documentation

Overview

Package jobs_echo installs a simple echo Pod with Job or CronJob. Replace https://github.com/aws/aws-k8s-tester/tree/v1.5.9/eks/jobs-echo. Replace https://github.com/aws/aws-k8s-tester/tree/v1.5.9/eks/cron-jobs.

Index

Constants

View Source
const (
	DefaultMinimumNodes               int    = 1
	DefaultJobType                    string = "Job"
	DefaultCompletes                  int32  = 10
	DefaultParallels                  int32  = 10
	DefaultEchoSize                   int32  = 100 * 1024
	DefaultSchedule                   string = "*/10 * * * *" // every 10-min
	DefaultSuccessfulJobsHistoryLimit int32  = 10
	DefaultFailedJobsHistoryLimit     int32  = 10
)

writes total 100 MB data to etcd Completes: 1000, Parallels: 100, EchoSize: 100 * 1024, // 100 KB

Variables

This section is empty.

Functions

func Env

func Env(jobType string) string

func EnvRepository

func EnvRepository(jobType string) string

func New

func New(cfg *Config) k8s_tester.Tester

Types

type Config

type Config struct {
	Enable bool `json:"enable"`
	Prompt bool `json:"-"`

	Stopc     chan struct{} `json:"-"`
	Logger    *zap.Logger   `json:"-"`
	LogWriter io.Writer     `json:"-"`
	Client    client.Client `json:"-"`

	// MinimumNodes is the minimum number of Kubernetes nodes required for installing this addon.
	MinimumNodes int `json:"minimum_nodes"`
	// Namespace to create test resources.
	Namespace string `json:"namespace"`

	// Repository defines a custom ECR image repository.
	// For "busybox".
	Repository *aws_v1_ecr.Repository `json:"repository,omitempty"`

	// JobType is either "Job" or "CronJob".
	JobType string `json:"job_type"`

	// Completes is the desired number of successfully finished pods.
	Completes int32 `json:"completes"`
	// Parallels is the the maximum desired number of pods the
	// job should run at any given time.
	Parallels int32 `json:"parallels"`
	// EchoSize is the job object size in bytes.
	// "Request entity too large: limit is 3145728" (3.1 MB).
	// "The Job "echo" is invalid: metadata.annotations:
	// Too long: must have at most 262144 characters". (0.26 MB)
	EchoSize int32 `json:"echo_size"`

	// Schedule is the CronJob schedule.
	Schedule string `json:"schedule"`
	// SuccessfulJobsHistoryLimit is the number of successful finished CronJobs to retain.
	SuccessfulJobsHistoryLimit int32 `json:"successful_jobs_history_limit"`
	// FailedJobsHistoryLimit is the number of failed finished CronJobs to retain.
	FailedJobsHistoryLimit int32 `json:"failed_jobs_history_limit"`
}

Config defines Job/CronJob spec.

func NewDefault

func NewDefault(jobType string) *Config

func (*Config) ValidateAndSetDefaults

func (cfg *Config) ValidateAndSetDefaults() error

Directories

Path Synopsis
cmd
k8s-tester-jobs-echo
k8s-tester-jobs-echo installs Kubernetes Jobs echo tester.
k8s-tester-jobs-echo installs Kubernetes Jobs echo tester.

Jump to

Keyboard shortcuts

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