config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECSApplicationSpec

type ECSApplicationSpec struct {
	Input            ECSDeploymentInput  `json:"input"`
	QuickSyncOptions ECSSyncStageOptions `json:"quickSync"`
}

ECSApplicationSpec defines the application specification for ECS plugin.

type ECSCanaryRolloutStageOptions

type ECSCanaryRolloutStageOptions struct {
	// Scale is the percentage of tasks to run as canary (0-100).
	Scale float64 `json:"scale,omitempty"`
}

ECSCanaryRolloutStageOptions contains options for the ECS_CANARY_ROLLOUT stage.

type ECSDeployTargetConfig

type ECSDeployTargetConfig struct {
	// Region is the AWS region where the ECS cluster is located
	// (e.g., "us-west-2").
	Region string `json:"region"`

	// Profile is the AWS profile to use from the credentials file
	// If empty, uses the default profile or "default" if AWS_PROFILE env var is not set
	Profile string `json:"profile,omitempty"`

	// CredentialsFile is the path to the AWS shared credentials file
	// (e.g., "~/.aws/credentials")
	// If empty, uses the default location
	CredentialsFile string `json:"credentialsFile,omitempty"`

	// RoleARN is the IAM role ARN to assume when accessing AWS resources
	// (e.g., "arn:aws:iam::123456789:role/ecs-deployment-role").
	// Required when assuming a role across accounts
	RoleARN string `json:"roleARN,omitempty"`

	// TokenFile is the path to the OIDC token file for web identity federation.
	// Required when RoleARN is set for OIDC-based authentication
	TokenFile string `json:"tokenFile,omitempty"`
}

ECSDeployTargetConfig represents the deployment target configuration for ECS plugin.

type ECSDeploymentInput

type ECSDeploymentInput struct {
	// TaskDefinitionFile is the name of task definition file placing in application directory
	// e.g., "taskdef.json" or "ecs/taskdef.yaml"
	// Default: taskdef.json
	TaskDefinitionFile string `json:"taskDefinitionFile,omitempty" default:"taskdef.json"`

	// ServiceDefinitionFile is the name of service definition file placing in application directory
	// e.g., "servicedef.json" or "ecs/servicedef.yaml"
	ServiceDefinitionFile string `json:"serviceDefinitionFile,omitempty"`

	// RunStandaloneTask indicates whether to run the task as a standalone task without creating/updating an ECS service.
	// If true, the plugin will run the task directly without managing it through an ECS service.
	// This is useful for running one-off tasks or jobs that do not require long-term management.
	// Default: false
	RunStandaloneTask bool `json:"runStandaloneTask,omitempty" default:"false"`

	// ClusterARN identifies the ECS cluster where the task and service will be deployed.
	ClusterARN string `json:"clusterArn,omitempty"`

	// LaunchType specifies the launch type on which to run your task.
	// Valid values: "EC2", "FARGATE"
	// Default: "FARGATE"
	LaunchType string `json:"launchType,omitempty" default:"FARGATE"`

	// AccessType specifies how the ECS service is accessed.
	// Valid values: "ELB", "SERVICE_DISCOVERY"
	// Default: "ELB"
	AccessType string `json:"accessType,omitempty" default:"ELB"`

	// AwsVpcConfiguration contains the VPC configuration for running ECS tasks.
	AwsVpcConfiguration ECSVpcConfiguration `json:"awsvpcConfiguration"`

	// TargetGroups contains the load balancer target groups for the ECS service.
	TargetGroups ECSTargetGroups `json:"targetGroups"`
}

ECSDeploymentInput defines the input for ECS deployment.

func (*ECSDeploymentInput) UnmarshalJSON

func (di *ECSDeploymentInput) UnmarshalJSON(data []byte) error

type ECSPluginConfig

type ECSPluginConfig struct {
}

ECSPluginConfig holds the configuration for the ECS deployment plugin.

type ECSSyncStageOptions

type ECSSyncStageOptions struct {
	// Recreate indicates whether to recreate the service.
	// Enable this will ensure stop all running tasks before creating new task set.
	Recreate bool `json:"recreate,omitempty"`
}

ECSSyncStageOptions contains options for the ECS sync stage.

type ECSTargetGroup

type ECSTargetGroup struct {
	// TargetGroupARN is the ARN of the target group
	TargetGroupARN string `json:"targetGroupArn,omitempty"`

	// ContainerName is the name of the container to associate with the target group
	ContainerName string `json:"containerName,omitempty"`

	// ContainerPort is the port on the container to associate with the target group
	ContainerPort int32 `json:"containerPort,omitempty"`
}

ECSTargetGroup represents a single load balancer target group

type ECSTargetGroups

type ECSTargetGroups struct {
	// Primary is the target group for the primary service.
	Primary *ECSTargetGroup `json:"primary,omitempty"`

	// Canary is the target group for the canary service (optional).
	Canary *ECSTargetGroup `json:"canary,omitempty"`
}

ECSTargetGroups represents the load balancer target groups.

type ECSTrafficRoutingStageOptions

type ECSTrafficRoutingStageOptions struct {
	// Canary represents the percentage of traffic to route to the canary variant.
	// If set, primary will be 100 - canary.
	Canary int `json:"canary,omitempty"`
	// Primary represents the percentage of traffic to route to the primary variant.
	// If set, canary will be 100 - primary.
	Primary int `json:"primary,omitempty"`
}

ECSTrafficRoutingStageOptions contains all configurable values for an ECS_TRAFFIC_ROUTING stage.

func (ECSTrafficRoutingStageOptions) Percentages

func (opts ECSTrafficRoutingStageOptions) Percentages() (primary, canary int)

Percentages returns the traffic split between primary and canary. If neither is set, primary gets 100% by default.

type ECSVpcConfiguration

type ECSVpcConfiguration struct {
	// Subnets is a list of VPC subnet IDs where tasks will be launched.
	// Limit: 16 subnets per VPC configuration (https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecs@v1.46.2/types#AwsVpcConfiguration).
	// This field is required.
	Subnets []string `json:"subnets"`

	// AssignPublicIP indicates whether to assign a public IP address to the task's ENI
	// Valid values: "ENABLED","DISABLED"
	AssignPublicIP string `json:"assignPublicIp,omitempty"`

	// SecurityGroups is a list of security group IDs associated with the task's ENI
	// If not specified, the default security group for the VPC will be used.
	// Limit: 5 security groups per VPC configuration (https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ecs@v1.46.2/types#AwsVpcConfiguration).
	// All security groups must be from the same VPC.
	SecurityGroups []string `json:"securityGroups,omitempty"`
}

ECSVpcConfiguration contains the VPC configuration for running ECS tasks.

Jump to

Keyboard shortcuts

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