Documentation ¶
Index ¶
- Constants
- Variables
- type ByRevision
- type ContainerLimits
- type DeployConfigFiles
- type DeployOperations
- func (ops *DeployOperations) Deploy(user *database.User, appName string, tarBall io.ReadSeeker, description string, ...) (io.ReadCloser, error)
- func (ops *DeployOperations) List(user *database.User, appName string) ([]*ReplicaSetListItem, error)
- func (ops *DeployOperations) Rollback(user *database.User, appName, revision string) error
- type DeploySpec
- type FakeOperations
- func (f *FakeOperations) Deploy(user *database.User, appName string, tarBall io.ReadSeeker, description string, ...) (io.ReadCloser, error)
- func (f *FakeOperations) List(user *database.User, appName string) ([]*ReplicaSetListItem, error)
- func (f *FakeOperations) Rollback(user *database.User, appName, revision string) error
- type HealthCheck
- type HealthCheckProbe
- type K8sOperations
- type Lifecycle
- type Operations
- type Options
- type PodSpec
- type PodVolumeMountsSpec
- type PodVolumeSpec
- type PreStop
- type Procfile
- type ReplicaSetListItem
- type RollingUpdate
- type Service
- func (s *Service) List(ctx context.Context, req *dpb.ListRequest) (*dpb.ListResponse, error)
- func (s *Service) Make(stream dpb.Deploy_MakeServer) error
- func (s *Service) RegisterService(grpcServer *grpc.Server)
- func (s *Service) Rollback(ctx context.Context, req *dpb.RollbackRequest) (*dpb.Empty, error)
- type TeresaYaml
Constants ¶
View Source
const DefaultPort = 5000
View Source
const (
ProcfileFileName = "Procfile"
)
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 ByRevision ¶ added in v0.8.0
type ByRevision []*dpb.ListResponse_Deploy
func (ByRevision) Len ¶ added in v0.8.0
func (s ByRevision) Len() int
func (ByRevision) Less ¶ added in v0.8.0
func (s ByRevision) Less(i, j int) bool
func (ByRevision) Swap ¶ added in v0.8.0
func (s ByRevision) Swap(i, j int)
type ContainerLimits ¶ added in v0.6.0
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)
func (*DeployOperations) List ¶ added in v0.8.0
func (ops *DeployOperations) List(user *database.User, appName string) ([]*ReplicaSetListItem, error)
type DeploySpec ¶
type DeploySpec struct { PodSpec TeresaYaml RevisionHistoryLimit int Description string SlugURL string }
type FakeOperations ¶ added in v0.8.0
func (*FakeOperations) Deploy ¶ added in v0.8.0
func (f *FakeOperations) Deploy(user *database.User, appName string, tarBall io.ReadSeeker, description string, opts *Options) (io.ReadCloser, error)
func (*FakeOperations) List ¶ added in v0.8.0
func (f *FakeOperations) List(user *database.User, appName string) ([]*ReplicaSetListItem, error)
type HealthCheck ¶
type HealthCheck struct { Liveness *HealthCheckProbe Readiness *HealthCheckProbe }
type HealthCheckProbe ¶
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 ReplicaSetListByLabel(namespace, label, value string) ([]*ReplicaSetListItem, error) DeployRollbackToRevision(namespace, name, revision string) error }
type Operations ¶
type Operations interface { Deploy(user *database.User, appName string, tarBall io.ReadSeeker, description string, opts *Options) (io.ReadCloser, error) List(user *database.User, appName string) ([]*ReplicaSetListItem, error) Rollback(user *database.User, appName, revision string) error }
func NewDeployOperations ¶
func NewDeployOperations(aOps app.Operations, k8s K8sOperations, s st.Storage) Operations
func NewFakeOperations ¶ added in v0.8.0
func NewFakeOperations() 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:v3.0.0"` SlugRunnerImage string `split_words:"true" default:"luizalabs/slugrunner:v2.4.0"` BuildLimitCPU string `split_words:"true" default:"800m"` BuildLimitMemory string `split_words:"true" default:"1Gi"` }
type PodSpec ¶
type PodSpec struct { Name string Namespace string Image string ContainerLimits *ContainerLimits Env map[string]string VolumeMounts []*PodVolumeMountsSpec Volume []*PodVolumeSpec Args []string }
type PodVolumeMountsSpec ¶
type PodVolumeSpec ¶
type PreStop ¶
type PreStop struct {
DrainTimeoutSeconds int `yaml:"drainTimeoutSeconds,omitempty"`
}
type ReplicaSetListItem ¶ added in v0.8.0
type RollingUpdate ¶
type RollingUpdate struct { MaxSurge string `yaml:"maxSurge,omitempty"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ops Operations, options *Options) *Service
func (*Service) List ¶ added in v0.8.0
func (s *Service) List(ctx context.Context, req *dpb.ListRequest) (*dpb.ListResponse, error)
func (*Service) RegisterService ¶
type TeresaYaml ¶
type TeresaYaml struct { HealthCheck *HealthCheck `yaml:"healthCheck,omitempty"` RollingUpdate *RollingUpdate `yaml:"rollingUpdate,omitempty"` Lifecycle *Lifecycle `yaml:"lifecycle,omitempty"` }
Click to show internal directories.
Click to hide internal directories.