2022-07-17 19:43:13 +09:00
apiVersion : storage.k8s.io/v1
kind : StorageClass
metadata :
name : ${NAME}-runner-work-dir
labels :
content : ${NAME}-runner-work-dir
provisioner : rancher.io/local-path
reclaimPolicy : Delete
volumeBindingMode : WaitForFirstConsumer
---
2022-11-01 20:30:10 +09:00
apiVersion : storage.k8s.io/v1
kind : StorageClass
metadata :
name : ${NAME}-rootless-dind-work-dir
labels :
content : ${NAME}-rootless-dind-work-dir
provisioner : rancher.io/local-path
reclaimPolicy : Delete
volumeBindingMode : WaitForFirstConsumer
---
2022-02-17 09:16:28 +09:00
apiVersion : actions.summerwind.dev/v1alpha1
kind : RunnerDeployment
metadata :
name : ${NAME}
spec :
# replicas: 1
template :
spec :
enterprise : ${TEST_ENTERPRISE}
group : ${TEST_GROUP}
organization : ${TEST_ORG}
repository : ${TEST_REPO}
#
# Custom runner image
#
image : ${RUNNER_NAME}:${RUNNER_TAG}
imagePullPolicy : IfNotPresent
2022-03-13 07:22:04 +00:00
ephemeral : ${TEST_EPHEMERAL}
2022-02-17 09:16:28 +09:00
#
# dockerd within runner container
#
## Replace `mumoshu/actions-runner-dind:dev` with your dind image
#dockerdWithinRunnerContainer: true
#image: mumoshu/actions-runner-dind:dev
2022-02-20 04:37:15 +00:00
dockerdWithinRunnerContainer : ${RUNNER_DOCKERD_WITHIN_RUNNER_CONTAINER}
2022-02-17 09:16:28 +09:00
#
# Set the MTU used by dockerd-managed network interfaces (including docker-build-ubuntu)
#
#dockerMTU: 1450
#Runner group
# labels:
# - "mylabel 1"
# - "mylabel 2"
labels :
- "${RUNNER_LABEL}"
2022-11-01 20:30:10 +09:00
serviceAccountName : ${RUNNER_SERVICE_ACCOUNT_NAME}
terminationGracePeriodSeconds : ${RUNNER_TERMINATION_GRACE_PERIOD_SECONDS}
2022-08-26 01:28:00 +00:00
env :
2022-11-01 20:30:10 +09:00
- name : RUNNER_GRACEFUL_STOP_TIMEOUT
value : "${RUNNER_GRACEFUL_STOP_TIMEOUT}"
2022-08-26 01:28:00 +00:00
- name : ROLLING_UPDATE_PHASE
value : "${ROLLING_UPDATE_PHASE}"
2022-09-23 03:33:51 +00:00
- name : ARC_DOCKER_MTU_PROPAGATION
value : "true"
2022-11-05 06:46:32 +01:00
# https://github.com/docker/docs/issues/8663
- name : DOCKER_DEFAULT_ADDRESS_POOL_BASE
value : "172.17.0.0/12"
- name : DOCKER_DEFAULT_ADDRESS_POOL_SIZE
value : "24"
2022-11-22 12:08:54 +09:00
- name : WAIT_FOR_DOCKER_SECONDS
value : "3"
2022-09-23 03:33:51 +00:00
dockerMTU : 1400
2022-11-27 11:13:56 +09:00
dockerEnv :
- name : RUNNER_GRACEFUL_STOP_TIMEOUT
value : "${RUNNER_GRACEFUL_STOP_TIMEOUT}"
2022-08-26 01:28:00 +00:00
2022-11-01 20:30:10 +09:00
# Fix the following no space left errors with rootless-dind runners that can happen while running buildx build:
# ------
# > [4/5] RUN go mod download:
# ------
# ERROR: failed to solve: failed to prepare yxsw8lv9hqnuafzlfta244l0z: mkdir /home/runner/.local/share/docker/vfs/dir/yxsw8lv9hqnuafzlfta244l0z/usr/local/go/src/cmd/compile/internal/types2/testdata: no space left on device
# Error: Process completed with exit code 1.
#
volumeMounts :
- name : rootless-dind-work-dir
# Omit the /share/docker part of the /home/runner/.local/share/docker as
# that part is created by dockerd.
mountPath : /home/runner/.local
readOnly : false
volumes :
- name : rootless-dind-work-dir
ephemeral :
volumeClaimTemplate :
spec :
accessModes : [ "ReadWriteOnce" ]
storageClassName : "${NAME}-rootless-dind-work-dir"
resources :
requests :
storage : 3Gi
2022-02-17 09:16:28 +09:00
#
# Non-standard working directory
#
# workDir: "/"
2022-07-10 02:56:45 +00:00
# # Uncomment the below to enable the kubernetes container mode
2022-12-28 01:38:34 +01:00
# # See https://github.com/actions/actions-runner-controller#runner-with-k8s-jobs
2022-08-24 10:42:45 +09:00
containerMode : ${RUNNER_CONTAINER_MODE}
2022-07-10 02:56:45 +00:00
workVolumeClaimTemplate :
accessModes :
- ReadWriteOnce
storageClassName : "${NAME}-runner-work-dir"
resources :
requests :
storage : 10Gi
2022-02-17 09:16:28 +09:00
---
apiVersion : actions.summerwind.dev/v1alpha1
kind : HorizontalRunnerAutoscaler
metadata :
name : ${NAME}
spec :
scaleTargetRef :
name : ${NAME}
scaleUpTriggers :
2022-05-12 09:19:58 +09:00
- githubEvent :
workflowJob : {}
2022-02-17 09:16:28 +09:00
amount : 1
2022-02-21 00:07:49 +00:00
duration : "10m"
2022-02-20 13:40:03 +00:00
minReplicas : ${RUNNER_MIN_REPLICAS}
2022-02-17 09:16:28 +09:00
maxReplicas : 10
2022-02-20 13:40:03 +00:00
scaleDownDelaySecondsAfterScaleOut : ${RUNNER_SCALE_DOWN_DELAY_SECONDS_AFTER_SCALE_OUT}