Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudFrontConfig ¶
type CloudFrontConfig struct {
Enabled bool `yaml:"enabled"`
Comment string `yaml:"comment,omitempty"`
}
CloudFrontConfig defines CloudFront distribution settings (optional)
type ContainerConfig ¶
type ContainerConfig struct {
Port int `yaml:"port"`
CPU int `yaml:"cpu"`
Memory int `yaml:"memory"`
HealthCheckPath string `yaml:"health_check_path"`
HealthCheckGracePeriod int `yaml:"health_check_grace_period"`
}
ContainerConfig defines container runtime settings
type DeployConfig ¶
type DeployConfig struct {
Name string `yaml:"name"`
Region string `yaml:"region"`
Runtime Runtime `yaml:"runtime,omitempty"`
Lambda *LambdaConfig `yaml:"lambda,omitempty"`
Container ContainerConfig `yaml:"container"`
Environments map[string]EnvConfig `yaml:"environments"`
Secrets []string `yaml:"secrets"`
Queues *QueuesConfig `yaml:"queues,omitempty"`
ECS *ECSConfig `yaml:"ecs,omitempty"`
VPC *VPCConfig `yaml:"vpc,omitempty"`
CloudFront *CloudFrontConfig `yaml:"cloudfront,omitempty"`
}
DeployConfig represents the citadel.yml schema
func (*DeployConfig) GetEnv ¶
func (c *DeployConfig) GetEnv(name string) (*EnvConfig, error)
GetEnv returns the config for a specific environment
func (*DeployConfig) ResolveFunctionName ¶
func (c *DeployConfig) ResolveFunctionName(env string) string
ResolveFunctionName returns the Lambda function name for env. When lambda.functionName is set it is used verbatim with "{env}" substituted; otherwise the "<name>-<env>" convention is used (e.g. smaug-dev), matching the ECS resource naming convention (see ResolvedName). env must be non-empty.
func (*DeployConfig) ResolvedName ¶
func (c *DeployConfig) ResolvedName(env string) string
ResolvedName returns the env-namespaced base name for a deployment ("<name>-<env>", e.g. legolas-dev). All per-environment ECS resources (ECR repo, cluster, service, log group, SSM prefix) are derived from this so that dev and prod stay isolated even when they share one AWS account. env must be non-empty.
func (*DeployConfig) ResolvedRuntime ¶
func (c *DeployConfig) ResolvedRuntime() Runtime
ResolvedRuntime returns the runtime with the implicit default (ecs) applied.
func (*DeployConfig) Validate ¶
func (c *DeployConfig) Validate() error
Validate checks if the config is valid for the citadel deploy pipeline. Lambda-runtime configs skip ECS-only field requirements; functionName is optional (ResolveFunctionName applies the "<name>-<env>" convention when unset).
type ECSConfig ¶
type ECSConfig struct {
Cluster string `yaml:"cluster,omitempty"`
Service string `yaml:"service,omitempty"`
}
ECSConfig overrides how Citadel locates an existing ECS service. When unset, Citadel falls back to the "<name>-cluster" / "<name>-service" convention. Useful for projects whose ECS resources were not created by Citadel.
type EnvConfig ¶
type EnvConfig struct {
Account string `yaml:"account"`
MinCapacity int `yaml:"min_capacity"`
MaxCapacity int `yaml:"max_capacity"`
FargateSpot bool `yaml:"fargate_spot,omitempty"`
}
EnvConfig defines per-environment settings
type LambdaConfig ¶
type LambdaConfig struct {
FunctionName string `yaml:"functionName"`
}
LambdaConfig declares Lambda-specific metadata. functionName is optional; when absent ResolveFunctionName applies the "<name>-<env>" convention.
type QueuesConfig ¶
type QueuesConfig struct {
Consume []string `yaml:"consume,omitempty"`
Produce []string `yaml:"produce,omitempty"`
}
QueuesConfig declares the SQS queues a service may access, split by intent. Consume queues receive read/delete permissions; produce queues receive send permissions. A queue ARN may appear in both lists.