Documentation ¶
Index ¶
- Constants
- func MountConfigMapInSideCar(name, path, configMapName string) func(*PodBuilder)
- func MountSecretInAppContainer(name, path, secretName string) func(*PodBuilder)
- func MountSecretInInitContainer(name, path, secretName string) func(*PodBuilder)
- func MountSecretItemsInAppContainer(name, path, secretName string, items []string) func(*PodBuilder)
- func ShareVolumeBetweenAppAndInitContainer(name, path string) func(*PodBuilder)
- func ShareVolumeBetweenAppAndSideCar(name, path string) func(*PodBuilder)
- func SwitchPortWithAppContainer(b *PodBuilder)
- type BuildPodBuilder
- func (b *BuildPodBuilder) Build() *Pod
- func (b *BuildPodBuilder) ForApp(a *app.App) *BuildPodBuilder
- func (b *BuildPodBuilder) SendSlugTo(dest string) *BuildPodBuilder
- func (b *BuildPodBuilder) WithLimits(cpu, memory string) *BuildPodBuilder
- func (b *BuildPodBuilder) WithStorage(fs storage.Storage) *BuildPodBuilder
- func (b *BuildPodBuilder) WithTarBallPath(path string) *BuildPodBuilder
- type CloudSQLProxy
- type Container
- type ContainerBuilder
- func (b *ContainerBuilder) Build() *Container
- func (b *ContainerBuilder) ExposePort(name string, port int) *ContainerBuilder
- func (b *ContainerBuilder) WithArgs(args []string) *ContainerBuilder
- func (b *ContainerBuilder) WithCommand(cmd []string) *ContainerBuilder
- func (b *ContainerBuilder) WithEnv(ev map[string]string) *ContainerBuilder
- func (b *ContainerBuilder) WithLimits(cpu, memory string) *ContainerBuilder
- func (b *ContainerBuilder) WithSecrets(s []string) *ContainerBuilder
- func (b *ContainerBuilder) WithVolumeMount(name, mountPath, subPath string) *ContainerBuilder
- type ContainerLimits
- type CronArgs
- type CronJob
- type CronJobBuilder
- type Deploy
- type DeployBuilder
- func (b *DeployBuilder) Build() *Deploy
- func (b *DeployBuilder) WithDescription(desc string) *DeployBuilder
- func (b *DeployBuilder) WithMatchLabels(lb Labels) *DeployBuilder
- func (b *DeployBuilder) WithPod(p *Pod) *DeployBuilder
- func (b *DeployBuilder) WithRevisionHistoryLimit(rhl int) *DeployBuilder
- func (b *DeployBuilder) WithTeresaYaml(ty *TeresaYaml) *DeployBuilder
- type HealthCheck
- type HealthCheckProbe
- type Labels
- type Lifecycle
- type Pod
- type PodBuilder
- func (b *PodBuilder) Build() *Pod
- func (b *PodBuilder) WithAppContainer(cn *Container, options ...func(*PodBuilder)) *PodBuilder
- func (b *PodBuilder) WithInitContainer(cn *Container, options ...func(*PodBuilder)) *PodBuilder
- func (b *PodBuilder) WithLabels(lb Labels) *PodBuilder
- func (b *PodBuilder) WithSideCar(cn *Container, options ...func(*PodBuilder)) *PodBuilder
- type Port
- type PreStop
- type RawData
- type RollingUpdate
- type RunnerPodBuilder
- func (b *RunnerPodBuilder) Build() *Pod
- func (b *RunnerPodBuilder) ForApp(a *app.App) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithArgs(args []string) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithCloudSQLProxySideCar(csp *CloudSQLProxy) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithLabels(lb Labels) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithLimits(cpu, memory string) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithNginxSideCar(image string) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithSlug(url string) *RunnerPodBuilder
- func (b *RunnerPodBuilder) WithStorage(fs storage.Storage) *RunnerPodBuilder
- type Service
- type ServicePort
- type TeresaYaml
- type TeresaYamlV2
- type Volume
- type VolumeItem
- type VolumeMounts
Constants ¶
View Source
const ( DefaultPort = 5000 SlugAnnotation = "teresa.io/slug" DefaultExternalPort = 80 )
View Source
const AppSecretName = "secrets"
View Source
const (
NginxConfFile = "nginx.conf"
)
Variables ¶
This section is empty.
Functions ¶
func MountConfigMapInSideCar ¶
func MountConfigMapInSideCar(name, path, configMapName string) func(*PodBuilder)
func MountSecretInAppContainer ¶
func MountSecretInAppContainer(name, path, secretName string) func(*PodBuilder)
func MountSecretInInitContainer ¶
func MountSecretInInitContainer(name, path, secretName string) func(*PodBuilder)
func MountSecretItemsInAppContainer ¶
func MountSecretItemsInAppContainer(name, path, secretName string, items []string) func(*PodBuilder)
func ShareVolumeBetweenAppAndInitContainer ¶
func ShareVolumeBetweenAppAndInitContainer(name, path string) func(*PodBuilder)
func ShareVolumeBetweenAppAndSideCar ¶
func ShareVolumeBetweenAppAndSideCar(name, path string) func(*PodBuilder)
func SwitchPortWithAppContainer ¶
func SwitchPortWithAppContainer(b *PodBuilder)
Types ¶
type BuildPodBuilder ¶
type BuildPodBuilder struct {
// contains filtered or unexported fields
}
func NewBuildPodBuilder ¶
func NewBuildPodBuilder(name, image string) *BuildPodBuilder
func (*BuildPodBuilder) Build ¶
func (b *BuildPodBuilder) Build() *Pod
func (*BuildPodBuilder) ForApp ¶
func (b *BuildPodBuilder) ForApp(a *app.App) *BuildPodBuilder
func (*BuildPodBuilder) SendSlugTo ¶
func (b *BuildPodBuilder) SendSlugTo(dest string) *BuildPodBuilder
func (*BuildPodBuilder) WithLimits ¶
func (b *BuildPodBuilder) WithLimits(cpu, memory string) *BuildPodBuilder
func (*BuildPodBuilder) WithStorage ¶
func (b *BuildPodBuilder) WithStorage(fs storage.Storage) *BuildPodBuilder
func (*BuildPodBuilder) WithTarBallPath ¶
func (b *BuildPodBuilder) WithTarBallPath(path string) *BuildPodBuilder
type CloudSQLProxy ¶
type CloudSQLProxy struct { Instances string CredentialFile string `yaml:"credentialFile"` Image string `yaml:"-"` }
func NewCloudSQLProxy ¶
func NewCloudSQLProxy(img string, t *TeresaYaml) (*CloudSQLProxy, error)
type Container ¶
type Container struct { Name string Image string ContainerLimits *ContainerLimits Env map[string]string VolumeMounts []*VolumeMounts Command []string Args []string Ports []Port Secrets []string }
func NewCloudSQLProxyContainer ¶
func NewCloudSQLProxyContainer(csp *CloudSQLProxy, a *app.App) *Container
type ContainerBuilder ¶
type ContainerBuilder struct {
// contains filtered or unexported fields
}
func NewContainerBuilder ¶
func NewContainerBuilder(name, image string) *ContainerBuilder
func (*ContainerBuilder) Build ¶
func (b *ContainerBuilder) Build() *Container
func (*ContainerBuilder) ExposePort ¶
func (b *ContainerBuilder) ExposePort(name string, port int) *ContainerBuilder
func (*ContainerBuilder) WithArgs ¶
func (b *ContainerBuilder) WithArgs(args []string) *ContainerBuilder
func (*ContainerBuilder) WithCommand ¶
func (b *ContainerBuilder) WithCommand(cmd []string) *ContainerBuilder
func (*ContainerBuilder) WithEnv ¶
func (b *ContainerBuilder) WithEnv(ev map[string]string) *ContainerBuilder
func (*ContainerBuilder) WithLimits ¶
func (b *ContainerBuilder) WithLimits(cpu, memory string) *ContainerBuilder
func (*ContainerBuilder) WithSecrets ¶
func (b *ContainerBuilder) WithSecrets(s []string) *ContainerBuilder
func (*ContainerBuilder) WithVolumeMount ¶
func (b *ContainerBuilder) WithVolumeMount(name, mountPath, subPath string) *ContainerBuilder
type ContainerLimits ¶
type CronJobBuilder ¶
type CronJobBuilder struct {
// contains filtered or unexported fields
}
func NewCronJobBuilder ¶
func NewCronJobBuilder(slugURL string) *CronJobBuilder
func (*CronJobBuilder) Build ¶
func (b *CronJobBuilder) Build() *CronJob
func (*CronJobBuilder) WithDescription ¶
func (b *CronJobBuilder) WithDescription(description string) *CronJobBuilder
func (*CronJobBuilder) WithPod ¶
func (b *CronJobBuilder) WithPod(p *Pod) *CronJobBuilder
func (*CronJobBuilder) WithSchedule ¶
func (b *CronJobBuilder) WithSchedule(s string) *CronJobBuilder
type DeployBuilder ¶
type DeployBuilder struct {
// contains filtered or unexported fields
}
func NewDeployBuilder ¶
func NewDeployBuilder(slugURL string) *DeployBuilder
func (*DeployBuilder) Build ¶
func (b *DeployBuilder) Build() *Deploy
func (*DeployBuilder) WithDescription ¶
func (b *DeployBuilder) WithDescription(desc string) *DeployBuilder
func (*DeployBuilder) WithMatchLabels ¶
func (b *DeployBuilder) WithMatchLabels(lb Labels) *DeployBuilder
func (*DeployBuilder) WithPod ¶
func (b *DeployBuilder) WithPod(p *Pod) *DeployBuilder
func (*DeployBuilder) WithRevisionHistoryLimit ¶
func (b *DeployBuilder) WithRevisionHistoryLimit(rhl int) *DeployBuilder
func (*DeployBuilder) WithTeresaYaml ¶
func (b *DeployBuilder) WithTeresaYaml(ty *TeresaYaml) *DeployBuilder
type HealthCheck ¶
type HealthCheck struct { Liveness *HealthCheckProbe Readiness *HealthCheckProbe }
type HealthCheckProbe ¶
type PodBuilder ¶
type PodBuilder struct {
// contains filtered or unexported fields
}
func NewPodBuilder ¶
func NewPodBuilder(name, namespace string) *PodBuilder
func (*PodBuilder) Build ¶
func (b *PodBuilder) Build() *Pod
func (*PodBuilder) WithAppContainer ¶
func (b *PodBuilder) WithAppContainer(cn *Container, options ...func(*PodBuilder)) *PodBuilder
func (*PodBuilder) WithInitContainer ¶
func (b *PodBuilder) WithInitContainer(cn *Container, options ...func(*PodBuilder)) *PodBuilder
func (*PodBuilder) WithLabels ¶
func (b *PodBuilder) WithLabels(lb Labels) *PodBuilder
func (*PodBuilder) WithSideCar ¶
func (b *PodBuilder) WithSideCar(cn *Container, options ...func(*PodBuilder)) *PodBuilder
type PreStop ¶
type PreStop struct {
DrainTimeoutSeconds int `yaml:"drainTimeoutSeconds,omitempty"`
}
type RollingUpdate ¶
type RollingUpdate struct { MaxSurge string `yaml:"maxSurge,omitempty"` }
type RunnerPodBuilder ¶
type RunnerPodBuilder struct {
// contains filtered or unexported fields
}
func NewRunnerPodBuilder ¶
func NewRunnerPodBuilder(name, image, initImage string) *RunnerPodBuilder
func (*RunnerPodBuilder) Build ¶
func (b *RunnerPodBuilder) Build() *Pod
func (*RunnerPodBuilder) ForApp ¶
func (b *RunnerPodBuilder) ForApp(a *app.App) *RunnerPodBuilder
func (*RunnerPodBuilder) WithArgs ¶
func (b *RunnerPodBuilder) WithArgs(args []string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithCloudSQLProxySideCar ¶
func (b *RunnerPodBuilder) WithCloudSQLProxySideCar(csp *CloudSQLProxy) *RunnerPodBuilder
func (*RunnerPodBuilder) WithLabels ¶
func (b *RunnerPodBuilder) WithLabels(lb Labels) *RunnerPodBuilder
func (*RunnerPodBuilder) WithLimits ¶
func (b *RunnerPodBuilder) WithLimits(cpu, memory string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithNginxSideCar ¶
func (b *RunnerPodBuilder) WithNginxSideCar(image string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithSlug ¶
func (b *RunnerPodBuilder) WithSlug(url string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithStorage ¶
func (b *RunnerPodBuilder) WithStorage(fs storage.Storage) *RunnerPodBuilder
type Service ¶
type Service struct { Name string Namespace string Type string Labels map[string]string Ports []ServicePort SourceRanges []string }
func NewDefaultService ¶
func NewService ¶
func NewService(namespace, name, sType string, ports []ServicePort, labels map[string]string) *Service
type ServicePort ¶
func NewDefaultServicePort ¶
func NewDefaultServicePort(name string) *ServicePort
func NewServicePort ¶
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"` SideCars map[string]RawData `yaml:"sidecars,omitempty"` }
type TeresaYamlV2 ¶
type TeresaYamlV2 struct {
Applications map[string]*TeresaYaml `yaml:"applications,omitempty"`
}
type Volume ¶
type Volume struct { Name string SecretName string ConfigMapName string EmptyDir bool Items []VolumeItem }
type VolumeItem ¶
Click to show internal directories.
Click to hide internal directories.