deploy

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start()

Types

type CloudRunTarget

type CloudRunTarget struct {
	GoogleTarget
	UseHttp2          bool     `description:"Enable HTTP2 end-to-end. Please see https://cloud.google.com/run/docs/configuring/http2."`
	CloudSqlInstances []string `description:"Append the given values to the current Cloud SQL instances."`
	Secrets           []string `description:"List of key-value pairs to set as secrets."`
	VpcConnector      string   `description:"Set a VPC connector for this resource."`
}

func (*CloudRunTarget) Deploy

func (t *CloudRunTarget) Deploy(s *Service)

func (*CloudRunTarget) PostDeploy

func (t *CloudRunTarget) PostDeploy(s *Service)

func (*CloudRunTarget) Text

func (t *CloudRunTarget) Text() string

type Config

type Config struct {
	Schema    string              `json:"$schema"`
	Services  map[string]*Service `required:"true"`
	GlobalEnv []string            `description:"Global environment variables for all services."`
}

type DeployTarget

type DeployTarget interface {
	Text() string
	GetProject() string
	GetImageTag(*Service) string
	Deploy(*Service)
	PostDeploy(*Service)
}

type GoogleTarget

type GoogleTarget struct {
	Region      string   `required:"true" enum:"africa-south1,europe-west1"`
	ProjectId   string   `required:"true"`
	Environment []string `description:"Environment variables available at runtime."`
}

func (*GoogleTarget) GetImageTag

func (s *GoogleTarget) GetImageTag(service *Service) string

func (*GoogleTarget) GetProject

func (s *GoogleTarget) GetProject() string

func (*GoogleTarget) GetRegion

func (s *GoogleTarget) GetRegion() string

type ImageRegistryTarget

type ImageRegistryTarget struct {
	GoogleTarget
}

func (*ImageRegistryTarget) Deploy

func (t *ImageRegistryTarget) Deploy(s *Service)

func (*ImageRegistryTarget) PostDeploy

func (t *ImageRegistryTarget) PostDeploy(s *Service)

func (*ImageRegistryTarget) Text

func (t *ImageRegistryTarget) Text() string

type KubernetesTarget

type KubernetesTarget struct {
	GoogleTarget
}

func (*KubernetesTarget) Deploy

func (t *KubernetesTarget) Deploy(s *Service)

func (*KubernetesTarget) PostDeploy

func (t *KubernetesTarget) PostDeploy(s *Service)

func (*KubernetesTarget) Stop

func (t *KubernetesTarget) Stop(s *Service)

func (*KubernetesTarget) TailLogs

func (t *KubernetesTarget) TailLogs(s *Service)

func (*KubernetesTarget) Text

func (t *KubernetesTarget) Text() string

type LoadBalancerTarget

type LoadBalancerTarget struct {
	GoogleTarget
	LoadBalancerTargetRules
	Name string `required:"true"`
}

func (*LoadBalancerTarget) Deploy

func (t *LoadBalancerTarget) Deploy(s *Service)

func (*LoadBalancerTarget) PostDeploy

func (t *LoadBalancerTarget) PostDeploy(s *Service)

func (*LoadBalancerTarget) Text

func (t *LoadBalancerTarget) Text() string

type LoadBalancerTargetRules

type LoadBalancerTargetRules struct {
	DefaultService string `json:"defaultService"`

	HostRules []struct {
		Hosts       []string `json:"hosts"`
		PathMatcher string   `json:"pathMatcher"`
	} `json:"hostRules"`

	PathMatchers []struct {
		DefaultService string `json:"defaultService"`
		Name           string `json:"name"`
	} `json:"pathMatchers"`
}

type Service

type Service struct {
	Name       string             `required:"true" description:"Name of deployment."`
	Path       string             `required:"false" description:"Path to service. This will be the working directory."`
	Dockerfile string             `description:"Path to Dockerfile. Defaults to the working directory."`
	Prebuild   string             `description:"Pre deploy command."`
	Postdeploy string             `description:"Post deploy command."`
	Open       string             `description:"Open URL after deployment."`
	Targets    map[string]*Target `required:"true"`
	// contains filtered or unexported fields
}

func (*Service) SetKey

func (s *Service) SetKey(key string)

func (*Service) Text

func (s *Service) Text() string

type Target

type Target struct {
	Cloudrun          *CloudRunTarget      `description:"Use Cloud Run as target."`
	Kube              *KubernetesTarget    `description:"Use Kubernetes Engine as target."`
	Registry          *ImageRegistryTarget `description:"Do not deploy, just push to image registry."`
	CloudLoadBalancer *LoadBalancerTarget  `description:"Use Cloud Load Balancer as target."`
}

func (*Target) SetKey

func (s *Target) SetKey(key string)

func (*Target) Text

func (s *Target) Text() string

Jump to

Keyboard shortcuts

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