spec

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 6 Imported by: 24

Documentation

Index

Constants

View Source
const (
	DefaultPort = 5000

	SlugAnnotation = "teresa.io/slug"

	DefaultExternalPort = 80
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Container added in v0.16.0

type Container struct {
	Name            string
	Image           string
	ContainerLimits *ContainerLimits
	Env             map[string]string
	VolumeMounts    []*VolumeMounts
	Command         []string
	Args            []string
	Ports           []Port
	Secrets         []string
}

type ContainerLimits

type ContainerLimits struct {
	CPU    string
	Memory string
}

type CronArgs added in v0.16.0

type CronArgs struct {
	Schedule string `yaml:"schedule",omitempty"`
}

type CronJob added in v0.16.0

type CronJob struct {
	Deploy
	Schedule                   string
	SuccessfulJobsHistoryLimit int32
	FailedJobsHistoryLimit     int32
}

func NewCronJob added in v0.16.0

func NewCronJob(description, slugURL, schedule string, imgs *Images, a *app.App, fs storage.Storage, args ...string) *CronJob

type Deploy

type Deploy struct {
	Pod
	TeresaYaml
	RevisionHistoryLimit int
	Description          string
	SlugURL              string
}

func NewDeploy

func NewDeploy(imgs *Images, description, slugURL string, rhl int, a *app.App, tYaml *TeresaYaml, fs storage.Storage) *Deploy

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 Images added in v0.17.0

type Images struct {
	SlugRunner  string
	SlugBuilder string
	SlugStore   string
	Nginx       string
}

type Labels added in v0.20.0

type Labels map[string]string

type Lifecycle

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

type Pod

type Pod struct {
	Name           string
	Namespace      string
	Containers     []*Container
	Volumes        []*Volume
	InitContainers []*Container
	Labels         Labels
}

func NewBuilder

func NewBuilder(name, tarBallLocation, buildDest, image string, a *app.App, fs storage.Storage, cl *ContainerLimits) *Pod

func NewPod

func NewPod(name, nginxImage, image string, a *app.App, envVars map[string]string, fs storage.Storage) *Pod

func NewRunner

func NewRunner(name, slugURL string, imgs *Images, a *app.App, fs storage.Storage, cl *ContainerLimits, command ...string) *Pod

type Port added in v0.17.0

type Port struct {
	Name          string
	ContainerPort int32
}

type PreStop

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

type RollingUpdate

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

type Service added in v0.20.0

type Service struct {
	Name      string
	Namespace string
	Type      string
	Labels    map[string]string
	Ports     []ServicePort
}

func NewDefaultService added in v0.20.0

func NewDefaultService(appName, sType, portName string) *Service

func NewService added in v0.20.0

func NewService(namespace, name, sType string, ports []ServicePort, labels map[string]string) *Service

type ServicePort added in v0.20.0

type ServicePort struct {
	Name       string
	Port       int
	TargetPort int
}

func NewDefaultServicePort added in v0.20.0

func NewDefaultServicePort(name string) *ServicePort

func NewServicePort added in v0.20.0

func NewServicePort(name string, port, targetPort int) *ServicePort

type TeresaYaml

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

type Volume added in v0.16.0

type Volume struct {
	Name          string
	SecretName    string
	ConfigMapName string
	EmptyDir      bool
}

type VolumeMounts added in v0.16.0

type VolumeMounts struct {
	Name      string
	MountPath string
	ReadOnly  bool
}

Jump to

Keyboard shortcuts

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