Skip to content

FargateRunnerProviderProps Struct ​

Properties for FargateRunnerProvider.

Initializer ​

ts
import { FargateRunnerProviderProps } from '@cloudsnorkel/cdk-github-runners'

const fargateRunnerProviderProps: FargateRunnerProviderProps = { ... }
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.FargateRunnerProviderProps(
  default_labels: bool = None,
  log_retention: RetentionDays = None,
  assign_public_ip: bool = None,
  cluster: Cluster = None,
  cpu: typing.Union[int, float] = None,
  ephemeral_storage_gi_b: typing.Union[int, float] = None,
  group: str = None,
  image_builder: IRunnerImageBuilder = None,
  labels: typing.List[str] = None,
  memory_limit_mi_b: typing.Union[int, float] = None,
  security_groups: typing.List[ISecurityGroup] = None,
  spot: bool = None,
  subnet_selection: SubnetSelection = None,
  tags: typing.Mapping[str] = None,
  vpc: IVpc = None
)
java
import com.cloudsnorkel.cdk.github.runners.FargateRunnerProviderProps;

FargateRunnerProviderProps.builder()
//  .defaultLabels(java.lang.Boolean)
//  .logRetention(RetentionDays)
//  .assignPublicIp(java.lang.Boolean)
//  .cluster(Cluster)
//  .cpu(java.lang.Number)
//  .ephemeralStorageGiB(java.lang.Number)
//  .group(java.lang.String)
//  .imageBuilder(IRunnerImageBuilder)
//  .labels(java.util.List<java.lang.String>)
//  .memoryLimitMiB(java.lang.Number)
//  .securityGroups(java.util.List<ISecurityGroup>)
//  .spot(java.lang.Boolean)
//  .subnetSelection(SubnetSelection)
//  .tags(java.util.Map<java.lang.String, java.lang.String>)
//  .vpc(IVpc)
    .build();
csharp
using CloudSnorkel;

new FargateRunnerProviderProps {
    bool DefaultLabels = null,
    RetentionDays LogRetention = null,
    bool AssignPublicIp = null,
    Cluster Cluster = null,
    double Cpu = null,
    double EphemeralStorageGiB = null,
    string Group = null,
    IRunnerImageBuilder ImageBuilder = null,
    string[] Labels = null,
    double MemoryLimitMiB = null,
    ISecurityGroup[] SecurityGroups = null,
    bool Spot = null,
    SubnetSelection SubnetSelection = null,
    System.Collections.Generic.IDictionary<string, string> Tags = null,
    IVpc Vpc = null
};
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

&cloudsnorkelcdkgithubrunners.FargateRunnerProviderProps {
	DefaultLabels: *bool,
	LogRetention: github.com/aws/aws-cdk-go/awscdk/v2.aws_logs.RetentionDays,
	AssignPublicIp: *bool,
	Cluster: github.com/aws/aws-cdk-go/awscdk/v2.aws_ecs.Cluster,
	Cpu: *f64,
	EphemeralStorageGiB: *f64,
	Group: *string,
	ImageBuilder: github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners.IRunnerImageBuilder,
	Labels: *[]*string,
	MemoryLimitMiB: *f64,
	SecurityGroups: *[]github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.ISecurityGroup,
	Spot: *bool,
	SubnetSelection: github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.SubnetSelection,
	Tags: *map[string]*string,
	Vpc: github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.IVpc,
}

Properties ​

defaultLabelsdefault_labelsdefaultLabelsDefaultLabelsDefaultLabels ​

defaultLabels?: boolean

default_labels?: bool

defaultLabels?: java.lang.Boolean

DefaultLabels?: bool

DefaultLabels?: *bool

Add default labels based on OS and architecture of the runner.

This will tell GitHub Runner to add default labels like self-hosted, linux, x64, and arm64.

Default: true

logRetentionlog_retentionlogRetentionLogRetentionLogRetention ​

logRetention?: RetentionDays

log_retention?: RetentionDays

logRetention?: RetentionDays

LogRetention?: RetentionDays

LogRetention?: RetentionDays

The number of days log events are kept in CloudWatch Logs.

When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to INFINITE.

Default: logs.RetentionDays.ONE_MONTH

assignPublicIpassign_public_ipassignPublicIpAssignPublicIpAssignPublicIp ​

assignPublicIp?: boolean

assign_public_ip?: bool

assignPublicIp?: java.lang.Boolean

AssignPublicIp?: bool

AssignPublicIp?: *bool

Assign public IP to the runner task.

Make sure the task will have access to GitHub. A public IP might be required unless you have NAT gateway.

Default: true

clusterclusterclusterClusterCluster ​

cluster?: Cluster

cluster?: Cluster

cluster?: Cluster

Cluster?: Cluster

Cluster?: Cluster

Existing Fargate cluster to use.

Default: a new cluster

cpucpucpuCpuCpu ​

cpu?: number

cpu?: typing.Union[int, float]

cpu?: java.lang.Number

Cpu?: double

Cpu?: *f64

The number of cpu units used by the task.

For tasks using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the memory parameter:

256 (.25 vCPU) - Available memory values: 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB)

512 (.5 vCPU) - Available memory values: 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB)

1024 (1 vCPU) - Available memory values: 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB)

2048 (2 vCPU) - Available memory values: Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB)

4096 (4 vCPU) - Available memory values: Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB)

Default: 1024

ephemeralStorageGiBephemeral_storage_gi_bephemeralStorageGiBEphemeralStorageGiBEphemeralStorageGiB ​

ephemeralStorageGiB?: number

ephemeral_storage_gi_b?: typing.Union[int, float]

ephemeralStorageGiB?: java.lang.Number

EphemeralStorageGiB?: double

EphemeralStorageGiB?: *f64

The amount (in GiB) of ephemeral storage to be allocated to the task.

The maximum supported value is 200 GiB.

NOTE: This parameter is only supported for tasks hosted on AWS Fargate using platform version 1.4.0 or later.

Default: 20

groupgroupgroupGroupGroup ​

group?: string

group?: str

group?: java.lang.String

Group?: string

Group?: *string

GitHub Actions runner group name.

If specified, the runner will be registered with this group name. Setting a runner group can help managing access to self-hosted runners. It requires a paid GitHub account and organization level runner registration.

The group must exist or the runner will not start.

Users will still be able to trigger this runner with the correct labels. But the runner will only be able to run jobs from repos allowed to use the group.

Default: undefined

imageBuilderimage_builderimageBuilderImageBuilderImageBuilder ​

imageBuilder?: IRunnerImageBuilder

image_builder?: IRunnerImageBuilder

imageBuilder?: IRunnerImageBuilder

ImageBuilder?: IRunnerImageBuilder

ImageBuilder?: IRunnerImageBuilder

Runner image builder used to build Docker images containing GitHub Runner and all requirements.

The image builder determines the OS and architecture of the runner.

Default: FargateRunnerProvider.imageBuilder()

labelslabelslabelsLabelsLabels ​

labels?: string[]

labels?: typing.List[str]

labels?: java.util.List<java.lang.String>

Labels?: string[]

Labels?: *[]*string

GitHub Actions labels used for this provider.

These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the job's labels, this provider will be chosen and spawn a new runner.

Default: ['fargate']

memoryLimitMiBmemory_limit_mi_bmemoryLimitMiBMemoryLimitMiBMemoryLimitMiB ​

memoryLimitMiB?: number

memory_limit_mi_b?: typing.Union[int, float]

memoryLimitMiB?: java.lang.Number

MemoryLimitMiB?: double

MemoryLimitMiB?: *f64

The amount (in MiB) of memory used by the task.

For tasks using the Fargate launch type, this field is required and you must use one of the following values, which determines your range of valid values for the cpu parameter:

512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available cpu values: 256 (.25 vCPU)

1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available cpu values: 512 (.5 vCPU)

2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available cpu values: 1024 (1 vCPU)

Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available cpu values: 2048 (2 vCPU)

Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available cpu values: 4096 (4 vCPU)

Default: 2048

securityGroupssecurity_groupssecurityGroupsSecurityGroupsSecurityGroups ​

securityGroups?: ISecurityGroup[]

security_groups?: typing.List[ISecurityGroup]

securityGroups?: java.util.List<ISecurityGroup>

SecurityGroups?: ISecurityGroup[]

SecurityGroups?: *[]ISecurityGroup

Security groups to assign to the task.

Default: a new security group

spotspotspotSpotSpot ​

spot?: boolean

spot?: bool

spot?: java.lang.Boolean

Spot?: bool

Spot?: *bool

Use Fargate spot capacity provider to save money.

  • Runners may fail to start due to missing capacity.
  • Runners might be stopped prematurely with spot pricing.

Default: false

subnetSelectionsubnet_selectionsubnetSelectionSubnetSelectionSubnetSelection ​

subnetSelection?: SubnetSelection

subnet_selection?: SubnetSelection

subnetSelection?: SubnetSelection

SubnetSelection?: SubnetSelection

SubnetSelection?: SubnetSelection

Subnets to run the runners in.

Default: Fargate default

tagstagstagsTagsTags ​

tags?: {[ key: string ]: string}

tags?: typing.Mapping[str]

tags?: java.util.Map<java.lang.String, java.lang.String>

Tags?: System.Collections.Generic.IDictionary<string, string>

Tags?: *map[string]*string

Additional tags to apply to launched runner tasks.

These additional tags are set on top of Name, GitHubRunners:Provider, GitHubRunners:Repo, and GitHubRunners:Labels. You may not override tags with the GitHubRunners: prefix.

Default: no additional tags

vpcvpcvpcVpcVpc ​

vpc?: IVpc

vpc?: IVpc

vpc?: IVpc

Vpc?: IVpc

Vpc?: IVpc

VPC to launch the runners in.

Default: default account VPC

Released under the Apache-2.0 License.