deployer

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AKE    = "ake"    // Microsoft’s Azure Kubernetes Service
	EKS    = "eks"    // Amazon’s Elastic Kubernetes Service
	GKE    = "gke"    // Google’s Kubernetes Engine
	K8S    = "k8s"    // vanilla kubernetes
	DOCKER = "docker" // docker or docker compose; only for local dev
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployer

type Deployer interface {
	Initialize(string, string) error
	Install(string, string) error
	Uninstall(string) error
	List() error
	MonitorTask(jobId, taskId string)
	DeleteTaskFromMonitoring(taskId string)
	GetMonitoredPodStatuses() (map[string]TaskHealthDetails, error)
}

func NewDeployer

func NewDeployer(platform string) (Deployer, error)

type DockerDeployer

type DockerDeployer struct{}

NOTE: DockerDeployer doesn't support dynamic deployment as docker and

docker-compose are only for local development purpose

func NewDockerDeployer

func NewDockerDeployer() (*DockerDeployer, error)

func (*DockerDeployer) DeleteTaskFromMonitoring added in v0.2.3

func (deployer *DockerDeployer) DeleteTaskFromMonitoring(taskId string)

func (*DockerDeployer) GetMonitoredPodStatuses added in v0.2.3

func (deployer *DockerDeployer) GetMonitoredPodStatuses() (map[string]TaskHealthDetails, error)

func (*DockerDeployer) Initialize

func (deployer *DockerDeployer) Initialize(_ string, _ string) error

func (*DockerDeployer) Install

func (deployer *DockerDeployer) Install(_ string, _ string) error

func (*DockerDeployer) List

func (deployer *DockerDeployer) List() error

func (*DockerDeployer) MonitorTask added in v0.2.3

func (deployer *DockerDeployer) MonitorTask(jobId, taskId string)

func (*DockerDeployer) Uninstall

func (deployer *DockerDeployer) Uninstall(_ string) error

type K8sDeployer

type K8sDeployer struct {

	// Pods to monitor that are running until it's finished
	// taskID => task details
	DeployedTasks map[string]TaskHealthDetails
	// contains filtered or unexported fields
}

func NewK8sDeployer

func NewK8sDeployer() (*K8sDeployer, error)

func (*K8sDeployer) DeleteTaskFromMonitoring added in v0.2.3

func (deployer *K8sDeployer) DeleteTaskFromMonitoring(taskId string)

func (*K8sDeployer) GetMonitoredPodStatuses added in v0.2.3

func (deployer *K8sDeployer) GetMonitoredPodStatuses() (map[string]TaskHealthDetails, error)

func (*K8sDeployer) Initialize

func (deployer *K8sDeployer) Initialize(clusterName string, namespace string) error

func (*K8sDeployer) Install

func (deployer *K8sDeployer) Install(releaseName string, chartPath string) error

func (*K8sDeployer) List

func (deployer *K8sDeployer) List() error

func (*K8sDeployer) MonitorTask added in v0.2.3

func (deployer *K8sDeployer) MonitorTask(jobId, taskId string)

func (*K8sDeployer) Uninstall

func (deployer *K8sDeployer) Uninstall(releaseName string) error

type TaskHealthDetails added in v0.2.3

type TaskHealthDetails struct {
	JobID        string       `json:"job"`
	TaskID       string       `json:"task"`
	Status       v1.PodStatus `json:"status"`
	JobName      string       `json:"job_name"`
	CreationTime time.Time    `json:"creation_time"`
	UnknownCount int
}

Jump to

Keyboard shortcuts

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