kubernetes

package
v0.0.0-...-519dc3d Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArchitectureKey     = "architecture"
	AppLabelKey         = "omni-orchestrator"
	AppLabelValue       = "true"
	AnnotationService   = "omni-tag/service"
	AnnotationDomain    = "omni-tag/domain"
	AnnotationTask      = "omni-tag/task"
	AnnotationArch      = "omni-tag/architecture"
	DefaultSyncInterval = 3
	DefaultEventChannel = 200
)
View Source
const (
	PluginName = "kubernetes"
)

Variables

This section is empty.

Functions

func NewEngine

func NewEngine(config appconfig.Engine, logger *zap.Logger) (common.JobEngine, error)

Types

type BuildImagePackages

type BuildImagePackages struct {
	Packages []string `json:"packages"`
}

type Engine

type Engine struct {
	sync.Mutex

	JobWatchMap  sync.Map
	JobPluginMap map[string]plugins.JobHandler
	// contains filtered or unexported fields
}

func (*Engine) Close

func (e *Engine) Close()

func (*Engine) CollectSteps

func (e *Engine) CollectSteps(jobID common.JobIdentity, job *batchv1.Job) []common.Step

func (*Engine) ConfigmapAddEvent

func (e *Engine) ConfigmapAddEvent(obj interface{})

func (*Engine) ConvertToNamespace

func (e *Engine) ConvertToNamespace(domain string) string

func (*Engine) CreateJob

func (e *Engine) CreateJob(ctx context.Context, job *common.Job) error

func (*Engine) CreateNamespaceIfNeeded

func (e *Engine) CreateNamespaceIfNeeded(id *common.JobIdentity) error

func (*Engine) DeleteJob

func (e *Engine) DeleteJob(ctx context.Context, jobID common.JobIdentity) error

func (*Engine) DeleteJobRelatedResource

func (e *Engine) DeleteJobRelatedResource(jobID *common.JobIdentity)

func (*Engine) FetchJobStepLog

func (e *Engine) FetchJobStepLog(ctx context.Context, jobID common.JobIdentity, stepName string) (io.ReadCloser, error)

func (*Engine) GetClientSet

func (e *Engine) GetClientSet(attrs map[string]string) *kubernetes.Clientset

func (*Engine) GetJobEventChannel

func (e *Engine) GetJobEventChannel() <-chan common.JobIdentity

func (*Engine) GetJobHandler

func (e *Engine) GetJobHandler(task string) (plugins.JobHandler, error)

func (*Engine) GetJobStatus

func (e *Engine) GetJobStatus(ctx context.Context, job common.Job) (*common.Job, error)

func (*Engine) GetKubernetesJobIdentity

func (e *Engine) GetKubernetesJobIdentity(job *common.Job, architecture string) common.JobIdentity

func (*Engine) GetName

func (e *Engine) GetName() string

func (*Engine) GetReloadDirs

func (e *Engine) GetReloadDirs() []string

func (*Engine) GetSupportedJobs

func (e *Engine) GetSupportedJobs() []string

func (*Engine) Initialize

func (e *Engine) Initialize() error

func (*Engine) JobAddEvent

func (e *Engine) JobAddEvent(obj interface{})

func (*Engine) JobDeleteEvent

func (e *Engine) JobDeleteEvent(obj interface{})

func (*Engine) JobUpdateEvent

func (e *Engine) JobUpdateEvent(old interface{}, new interface{})

func (*Engine) PodUpdateEvent

func (e *Engine) PodUpdateEvent(old interface{}, new interface{})

func (*Engine) Reload

func (e *Engine) Reload()

func (*Engine) StartLoop

func (e *Engine) StartLoop() error

func (*Engine) TriggerJobEvent

func (e *Engine) TriggerJobEvent(namespace, name string, annotations map[string]string)

func (*Engine) TriggerJobEventOnce

func (e *Engine) TriggerJobEventOnce(job *batchv1.Job)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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