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) WithRequests(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 DNSConfig
- type DNSOptions
- type Deploy
- type DeployBuilder
- func (b *DeployBuilder) Build() *Deploy
- func (b *DeployBuilder) WithDNSConfigNdots(ndots string) *DeployBuilder
- 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 ¶ added in v0.25.0
func MountConfigMapInSideCar(name, path, configMapName string) func(*PodBuilder)
func MountSecretInAppContainer ¶ added in v0.25.0
func MountSecretInAppContainer(name, path, secretName string) func(*PodBuilder)
func MountSecretInInitContainer ¶ added in v0.25.0
func MountSecretInInitContainer(name, path, secretName string) func(*PodBuilder)
func MountSecretItemsInAppContainer ¶ added in v0.25.0
func MountSecretItemsInAppContainer(name, path, secretName string, items []string) func(*PodBuilder)
func ShareVolumeBetweenAppAndInitContainer ¶ added in v0.25.0
func ShareVolumeBetweenAppAndInitContainer(name, path string) func(*PodBuilder)
func ShareVolumeBetweenAppAndSideCar ¶ added in v0.25.0
func ShareVolumeBetweenAppAndSideCar(name, path string) func(*PodBuilder)
func SwitchPortWithAppContainer ¶ added in v0.25.0
func SwitchPortWithAppContainer(b *PodBuilder)
Types ¶
type BuildPodBuilder ¶ added in v0.25.0
type BuildPodBuilder struct {
// contains filtered or unexported fields
}
func NewBuildPodBuilder ¶ added in v0.25.0
func NewBuildPodBuilder(name, image string) *BuildPodBuilder
func (*BuildPodBuilder) Build ¶ added in v0.25.0
func (b *BuildPodBuilder) Build() *Pod
func (*BuildPodBuilder) ForApp ¶ added in v0.25.0
func (b *BuildPodBuilder) ForApp(a *app.App) *BuildPodBuilder
func (*BuildPodBuilder) SendSlugTo ¶ added in v0.25.0
func (b *BuildPodBuilder) SendSlugTo(dest string) *BuildPodBuilder
func (*BuildPodBuilder) WithLimits ¶ added in v0.25.0
func (b *BuildPodBuilder) WithLimits(cpu, memory string) *BuildPodBuilder
func (*BuildPodBuilder) WithStorage ¶ added in v0.25.0
func (b *BuildPodBuilder) WithStorage(fs storage.Storage) *BuildPodBuilder
func (*BuildPodBuilder) WithTarBallPath ¶ added in v0.25.0
func (b *BuildPodBuilder) WithTarBallPath(path string) *BuildPodBuilder
type CloudSQLProxy ¶ added in v0.25.0
type CloudSQLProxy struct { Instances string CredentialFile string `yaml:"credentialFile"` Image string `yaml:"-"` }
func NewCloudSQLProxy ¶ added in v0.25.0
func NewCloudSQLProxy(img string, t *TeresaYaml) (*CloudSQLProxy, error)
type Container ¶ added in v0.16.0
type Container struct { Name string Image string ContainerLimits *ContainerLimits ContainerRequests *ContainerLimits Env map[string]string VolumeMounts []*VolumeMounts Command []string Args []string Ports []Port Secrets []string }
func NewCloudSQLProxyContainer ¶ added in v0.25.0
func NewCloudSQLProxyContainer(csp *CloudSQLProxy, a *app.App) *Container
func NewInitContainer ¶ added in v0.25.0
type ContainerBuilder ¶ added in v0.25.0
type ContainerBuilder struct {
// contains filtered or unexported fields
}
func NewContainerBuilder ¶ added in v0.25.0
func NewContainerBuilder(name, image string) *ContainerBuilder
func (*ContainerBuilder) Build ¶ added in v0.25.0
func (b *ContainerBuilder) Build() *Container
func (*ContainerBuilder) ExposePort ¶ added in v0.25.0
func (b *ContainerBuilder) ExposePort(name string, port int) *ContainerBuilder
func (*ContainerBuilder) WithArgs ¶ added in v0.25.0
func (b *ContainerBuilder) WithArgs(args []string) *ContainerBuilder
func (*ContainerBuilder) WithCommand ¶ added in v0.25.0
func (b *ContainerBuilder) WithCommand(cmd []string) *ContainerBuilder
func (*ContainerBuilder) WithEnv ¶ added in v0.25.0
func (b *ContainerBuilder) WithEnv(ev map[string]string) *ContainerBuilder
func (*ContainerBuilder) WithLimits ¶ added in v0.25.0
func (b *ContainerBuilder) WithLimits(cpu, memory string) *ContainerBuilder
func (*ContainerBuilder) WithRequests ¶ added in v0.34.0
func (b *ContainerBuilder) WithRequests(cpu, memory string) *ContainerBuilder
func (*ContainerBuilder) WithSecrets ¶ added in v0.25.0
func (b *ContainerBuilder) WithSecrets(s []string) *ContainerBuilder
func (*ContainerBuilder) WithVolumeMount ¶ added in v0.25.0
func (b *ContainerBuilder) WithVolumeMount(name, mountPath, subPath string) *ContainerBuilder
type ContainerLimits ¶
type CronArgs ¶ added in v0.16.0
type CronArgs struct {
Schedule string `yaml:"schedule",omitempty"`
}
type CronJobBuilder ¶ added in v0.25.0
type CronJobBuilder struct {
// contains filtered or unexported fields
}
func NewCronJobBuilder ¶ added in v0.25.0
func NewCronJobBuilder(slugURL string) *CronJobBuilder
func (*CronJobBuilder) Build ¶ added in v0.25.0
func (b *CronJobBuilder) Build() *CronJob
func (*CronJobBuilder) WithDescription ¶ added in v0.25.0
func (b *CronJobBuilder) WithDescription(description string) *CronJobBuilder
func (*CronJobBuilder) WithPod ¶ added in v0.25.0
func (b *CronJobBuilder) WithPod(p *Pod) *CronJobBuilder
func (*CronJobBuilder) WithSchedule ¶ added in v0.25.0
func (b *CronJobBuilder) WithSchedule(s string) *CronJobBuilder
type DNSConfig ¶ added in v0.32.0
type DNSConfig struct {
Options []DNSOptions `yaml:"options"`
}
type DNSOptions ¶ added in v0.32.0
type DeployBuilder ¶ added in v0.25.0
type DeployBuilder struct {
// contains filtered or unexported fields
}
func NewDeployBuilder ¶ added in v0.25.0
func NewDeployBuilder(slugURL string) *DeployBuilder
func (*DeployBuilder) Build ¶ added in v0.25.0
func (b *DeployBuilder) Build() *Deploy
func (*DeployBuilder) WithDNSConfigNdots ¶ added in v0.32.0
func (b *DeployBuilder) WithDNSConfigNdots(ndots string) *DeployBuilder
func (*DeployBuilder) WithDescription ¶ added in v0.25.0
func (b *DeployBuilder) WithDescription(desc string) *DeployBuilder
func (*DeployBuilder) WithMatchLabels ¶ added in v0.25.0
func (b *DeployBuilder) WithMatchLabels(lb Labels) *DeployBuilder
func (*DeployBuilder) WithPod ¶ added in v0.25.0
func (b *DeployBuilder) WithPod(p *Pod) *DeployBuilder
func (*DeployBuilder) WithRevisionHistoryLimit ¶ added in v0.25.0
func (b *DeployBuilder) WithRevisionHistoryLimit(rhl int) *DeployBuilder
func (*DeployBuilder) WithTeresaYaml ¶ added in v0.25.0
func (b *DeployBuilder) WithTeresaYaml(ty *TeresaYaml) *DeployBuilder
type HealthCheck ¶
type HealthCheck struct { Liveness *HealthCheckProbe Readiness *HealthCheckProbe }
type HealthCheckProbe ¶
type PodBuilder ¶ added in v0.25.0
type PodBuilder struct {
// contains filtered or unexported fields
}
func NewPodBuilder ¶ added in v0.25.0
func NewPodBuilder(name, namespace string) *PodBuilder
func (*PodBuilder) Build ¶ added in v0.25.0
func (b *PodBuilder) Build() *Pod
func (*PodBuilder) WithAppContainer ¶ added in v0.25.0
func (b *PodBuilder) WithAppContainer(cn *Container, options ...func(*PodBuilder)) *PodBuilder
func (*PodBuilder) WithInitContainer ¶ added in v0.25.0
func (b *PodBuilder) WithInitContainer(cn *Container, options ...func(*PodBuilder)) *PodBuilder
func (*PodBuilder) WithLabels ¶ added in v0.25.0
func (b *PodBuilder) WithLabels(lb Labels) *PodBuilder
func (*PodBuilder) WithSideCar ¶ added in v0.25.0
func (b *PodBuilder) WithSideCar(cn *Container, options ...func(*PodBuilder)) *PodBuilder
type PreStop ¶
type PreStop struct {
DrainTimeoutSeconds int `yaml:"drainTimeoutSeconds,omitempty"`
}
type RawData ¶ added in v0.25.0
type RawData struct {
Fn func(interface{}) error
}
func (*RawData) UnmarshalYAML ¶ added in v0.25.0
type RollingUpdate ¶
type RollingUpdate struct { MaxSurge string `yaml:"maxSurge,omitempty"` }
type RunnerPodBuilder ¶ added in v0.25.0
type RunnerPodBuilder struct {
// contains filtered or unexported fields
}
func NewRunnerPodBuilder ¶ added in v0.25.0
func NewRunnerPodBuilder(name, image, initImage string) *RunnerPodBuilder
func (*RunnerPodBuilder) Build ¶ added in v0.25.0
func (b *RunnerPodBuilder) Build() *Pod
func (*RunnerPodBuilder) ForApp ¶ added in v0.25.0
func (b *RunnerPodBuilder) ForApp(a *app.App) *RunnerPodBuilder
func (*RunnerPodBuilder) WithArgs ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithArgs(args []string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithCloudSQLProxySideCar ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithCloudSQLProxySideCar(csp *CloudSQLProxy) *RunnerPodBuilder
func (*RunnerPodBuilder) WithLabels ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithLabels(lb Labels) *RunnerPodBuilder
func (*RunnerPodBuilder) WithLimits ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithLimits(cpu, memory string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithNginxSideCar ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithNginxSideCar(image string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithSlug ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithSlug(url string) *RunnerPodBuilder
func (*RunnerPodBuilder) WithStorage ¶ added in v0.25.0
func (b *RunnerPodBuilder) WithStorage(fs storage.Storage) *RunnerPodBuilder
type Service ¶ added in v0.20.0
type Service struct { Name string Namespace string Type string Labels map[string]string Ports []ServicePort SourceRanges []string }
func NewDefaultService ¶ added in v0.20.0
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
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"` SideCars map[string]RawData `yaml:"sidecars,omitempty"` DNSConfig *DNSConfig `yaml:"dnsConfig,omitempty"` }
type TeresaYamlV2 ¶ added in v0.24.0
type TeresaYamlV2 struct {
Applications map[string]*TeresaYaml `yaml:"applications,omitempty"`
}
type Volume ¶ added in v0.16.0
type Volume struct { Name string SecretName string ConfigMapName string EmptyDir bool Items []VolumeItem }
type VolumeItem ¶ added in v0.25.0
Click to show internal directories.
Click to hide internal directories.