Documentation ¶
Index ¶
- Constants
- Variables
- func FindArtifactVersions(taskDefinition types.TaskDefinition) ([]*model.ArtifactVersion, error)
- func FindImageTag(taskDefinition types.TaskDefinition) (string, error)
- func IsPipeCDManagedTaskSet(ts *types.TaskSet) bool
- func LoadServiceDefinition(appDir, serviceDefinitionFilename string) (types.Service, error)
- func LoadTargetGroups(targetGroups config.ECSTargetGroups) (*types.LoadBalancer, *types.LoadBalancer, error)
- func LoadTaskDefinition(appDir, taskDefinition string) (types.TaskDefinition, error)
- func MakeTags(tags map[string]string) []types.Tag
- type Client
- type DiffRenderOptions
- type DiffResult
- type ECS
- type ECSManifests
- type ECSManifestsCache
- type ELB
- type Registry
- type RoutingTrafficConfig
Constants ¶
View Source
const ( LabelManagedBy string = "pipecd-dev-managed-by" // Always be piped. LabelPiped string = "pipecd-dev-piped" // The id of piped handling this application. LabelApplication string = "pipecd-dev-application" // The application this resource belongs to. LabelCommitHash string = "pipecd-dev-commit-hash" // Hash value of the deployed commit. ManagedByPiped string = "piped" )
Variables ¶
View Source
var ErrNoTargetGroup = errors.New("no target group")
Functions ¶
func FindArtifactVersions ¶
func FindArtifactVersions(taskDefinition types.TaskDefinition) ([]*model.ArtifactVersion, error)
FindArtifactVersions parses artifact versions from ECS task definition.
func FindImageTag ¶
func FindImageTag(taskDefinition types.TaskDefinition) (string, error)
FindImageTag parses image tag from given ECS task definition.
func IsPipeCDManagedTaskSet ¶ added in v0.45.4
func LoadServiceDefinition ¶
LoadServiceDefinition returns ServiceDefinition object from a given service definition file.
func LoadTargetGroups ¶
func LoadTargetGroups(targetGroups config.ECSTargetGroups) (*types.LoadBalancer, *types.LoadBalancer, error)
LoadTargetGroups returns primary & canary target groups according to the defined in pipe definition file.
func LoadTaskDefinition ¶
func LoadTaskDefinition(appDir, taskDefinition string) (types.TaskDefinition, error)
LoadTaskDefinition returns TaskDefinition object from a given task definition file.
Types ¶
type DiffRenderOptions ¶ added in v0.48.0
type DiffRenderOptions struct { // If true, use "diff" command to render. UseDiffCommand bool }
type DiffResult ¶ added in v0.48.0
type DiffResult struct { Diff *diff.Result Old ECSManifests New ECSManifests }
func Diff ¶ added in v0.48.0
func Diff(old, new ECSManifests, opts ...diff.Option) (*DiffResult, error)
func (*DiffResult) NoChange ¶ added in v0.48.0
func (d *DiffResult) NoChange() bool
func (*DiffResult) Render ¶ added in v0.48.0
func (d *DiffResult) Render(opt DiffRenderOptions) string
type ECS ¶
type ECS interface { ServiceExists(ctx context.Context, clusterName string, servicesName string) (bool, error) CreateService(ctx context.Context, service types.Service) (*types.Service, error) UpdateService(ctx context.Context, service types.Service) (*types.Service, error) PruneServiceTasks(ctx context.Context, service types.Service) error WaitServiceStable(ctx context.Context, service types.Service) error RegisterTaskDefinition(ctx context.Context, taskDefinition types.TaskDefinition) (*types.TaskDefinition, error) RunTask(ctx context.Context, taskDefinition types.TaskDefinition, clusterArn string, launchType string, awsVpcConfiguration *config.ECSVpcConfiguration, tags []types.Tag) error GetServiceTaskSets(ctx context.Context, service types.Service) ([]*types.TaskSet, error) CreateTaskSet(ctx context.Context, service types.Service, taskDefinition types.TaskDefinition, targetGroup *types.LoadBalancer, scale int) (*types.TaskSet, error) DeleteTaskSet(ctx context.Context, taskSet types.TaskSet) error UpdateServicePrimaryTaskSet(ctx context.Context, service types.Service, taskSet types.TaskSet) (*types.TaskSet, error) TagResource(ctx context.Context, resourceArn string, tags []types.Tag) error }
type ECSManifests ¶ added in v0.48.0
type ECSManifests struct { TaskDefinition *types.TaskDefinition ServiceDefinition *types.Service }
ECSManifests is configurations of ECS task definition and service.
type ECSManifestsCache ¶ added in v0.48.0
func (ECSManifestsCache) Get ¶ added in v0.48.0
func (c ECSManifestsCache) Get(commit string) (ECSManifests, bool)
func (ECSManifestsCache) Put ¶ added in v0.48.0
func (c ECSManifestsCache) Put(commit string, sm ECSManifests)
type ELB ¶
type ELB interface { GetListenerArns(ctx context.Context, targetGroup types.LoadBalancer) ([]string, error) // ModifyListeners modifies the actions of type ActionTypeEnumForward to perform routing traffic // to the given target groups. Other actions won't be modified. ModifyListeners(ctx context.Context, listenerArns []string, routingTrafficCfg RoutingTrafficConfig) error }
type Registry ¶
type Registry interface {
Client(name string, cfg *config.PlatformProviderECSConfig, logger *zap.Logger) (Client, error)
}
Registry holds a pool of aws client wrappers.
func DefaultRegistry ¶
func DefaultRegistry() Registry
DefaultRegistry returns a pool of aws clients and a mutex associated with it.
type RoutingTrafficConfig ¶
type RoutingTrafficConfig []targetGroupWeight
Click to show internal directories.
Click to hide internal directories.