deploy

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: Apache-2.0 Imports: 21 Imported by: 16

Documentation

Index

Constants

View Source
const (
	TeresaYamlFileName = "teresa.yaml"
	ProcfileFileName   = "Procfile"
)
View Source
const (
	DefaultPort = 5000
)
View Source
const ProcfileReleaseCmd = "release"

Variables

View Source
var (
	ErrPodRunFail            = status.Errorf(codes.Unknown, "Run command returned a non zero value")
	ErrBuildFail             = status.Errorf(codes.Unknown, "Build returned a non zero value")
	ErrReleaseFail           = status.Errorf(codes.Unknown, "Release command returned a non zero value")
	ErrInvalidTeresaYamlFile = status.Errorf(codes.InvalidArgument, "Invalid Teresa Yaml file")
)

Functions

This section is empty.

Types

type DeployConfigFiles

type DeployConfigFiles struct {
	TeresaYaml *TeresaYaml
	Procfile   Procfile
}

type DeployOperations

type DeployOperations struct {
	// contains filtered or unexported fields
}

func (*DeployOperations) Deploy

func (ops *DeployOperations) Deploy(user *database.User, appName string, tarBall io.ReadSeeker, description string, opts *Options) (io.ReadCloser, error)

type DeploySpec

type DeploySpec struct {
	PodSpec
	TeresaYaml
	RevisionHistoryLimit int
	Description          string
	SlugURL              string
}

type HealthCheck

type HealthCheck struct {
	Liveness  *HealthCheckProbe
	Readiness *HealthCheckProbe
}

type HealthCheckProbe

type HealthCheckProbe struct {
	FailureThreshold    int32  `yaml:"failureThreshold"`
	InitialDelaySeconds int32  `yaml:"initialDelaySeconds"`
	PeriodSeconds       int32  `yaml:"periodSeconds"`
	SuccessThreshold    int32  `yaml:"successThreshold"`
	TimeoutSeconds      int32  `yaml:"timeoutSeconds"`
	Path                string `yaml:"path"`
}

type K8sOperations

type K8sOperations interface {
	PodRun(podSpec *PodSpec) (io.ReadCloser, <-chan int, error)
	CreateOrUpdateDeploy(deploySpec *DeploySpec) error
	HasService(namespace, name string) (bool, error)
	CreateService(namespace, name string) error
}

type Lifecycle

type Lifecycle struct {
	PreStop *PreStop `yaml:"preStop,omitempty"`
}

type Operations

type Operations interface {
	Deploy(user *database.User, appName string, tarBall io.ReadSeeker, description string, opts *Options) (io.ReadCloser, error)
}

func NewDeployOperations

func NewDeployOperations(aOps app.Operations, k8s K8sOperations, s st.Storage) Operations

type Options

type Options struct {
	KeepAliveTimeout     time.Duration `split_words:"true" default:"30s"`
	RevisionHistoryLimit int           `split_words:"true" default:"5"`
	SlugBuilderImage     string        `split_words:"true" default:"luizalabs/slugbuilder:v2.5.0"`
	SlugRunnerImage      string        `split_words:"true" default:"luizalabs/slugrunner:v2.4.0"`
}

type PodSpec

type PodSpec struct {
	Name         string
	Namespace    string
	Image        string
	Env          map[string]string
	VolumeMounts []*PodVolumeMountsSpec
	Volume       []*PodVolumeSpec
	Args         []string
}

type PodVolumeMountsSpec

type PodVolumeMountsSpec struct {
	Name      string
	MountPath string
	ReadOnly  bool
}

type PodVolumeSpec

type PodVolumeSpec struct {
	Name       string
	SecretName string
}

type PreStop

type PreStop struct {
	DrainTimeoutSeconds int `yaml:"drainTimeoutSeconds,omitempty"`
}

type Procfile

type Procfile map[string]string

type RollingUpdate

type RollingUpdate struct {
	MaxSurge       string `yaml:"maxSurge,omitempty"`
	MaxUnavailable string `yaml:"maxUnavailable,omitempty"`
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(ops Operations, options *Options) *Service

func (*Service) Make

func (s *Service) Make(stream dpb.Deploy_MakeServer) error

func (*Service) RegisterService

func (s *Service) RegisterService(grpcServer *grpc.Server)

type TeresaYaml

type TeresaYaml struct {
	HealthCheck   *HealthCheck   `yaml:"healthCheck,omitempty"`
	RollingUpdate *RollingUpdate `yaml:"rollingUpdate,omitempty"`
	Lifecycle     *Lifecycle     `yaml:"lifecycle,omitempty"`
}

Jump to

Keyboard shortcuts

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