manifest

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package manifest provides functionality to create Manifest files.

Package manifest provides functionality to create Manifest files.

Package manifest provides functionality to create Manifest files.

Index

Constants

View Source
const (
	GithubProviderName     = "GitHub"
	GithubV1ProviderName   = "GitHubV1"
	CodeCommitProviderName = "CodeCommit"
	BitbucketProviderName  = "Bitbucket"
)
View Source
const (
	// LoadBalancedWebServiceType is a web service with a load balancer and Fargate as compute.
	LoadBalancedWebServiceType = "Load Balanced Web Service"
	// BackendServiceType is a service that cannot be accessed from the internet but can be reached from other services.
	BackendServiceType = "Backend Service"
)
View Source
const (

	// AWS VPC subnet placement options.
	PublicSubnetPlacement  = "public"
	PrivateSubnetPlacement = "private"
)
View Source
const (
	DefaultHealthCheckPath = "/"
)

Default values for HTTPHealthCheck for a load balanced web service.

View Source
const (
	// ScheduledJobType is a recurring ECS Fargate task which runs on a schedule.
	ScheduledJobType = "Scheduled Job"
)

Variables

View Source
var JobTypes = []string{
	ScheduledJobType,
}

JobTypes holds the valid job "architectures"

ServiceTypes are the supported service manifest types.

View Source
var (
	// WorkloadTypes holds all workload manifest types.
	WorkloadTypes = append(ServiceTypes, JobTypes...)
)

Functions

func JobDockerfileBuildRequired added in v0.5.0

func JobDockerfileBuildRequired(job interface{}) (bool, error)

JobDockerfileBuildRequired returns if the job container image should be built from local Dockerfile.

func ServiceDockerfileBuildRequired added in v0.5.0

func ServiceDockerfileBuildRequired(svc interface{}) (bool, error)

ServiceDockerfileBuildRequired returns if the service container image should be built from local Dockerfile.

func UnmarshalWorkload added in v0.4.0

func UnmarshalWorkload(in []byte) (interface{}, error)

UnmarshalWorkload deserializes the YAML input stream into a workload manifest object. If an error occurs during deserialization, then returns the error. If the workload type in the manifest is invalid, then returns an ErrInvalidManifestType.

Types

type AuthorizationConfig added in v1.2.0

type AuthorizationConfig struct {
	IAM           *bool   `yaml:"iam"`             // Default true
	AccessPointID *string `yaml:"access_point_id"` // Default ""
}

AuthorizationConfig holds options relating to access points and IAM authorization.

type Autoscaling added in v0.4.0

type Autoscaling struct {
	Range        *Range         `yaml:"range"`
	CPU          *int           `yaml:"cpu_percentage"`
	Memory       *int           `yaml:"memory_percentage"`
	Requests     *int           `yaml:"requests"`
	ResponseTime *time.Duration `yaml:"response_time"`
}

Autoscaling represents the configurable options for Auto Scaling.

func (*Autoscaling) IsEmpty added in v0.4.0

func (a *Autoscaling) IsEmpty() bool

IsEmpty returns whether Autoscaling is empty.

type BackendService

type BackendService struct {
	Workload             `yaml:",inline"`
	BackendServiceConfig `yaml:",inline"`
	// Use *BackendServiceConfig because of https://github.com/imdario/mergo/issues/146
	Environments map[string]*BackendServiceConfig `yaml:",flow"`
	// contains filtered or unexported fields
}

BackendService holds the configuration to create a backend service manifest.

func NewBackendService

func NewBackendService(props BackendServiceProps) *BackendService

NewBackendService applies the props to a default backend service configuration with minimal task sizes, single replica, no healthcheck, and then returns it.

func (BackendService) ApplyEnv

func (s BackendService) ApplyEnv(envName string) (*BackendService, error)

ApplyEnv returns the service manifest with environment overrides. If the environment passed in does not have any overrides then it returns itself.

func (*BackendService) BuildArgs added in v0.3.0

func (s *BackendService) BuildArgs(wsRoot string) *DockerBuildArgs

BuildArgs returns a docker.BuildArguments object for the service given a workspace root directory

func (*BackendService) BuildRequired added in v0.5.0

func (s *BackendService) BuildRequired() (bool, error)

BuildRequired returns if the service requires building from the local Dockerfile.

func (*BackendService) MarshalBinary

func (s *BackendService) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

type BackendServiceConfig

type BackendServiceConfig struct {
	ImageConfig   imageWithPortAndHealthcheck `yaml:"image,flow"`
	ImageOverride `yaml:",inline"`
	TaskConfig    `yaml:",inline"`
	*Logging      `yaml:"logging,flow"`
	Sidecars      map[string]*SidecarConfig `yaml:"sidecars"`
	Network       NetworkConfig             `yaml:"network"`
}

BackendServiceConfig holds the configuration that can be overriden per environments.

type BackendServiceProps

type BackendServiceProps struct {
	WorkloadProps
	Port        uint16
	HealthCheck *ContainerHealthCheck // Optional healthcheck configuration.
}

BackendServiceProps represents the configuration needed to create a backend service.

type BitbucketProperties added in v1.3.0

type BitbucketProperties struct {
	RepositoryURL string `structs:"repository" yaml:"repository"`
	Branch        string `structs:"branch" yaml:"branch"`
}

BitbucketProperties contains information for configuring a Bitbucket source provider.

type BuildArgsOrString added in v0.3.0

type BuildArgsOrString struct {
	BuildString *string
	BuildArgs   DockerBuildArgs
}

BuildArgsOrString is a custom type which supports unmarshaling yaml which can either be of type string or type DockerBuildArgs.

func (*BuildArgsOrString) UnmarshalYAML added in v0.3.0

func (b *BuildArgsOrString) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the BuildArgsOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v2) interface.

type CodeCommitProperties added in v1.1.0

type CodeCommitProperties struct {
	RepositoryURL string `structs:"repository" yaml:"repository"`
	Branch        string `structs:"branch" yaml:"branch"`
}

CodeCommitProperties contains information for configuring a CodeCommit source provider.

type CommandOverride added in v1.3.0

type CommandOverride stringSliceOrString

CommandOverride is a custom type which supports unmarshaling "command" yaml which can either be of type string or type slice of string.

func (*CommandOverride) ToStringSlice added in v1.4.0

func (c *CommandOverride) ToStringSlice() ([]string, error)

ToStringSlice converts an CommandOverride to a slice of string using shell-style rules.

func (*CommandOverride) UnmarshalYAML added in v1.3.0

func (c *CommandOverride) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the CommandOverride struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v2) interface.

type ContainerHealthCheck

type ContainerHealthCheck struct {
	Command     []string       `yaml:"command"`
	Interval    *time.Duration `yaml:"interval"`
	Retries     *int           `yaml:"retries"`
	Timeout     *time.Duration `yaml:"timeout"`
	StartPeriod *time.Duration `yaml:"start_period"`
}

ContainerHealthCheck holds the configuration to determine if the service container is healthy. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-healthcheck.html

type Count added in v0.4.0

type Count struct {
	Value       *int        // 0 is a valid value, so we want the default value to be nil.
	Autoscaling Autoscaling // Mutually exclusive with Value.
}

Count is a custom type which supports unmarshaling yaml which can either be of type int or type Autoscaling.

func (*Count) UnmarshalYAML added in v0.4.0

func (a *Count) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the Count struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v2) interface.

type DockerBuildArgs added in v0.3.0

type DockerBuildArgs struct {
	Context    *string           `yaml:"context,omitempty"`
	Dockerfile *string           `yaml:"dockerfile,omitempty"`
	Args       map[string]string `yaml:"args,omitempty"`
	Target     *string           `yaml:"target,omitempty"`
	CacheFrom  []string          `yaml:"cache_from,omitempty"`
}

DockerBuildArgs represents the options specifiable under the "build" field of Docker Compose services. For more information, see: https://docs.docker.com/compose/compose-file/#build

type EFSVolumeConfiguration added in v1.2.0

type EFSVolumeConfiguration struct {
	FileSystemID  *string              `yaml:"id"`       // Required.
	RootDirectory *string              `yaml:"root_dir"` // Default "/"
	AuthConfig    *AuthorizationConfig `yaml:"auth"`
}

EFSVolumeConfiguration holds options which tell ECS how to reach out to the EFS filesystem.

type EntryPointOverride added in v1.3.0

type EntryPointOverride stringSliceOrString

EntryPointOverride is a custom type which supports unmarshaling "entrypoint" yaml which can either be of type string or type slice of string.

func (*EntryPointOverride) ToStringSlice added in v1.4.0

func (e *EntryPointOverride) ToStringSlice() ([]string, error)

ToStringSlice converts an EntryPointOverride to a slice of string using shell-style rules.

func (*EntryPointOverride) UnmarshalYAML added in v1.3.0

func (e *EntryPointOverride) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the EntryPointOverride struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v2) interface.

type ErrInvalidPipelineManifestVersion

type ErrInvalidPipelineManifestVersion struct {
	// contains filtered or unexported fields
}

ErrInvalidPipelineManifestVersion occurs when the pipeline.yml file contains invalid schema version during unmarshalling.

func (*ErrInvalidPipelineManifestVersion) Error

func (*ErrInvalidPipelineManifestVersion) Is

Is compares the 2 errors. Only returns true if the errors are of the same type and contain the same information.

type ErrInvalidWorkloadType added in v0.4.0

type ErrInvalidWorkloadType struct {
	Type string
}

ErrInvalidWorkloadType occurs when a user requested a manifest template type that doesn't exist.

func (*ErrInvalidWorkloadType) Error added in v0.4.0

func (e *ErrInvalidWorkloadType) Error() string

type ErrUnknownProvider

type ErrUnknownProvider struct {
	// contains filtered or unexported fields
}

ErrUnknownProvider occurs CreateProvider() is called with configurations that do not map to any supported provider.

func (*ErrUnknownProvider) Error

func (e *ErrUnknownProvider) Error() string

func (*ErrUnknownProvider) Is

func (e *ErrUnknownProvider) Is(target error) bool

Is compares the 2 errors. Returns true if the errors are of the same type

type ExecuteCommand added in v1.4.0

type ExecuteCommand struct {
	Enable *bool
	Config ExecuteCommandConfig
}

ExecuteCommand is a custom type which supports unmarshaling yaml which can either be of type bool or type ExecuteCommandConfig.

func (*ExecuteCommand) UnmarshalYAML added in v1.4.0

func (e *ExecuteCommand) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the BuildArgsOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v2) interface.

type ExecuteCommandConfig added in v1.4.0

type ExecuteCommandConfig struct {
	Enable *bool `yaml:"enable"`
}

ExecuteCommandConfig represents the configuration for ECS Execute Command.

func (ExecuteCommandConfig) IsEmpty added in v1.4.0

func (e ExecuteCommandConfig) IsEmpty() bool

IsEmpty returns whether ExecuteCommandConfig is empty.

type GitHubProperties

type GitHubProperties struct {
	RepositoryURL string `structs:"repository" yaml:"repository"`
	Branch        string `structs:"branch" yaml:"branch"`
}

GitHubProperties contains information for configuring a GitHubv2 source provider.

type GitHubV1Properties added in v1.4.0

type GitHubV1Properties struct {
	// use tag from https://godoc.org/github.com/fatih/structs#example-Map--Tags
	// to specify the name of the field in the output properties
	RepositoryURL         string `structs:"repository" yaml:"repository"`
	Branch                string `structs:"branch" yaml:"branch"`
	GithubSecretIdKeyName string `structs:"access_token_secret" yaml:"access_token_secret"`
}

GitHubV1Properties contain information for configuring a Githubv1 source provider.

type HTTPHealthCheckArgs added in v0.6.0

type HTTPHealthCheckArgs struct {
	Path               *string        `yaml:"path"`
	HealthyThreshold   *int64         `yaml:"healthy_threshold"`
	UnhealthyThreshold *int64         `yaml:"unhealthy_threshold"`
	Timeout            *time.Duration `yaml:"timeout"`
	Interval           *time.Duration `yaml:"interval"`
}

HTTPHealthCheckArgs holds the configuration to determine if the load balanced web service is healthy. These options are specifiable under the "healthcheck" field. See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html.

type HealthCheckArgsOrString added in v0.6.0

type HealthCheckArgsOrString struct {
	HealthCheckPath *string
	HealthCheckArgs HTTPHealthCheckArgs
}

HealthCheckArgsOrString is a custom type which supports unmarshaling yaml which can either be of type string or type HealthCheckArgs.

func (*HealthCheckArgsOrString) UnmarshalYAML added in v0.6.0

func (hc *HealthCheckArgsOrString) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML overrides the default YAML unmarshaling logic for the HealthCheckArgsOrString struct, allowing it to perform more complex unmarshaling behavior. This method implements the yaml.Unmarshaler (v2) interface.

type Image added in v0.4.0

type Image struct {
	Build    BuildArgsOrString `yaml:"build"`    // Build an image from a Dockerfile.
	Location *string           `yaml:"location"` // Use an existing image instead.
}

Image represents the workload's container image.

func (*Image) BuildConfig added in v0.4.0

func (i *Image) BuildConfig(rootDirectory string) *DockerBuildArgs

BuildConfig populates a docker.BuildArguments struct from the fields available in the manifest. Prefer the following hierarchy: 1. Specific dockerfile, specific context 2. Specific dockerfile, context = dockerfile dir 3. "Dockerfile" located in context dir 4. "Dockerfile" located in ws root.

func (Image) GetLocation added in v0.5.0

func (i Image) GetLocation() string

GetLocation returns the location of the image.

type ImageOverride added in v1.3.0

type ImageOverride struct {
	EntryPoint EntryPointOverride `yaml:"entrypoint"`
	Command    CommandOverride    `yaml:"command"`
}

ImageOverride holds fields that override Dockerfile image defaults.

type JobFailureHandlerConfig added in v0.5.0

type JobFailureHandlerConfig struct {
	Timeout *string `yaml:"timeout"`
	Retries *int    `yaml:"retries"`
}

JobFailureHandlerConfig represents the error handling configuration for the job.

type JobTriggerConfig added in v0.5.0

type JobTriggerConfig struct {
	Schedule *string `yaml:"schedule"`
}

JobTriggerConfig represents the configuration for the event that triggers the job.

type LoadBalancedWebService

type LoadBalancedWebService struct {
	Workload                     `yaml:",inline"`
	LoadBalancedWebServiceConfig `yaml:",inline"`
	// Use *LoadBalancedWebServiceConfig because of https://github.com/imdario/mergo/issues/146
	Environments map[string]*LoadBalancedWebServiceConfig `yaml:",flow"` // Fields to override per environment.
	// contains filtered or unexported fields
}

LoadBalancedWebService holds the configuration to build a container image with an exposed port that receives requests through a load balancer with AWS Fargate as the compute engine.

func NewLoadBalancedWebService

func NewLoadBalancedWebService(props *LoadBalancedWebServiceProps) *LoadBalancedWebService

NewLoadBalancedWebService creates a new public load balanced web service, receives all the requests from the load balancer, has a single task with minimal CPU and memory thresholds, and sets the default health check path to "/".

func (LoadBalancedWebService) ApplyEnv

ApplyEnv returns the service manifest with environment overrides. If the environment passed in does not have any overrides then it returns itself.

func (*LoadBalancedWebService) BuildArgs added in v0.3.0

func (s *LoadBalancedWebService) BuildArgs(wsRoot string) *DockerBuildArgs

BuildArgs returns a docker.BuildArguments object given a ws root directory.

func (*LoadBalancedWebService) BuildRequired added in v0.5.0

func (s *LoadBalancedWebService) BuildRequired() (bool, error)

BuildRequired returns if the service requires building from the local Dockerfile.

func (*LoadBalancedWebService) MarshalBinary

func (s *LoadBalancedWebService) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

type LoadBalancedWebServiceConfig

type LoadBalancedWebServiceConfig struct {
	ImageConfig   ServiceImageWithPort `yaml:"image,flow"`
	ImageOverride `yaml:",inline"`
	RoutingRule   `yaml:"http,flow"`
	TaskConfig    `yaml:",inline"`
	*Logging      `yaml:"logging,flow"`
	Sidecars      map[string]*SidecarConfig `yaml:"sidecars"`
	Network       NetworkConfig             `yaml:"network"`

	// Fields that are used while marshaling the template for additional clarifications,
	// but don't correspond to a field in the manifests.
	AppDomain *string
}

LoadBalancedWebServiceConfig holds the configuration for a load balanced web service.

type LoadBalancedWebServiceProps

type LoadBalancedWebServiceProps struct {
	*WorkloadProps
	Path      string
	Port      uint16
	AppDomain *string
}

LoadBalancedWebServiceProps contains properties for creating a new load balanced fargate service manifest.

type Logging added in v0.4.0

type Logging struct {
	Image          *string           `yaml:"image"`
	Destination    map[string]string `yaml:"destination,flow"`
	EnableMetadata *bool             `yaml:"enableMetadata"`
	SecretOptions  map[string]string `yaml:"secretOptions"`
	ConfigFile     *string           `yaml:"configFilePath"`
}

Logging holds configuration for Firelens to route your logs.

func (*Logging) GetEnableMetadata added in v1.2.0

func (lc *Logging) GetEnableMetadata() *string

GetEnableMetadata returns the configuration values and sane default for the EnableMEtadata field

func (*Logging) LogImage added in v1.2.0

func (lc *Logging) LogImage() *string

LogImage returns the default Fluent Bit image if not otherwise configured.

type MountPointOpts added in v1.2.0

type MountPointOpts struct {
	ContainerPath *string `yaml:"path"`
	ReadOnly      *bool   `yaml:"read_only"`
}

MountPointOpts is shared between Volumes for the main container and MountPoints for sidecars.

type NetworkConfig added in v1.3.0

type NetworkConfig struct {
	VPC vpcConfig `yaml:"vpc"`
}

NetworkConfig represents options for network connection to AWS resources within a VPC.

func (*NetworkConfig) UnmarshalYAML added in v1.3.0

func (c *NetworkConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML ensures that a NetworkConfig always defaults to public subnets. If the user specified a placement that's not valid then throw an error.

type PipelineManifest

type PipelineManifest struct {
	// Name of the pipeline
	Name    string                     `yaml:"name"`
	Version PipelineSchemaMajorVersion `yaml:"version"`
	Source  *Source                    `yaml:"source"`
	Stages  []PipelineStage            `yaml:"stages"`
	// contains filtered or unexported fields
}

PipelineManifest contains information that defines the relationship and deployment ordering of your environments.

func NewPipelineManifest added in v0.4.0

func NewPipelineManifest(pipelineName string, provider Provider, stages []PipelineStage) (*PipelineManifest, error)

NewPipelineManifest returns a pipeline manifest object.

func UnmarshalPipeline

func UnmarshalPipeline(in []byte) (*PipelineManifest, error)

UnmarshalPipeline deserializes the YAML input stream into a pipeline manifest object. It returns an error if any issue occurs during deserialization or the YAML input contains invalid fields.

func (*PipelineManifest) MarshalBinary

func (m *PipelineManifest) MarshalBinary() ([]byte, error)

MarshalBinary serializes the pipeline manifest object into byte array that represents the pipeline.yml document.

type PipelineSchemaMajorVersion

type PipelineSchemaMajorVersion int

PipelineSchemaMajorVersion is the major version number of the pipeline manifest schema

const (
	// Ver1 is the current schema major version of the pipeline.yml file.
	Ver1 PipelineSchemaMajorVersion = iota + 1
)

type PipelineStage

type PipelineStage struct {
	Name             string   `yaml:"name"`
	RequiresApproval bool     `yaml:"requires_approval,omitempty"`
	TestCommands     []string `yaml:"test_commands,omitempty"`
}

PipelineStage represents a stage in the pipeline manifest

type Provider

type Provider interface {
	fmt.Stringer
	Name() string
	Properties() map[string]interface{}
}

Provider defines a source of the artifacts that will be built and deployed via a pipeline

func NewProvider

func NewProvider(configs interface{}) (Provider, error)

NewProvider creates a source provider based on the type of the provided provider-specific configurations

type Range added in v0.4.0

type Range string

Range is a number range with maximum and minimum values.

func (Range) Parse added in v0.4.0

func (r Range) Parse() (min int, max int, err error)

Parse parses Range string and returns the min and max values. For example: 1-100 returns 1 and 100.

type RoutingRule

type RoutingRule struct {
	Path        *string                 `yaml:"path"`
	HealthCheck HealthCheckArgsOrString `yaml:"healthcheck"`
	Stickiness  *bool                   `yaml:"stickiness"`
	// TargetContainer is the container load balancer routes traffic to.
	TargetContainer          *string  `yaml:"target_container"`
	TargetContainerCamelCase *string  `yaml:"targetContainer"` // "targetContainerCamelCase" for backwards compatibility
	AllowedSourceIps         []string `yaml:"allowed_source_ips"`
}

RoutingRule holds the path to route requests to the service.

type ScheduledJob added in v0.4.0

type ScheduledJob struct {
	Workload           `yaml:",inline"`
	ScheduledJobConfig `yaml:",inline"`
	Environments       map[string]*ScheduledJobConfig `yaml:",flow"`
	// contains filtered or unexported fields
}

ScheduledJob holds the configuration to build a container image that is run periodically in a given environment with timeout and retry logic.

func NewScheduledJob added in v0.4.0

func NewScheduledJob(props *ScheduledJobProps) *ScheduledJob

NewScheduledJob creates a new scheduled job object.

func (ScheduledJob) ApplyEnv added in v0.5.0

func (j ScheduledJob) ApplyEnv(envName string) (*ScheduledJob, error)

ApplyEnv returns the manifest with environment overrides.

func (*ScheduledJob) BuildArgs added in v0.5.0

func (j *ScheduledJob) BuildArgs(wsRoot string) *DockerBuildArgs

BuildArgs returns a docker.BuildArguments object for the job given a workspace root.

func (*ScheduledJob) BuildRequired added in v0.5.0

func (j *ScheduledJob) BuildRequired() (bool, error)

BuildRequired returns if the service requires building from the local Dockerfile.

func (*ScheduledJob) MarshalBinary added in v0.4.0

func (j *ScheduledJob) MarshalBinary() ([]byte, error)

MarshalBinary serializes the manifest object into a binary YAML document. Implements the encoding.BinaryMarshaler interface.

type ScheduledJobConfig added in v0.4.0

type ScheduledJobConfig struct {
	ImageConfig             Image `yaml:"image,flow"`
	ImageOverride           `yaml:",inline"`
	TaskConfig              `yaml:",inline"`
	*Logging                `yaml:"logging,flow"`
	Sidecars                map[string]*SidecarConfig `yaml:"sidecars"`
	On                      JobTriggerConfig          `yaml:"on,flow"`
	JobFailureHandlerConfig `yaml:",inline"`
	Network                 NetworkConfig `yaml:"network"`
}

ScheduledJobConfig holds the configuration for a scheduled job

type ScheduledJobProps added in v0.4.0

type ScheduledJobProps struct {
	*WorkloadProps
	Schedule string
	Timeout  string
	Retries  int
}

ScheduledJobProps contains properties for creating a new scheduled job manifest.

type ServiceImageWithPort

type ServiceImageWithPort struct {
	Image `yaml:",inline"`
	Port  *uint16 `yaml:"port"`
}

ServiceImageWithPort represents a container image with an exposed port.

type SidecarConfig

type SidecarConfig struct {
	Port        *string             `yaml:"port"`
	Image       *string             `yaml:"image"`
	Essential   *bool               `yaml:"essential"`
	CredsParam  *string             `yaml:"credentialsParameter"`
	Variables   map[string]string   `yaml:"variables"`
	Secrets     map[string]string   `yaml:"secrets"`
	MountPoints []SidecarMountPoint `yaml:"mount_points"`
}

SidecarConfig represents the configurable options for setting up a sidecar container.

type SidecarMountPoint added in v1.2.0

type SidecarMountPoint struct {
	SourceVolume   *string `yaml:"source_volume"`
	MountPointOpts `yaml:",inline"`
}

SidecarMountPoint is used to let sidecars mount volumes defined in `storage`

type Source

type Source struct {
	ProviderName string                 `yaml:"provider"`
	Properties   map[string]interface{} `yaml:"properties"`
}

Source defines the source of the artifacts to be built and deployed.

func (Source) IsCodeStarConnection added in v1.5.0

func (s Source) IsCodeStarConnection() bool

IsCodeStarConnection indicates to the manifest if this source requires a CSC connection.

type Storage added in v1.2.0

type Storage struct {
	Volumes map[string]Volume `yaml:"volumes"`
}

Storage represents the options for external and native storage.

type TaskConfig

type TaskConfig struct {
	CPU            *int              `yaml:"cpu"`
	Memory         *int              `yaml:"memory"`
	Count          Count             `yaml:"count"`
	ExecuteCommand ExecuteCommand    `yaml:"exec"`
	Variables      map[string]string `yaml:"variables"`
	Secrets        map[string]string `yaml:"secrets"`
	Storage        *Storage          `yaml:"storage"`
}

TaskConfig represents the resource boundaries and environment variables for the containers in the task.

type Volume added in v1.2.0

type Volume struct {
	EFS            *EFSVolumeConfiguration `yaml:"efs"`
	MountPointOpts `yaml:",inline"`
}

Volume is an abstraction which merges the MountPoint and Volumes concepts from the ECS Task Definition

type Workload added in v0.4.0

type Workload struct {
	Name *string `yaml:"name"`
	Type *string `yaml:"type"` // must be one of the supported manifest types.
}

Workload holds the basic data that every workload manifest file needs to have.

type WorkloadProps added in v0.4.0

type WorkloadProps struct {
	Name       string
	Dockerfile string
	Image      string
}

WorkloadProps contains properties for creating a new workload manifest.

Jump to

Keyboard shortcuts

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