Skip to content

MicroVmRunnerProviderProps Struct ​

Initializer ​

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

const microVmRunnerProviderProps: MicroVmRunnerProviderProps = { ... }
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.MicroVmRunnerProviderProps(
  default_labels: bool = None,
  log_retention: RetentionDays = None,
  group: str = None,
  image_builder: IRunnerImageBuilder = None,
  labels: typing.List[str] = None,
  memory_size: Size = None,
  security_groups: typing.List[ISecurityGroup] = None,
  subnet_selection: SubnetSelection = None,
  timeout: Duration = None,
  vpc: IVpc = None
)
java
import com.cloudsnorkel.cdk.github.runners.MicroVmRunnerProviderProps;

MicroVmRunnerProviderProps.builder()
//  .defaultLabels(java.lang.Boolean)
//  .logRetention(RetentionDays)
//  .group(java.lang.String)
//  .imageBuilder(IRunnerImageBuilder)
//  .labels(java.util.List<java.lang.String>)
//  .memorySize(Size)
//  .securityGroups(java.util.List<ISecurityGroup>)
//  .subnetSelection(SubnetSelection)
//  .timeout(Duration)
//  .vpc(IVpc)
    .build();
csharp
using CloudSnorkel;

new MicroVmRunnerProviderProps {
    bool DefaultLabels = null,
    RetentionDays LogRetention = null,
    string Group = null,
    IRunnerImageBuilder ImageBuilder = null,
    string[] Labels = null,
    Size MemorySize = null,
    ISecurityGroup[] SecurityGroups = null,
    SubnetSelection SubnetSelection = null,
    Duration Timeout = null,
    IVpc Vpc = null
};
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

&cloudsnorkelcdkgithubrunners.MicroVmRunnerProviderProps {
	DefaultLabels: *bool,
	LogRetention: github.com/aws/aws-cdk-go/awscdk/v2.aws_logs.RetentionDays,
	Group: *string,
	ImageBuilder: github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners.IRunnerImageBuilder,
	Labels: *[]*string,
	MemorySize: github.com/aws/aws-cdk-go/awscdk/v2.Size,
	SecurityGroups: *[]github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.ISecurityGroup,
	SubnetSelection: github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.SubnetSelection,
	Timeout: github.com/aws/aws-cdk-go/awscdk/v2.Duration,
	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

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 must contain the RunnerImageComponent.microVmEntrypoint() component.

Default: MicroVmRunnerProvider.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: ['microvm']

memorySizememory_sizememorySizeMemorySizeMemorySize ​

memorySize?: Size

memory_size?: Size

memorySize?: Size

MemorySize?: Size

MemorySize?: Size

Memory given to the MicroVM.

CPU is allocated proportionally, about one vCPU for every 2 GiB.

Default: 4 GiB (and therefore 2 vCPU)

securityGroupssecurity_groupssecurityGroupsSecurityGroupsSecurityGroups ​

securityGroups?: ISecurityGroup[]

security_groups?: typing.List[ISecurityGroup]

securityGroups?: java.util.List<ISecurityGroup>

SecurityGroups?: ISecurityGroup[]

SecurityGroups?: *[]ISecurityGroup

Security groups to assign to the outbound traffic.

Default: a new security group, if VPC is used

subnetSelectionsubnet_selectionsubnetSelectionSubnetSelectionSubnetSelection ​

subnetSelection?: SubnetSelection

subnet_selection?: SubnetSelection

subnetSelection?: SubnetSelection

SubnetSelection?: SubnetSelection

SubnetSelection?: SubnetSelection

Where to place the network interfaces within the VPC.

Default: default subnets of the VPC

timeouttimeouttimeoutTimeoutTimeout ​

timeout?: Duration

timeout?: Duration

timeout?: Duration

Timeout?: Duration

Timeout?: Duration

Time after which the MicroVM is terminated, whether the job is done or not.

Must be 8 hours or less.

Default: Duration.hours(1)

vpcvpcvpcVpcVpc ​

vpc?: IVpc

vpc?: IVpc

vpc?: IVpc

Vpc?: IVpc

Vpc?: IVpc

VPC to send the runner's outbound traffic through.

The network interfaces never get a public IP, so the subnets need a NAT gateway (or VPC endpoints) to reach GitHub, ECR and CloudWatch. Public subnets won't work.

Default: no VPC, runners get public internet access

Released under the Apache-2.0 License.