@@ -415,14 +415,14 @@ template:
415415You can customize the PodSpec of the listener pod and the controller will apply the configuration you specify. The following is an example pod specification.
416416
417417> [!NOTE]
418- > It' s important to not change the ` listenerTemplate.spec.containers.name` value of the listener container. Otherwise, the configuration you specify will be applied to a new side-car container.
418+ > It' s important to not change the ` listenerTemplate.spec.containers.name` value of the listener container. Otherwise, the configuration you specify will be applied to a new sidecar container.
419419
420420` ` ` yaml
421421listenerTemplate:
422422 spec:
423423 containers:
424424 # If you change the name of the container, the configuration will not be applied to the listener,
425- # and it will be treated as a side-car container.
425+ # and it will be treated as a sidecar container.
426426 - name: listener
427427 securityContext:
428428 runAsUser: 1000
@@ -468,6 +468,70 @@ containerMode:
468468
469469The ` template.spec` will be updated to the following default configuration.
470470
471+ For versions of Kubernetes ` > = v1.29` , sidecar container will be used to run docker daemon.
472+
473+ ` ` ` yaml
474+ template:
475+ spec:
476+ initContainers:
477+ - name: init-dind-externals
478+ image: ghcr.io/actions/actions-runner:latest
479+ command: [" cp" , " -r" , " /home/runner/externals/." , " /home/runner/tmpDir/" ]
480+ volumeMounts:
481+ - name: dind-externals
482+ mountPath: /home/runner/tmpDir
483+ - name: dind
484+ image: docker:dind
485+ args:
486+ - dockerd
487+ - --host=unix:///var/run/docker.sock
488+ - --group=$( DOCKER_GROUP_GID)
489+ env:
490+ - name: DOCKER_GROUP_GID
491+ value: " 123"
492+ securityContext:
493+ privileged: true
494+ restartPolicy: Always
495+ startupProbe:
496+ exec:
497+ command:
498+ - docker
499+ - info
500+ initialDelaySeconds: 0
501+ failureThreshold: 24
502+ periodSeconds: 5
503+ volumeMounts:
504+ - name: work
505+ mountPath: /home/runner/_work
506+ - name: dind-sock
507+ mountPath: /var/run
508+ - name: dind-externals
509+ mountPath: /home/runner/externals
510+ containers:
511+ - name: runner
512+ image: ghcr.io/actions/actions-runner:latest
513+ command: [" /home/runner/run.sh" ]
514+ env:
515+ - name: DOCKER_HOST
516+ value: unix:///var/run/docker.sock
517+ - name: RUNNER_WAIT_FOR_DOCKER_IN_SECONDS
518+ value: " 120"
519+ volumeMounts:
520+ - name: work
521+ mountPath: /home/runner/_work
522+ - name: dind-sock
523+ mountPath: /var/run
524+ volumes:
525+ - name: work
526+ emptyDir: {}
527+ - name: dind-sock
528+ emptyDir: {}
529+ - name: dind-externals
530+ emptyDir: {}
531+ ` ` `
532+
533+ For versions of Kubernetes ` < v1.29` , the following configuration will be applied:
534+
471535` ` ` yaml
472536template:
473537 spec:
@@ -592,6 +656,122 @@ To customize the spec, comment out or remove `containerMode`, and append the con
592656Before deciding to run ` dind-rootless` , make sure you are aware of [known limitations](https://docs.docker.com/engine/security/rootless/# known-limitations).
593657{% ifversion not ghes %}
594658
659+ For versions of Kubernetes > = v1.29, sidecar container will be used to run docker daemon.
660+
661+ ` ` ` yaml
662+ # # githubConfigUrl is the GitHub url for where you want to configure runners
663+ # # ex: https://github.com/myorg/myrepo or https://github.com/myorg
664+ githubConfigUrl: " https://github.com/actions/actions-runner-controller"
665+
666+ # # githubConfigSecret is the k8s secrets to use when auth with GitHub API.
667+ # # You can choose to use GitHub App or a PAT token
668+ githubConfigSecret: my-super-safe-secret
669+
670+ # # maxRunners is the max number of runners the autoscaling runner set will scale up to.
671+ maxRunners: 5
672+
673+ # # minRunners is the min number of idle runners. The target number of runners created will be
674+ # # calculated as a sum of minRunners and the number of jobs assigned to the scale set.
675+ minRunners: 0
676+
677+ runnerGroup: " my-custom-runner-group"
678+
679+ # # name of the runner scale set to create. Defaults to the helm release name
680+ runnerScaleSetName: " my-awesome-scale-set"
681+
682+ # # template is the PodSpec for each runner Pod
683+ # # For reference: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec
684+ template:
685+ spec:
686+ initContainers:
687+ - name: init-dind-externals
688+ image: ghcr.io/actions/actions-runner:latest
689+ command: [" cp" , " -r" , " /home/runner/externals/." , " /home/runner/tmpDir/" ]
690+ volumeMounts:
691+ - name: dind-externals
692+ mountPath: /home/runner/tmpDir
693+ - name: init-dind-rootless
694+ image: docker:dind-rootless
695+ command:
696+ - sh
697+ - -c
698+ - |
699+ set -x
700+ cp -a /etc/. /dind-etc/
701+ echo ' runner:x:1001:1001:runner:/home/runner:/bin/ash' >> /dind-etc/passwd
702+ echo ' runner:x:1001:' >> /dind-etc/group
703+ echo ' runner:100000:65536' >> /dind-etc/subgid
704+ echo ' runner:100000:65536' >> /dind-etc/subuid
705+ chmod 755 /dind-etc;
706+ chmod u=rwx,g=rx+s,o=rx /dind-home
707+ chown 1001:1001 /dind-home
708+ securityContext:
709+ runAsUser: 0
710+ volumeMounts:
711+ - mountPath: /dind-etc
712+ name: dind-etc
713+ - mountPath: /dind-home
714+ name: dind-home
715+ - name: dind
716+ image: docker:dind-rootless
717+ args:
718+ - dockerd
719+ - --host=unix:///run/user/1001/docker.sock
720+ securityContext:
721+ privileged: true
722+ runAsUser: 1001
723+ runAsGroup: 1001
724+ restartPolicy: Always
725+ startupProbe:
726+ exec:
727+ command:
728+ - docker
729+ - info
730+ initialDelaySeconds: 0
731+ failureThreshold: 24
732+ periodSeconds: 5
733+ volumeMounts:
734+ - name: work
735+ mountPath: /home/runner/_work
736+ - name: dind-sock
737+ mountPath: /run/user/1001
738+ - name: dind-externals
739+ mountPath: /home/runner/externals
740+ - name: dind-etc
741+ mountPath: /etc
742+ - name: dind-home
743+ mountPath: /home/runner
744+ containers:
745+ - name: runner
746+ image: ghcr.io/actions/actions-runner:latest
747+ command: [" /home/runner/run.sh" ]
748+ env:
749+ - name: DOCKER_HOST
750+ value: unix:///run/user/1001/docker.sock
751+ securityContext:
752+ privileged: true
753+ runAsUser: 1001
754+ runAsGroup: 1001
755+ volumeMounts:
756+ - name: work
757+ mountPath: /home/runner/_work
758+ - name: dind-sock
759+ mountPath: /run/user/1001
760+ volumes:
761+ - name: work
762+ emptyDir: {}
763+ - name: dind-externals
764+ emptyDir: {}
765+ - name: dind-sock
766+ emptyDir: {}
767+ - name: dind-etc
768+ emptyDir: {}
769+ - name: dind-home
770+ emptyDir: {}
771+ ` ` `
772+
773+ For versions of Kubernetes ` < v1.29` , the following configuration will be applied:
774+
595775` ` ` yaml
596776# # githubConfigUrl is the GitHub url for where you want to configure runners
597777# # ex: https://github.com/myorg/myrepo or https://github.com/myorg
@@ -698,6 +878,125 @@ template:
698878{% endif %}
699879{% ifversion ghes %}
700880
881+ For versions of Kubernetes ` > = v1.29` , sidecar container will be used to run docker daemon.
882+
883+ ` ` ` yaml
884+ # # githubConfigUrl is the GitHub url for where you want to configure runners
885+ # # ex: https://<HOSTNAME>/enterprises/my_enterprise or https://<HOSTNAME>/myorg
886+ githubConfigUrl: " https://<HOSTNAME>/actions/actions-runner-controller"
887+
888+ # # githubConfigSecret is the k8s secrets to use when auth with GitHub API.
889+ # # You can choose to use GitHub App or a PAT token
890+ githubConfigSecret: my-super-safe-secret
891+
892+ # # maxRunners is the max number of runners the autoscaling runner set will scale up to.
893+ maxRunners: 5
894+
895+ # # minRunners is the min number of idle runners. The target number of runners created will be
896+ # # calculated as a sum of minRunners and the number of jobs assigned to the scale set.
897+ minRunners: 0
898+
899+ runnerGroup: " my-custom-runner-group"
900+
901+ # # name of the runner scale set to create. Defaults to the helm release name
902+ runnerScaleSetName: " my-awesome-scale-set"
903+
904+ # # template is the PodSpec for each runner Pod
905+ # # For reference: https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#PodSpec
906+ template:
907+ spec:
908+ initContainers:
909+ - name: init-dind-externals
910+ image: ghcr.io/actions/actions-runner:latest
911+ command: [" cp" , " -r" , " /home/runner/externals/." , " /home/runner/tmpDir/" ]
912+ volumeMounts:
913+ - name: dind-externals
914+ mountPath: /home/runner/tmpDir
915+ - name: init-dind-rootless
916+ image: docker:dind-rootless
917+ command:
918+ - sh
919+ - -c
920+ - |
921+ set -x
922+ cp -a /etc/. /dind-etc/
923+ echo ' runner:x:1001:1001:runner:/home/runner:/bin/ash' >> /dind-etc/passwd
924+ echo ' runner:x:1001:' >> /dind-etc/group
925+ echo ' runner:100000:65536' >> /dind-etc/subgid
926+ echo ' runner:100000:65536' >> /dind-etc/subuid
927+ chmod 755 /dind-etc;
928+ chmod u=rwx,g=rx+s,o=rx /dind-home
929+ chown 1001:1001 /dind-home
930+ securityContext:
931+ runAsUser: 0
932+ volumeMounts:
933+ - mountPath: /dind-etc
934+ name: dind-etc
935+ - mountPath: /dind-home
936+ name: dind-home
937+ - name: dind
938+ image: docker:dind-rootless
939+ args:
940+ - dockerd
941+ - --host=unix:///run/user/1001/docker.sock
942+ env:
943+ - name: DOCKER_HOST
944+ value: unix:///run/user/1001/docker.sock
945+ securityContext:
946+ privileged: true
947+ runAsUser: 1001
948+ runAsGroup: 1001
949+ restartPolicy: Always
950+ startupProbe:
951+ exec:
952+ command:
953+ - docker
954+ - info
955+ initialDelaySeconds: 0
956+ failureThreshold: 24
957+ periodSeconds: 5
958+ volumeMounts:
959+ - name: work
960+ mountPath: /home/runner/_work
961+ - name: dind-sock
962+ mountPath: /run/user/1001
963+ - name: dind-externals
964+ mountPath: /home/runner/externals
965+ - name: dind-etc
966+ mountPath: /etc
967+ - name: dind-home
968+ mountPath: /home/runner
969+ containers:
970+ - name: runner
971+ image: ghcr.io/actions/actions-runner:latest
972+ command: [" /home/runner/run.sh" ]
973+ env:
974+ - name: DOCKER_HOST
975+ value: unix:///run/user/1001/docker.sock
976+ securityContext:
977+ privileged: true
978+ runAsUser: 1001
979+ runAsGroup: 1001
980+ volumeMounts:
981+ - name: work
982+ mountPath: /home/runner/_work
983+ - name: dind-sock
984+ mountPath: /run/user/1001
985+ volumes:
986+ - name: work
987+ emptyDir: {}
988+ - name: dind-externals
989+ emptyDir: {}
990+ - name: dind-sock
991+ emptyDir: {}
992+ - name: dind-etc
993+ emptyDir: {}
994+ - name: dind-home
995+ emptyDir: {}
996+ ` ` `
997+
998+ For versions of Kubernetes ` < v1.29` , the following configuration can be applied:
999+
7011000` ` ` yaml
7021001# # githubConfigUrl is the GitHub url for where you want to configure runners
7031002# # ex: https://<HOSTNAME>/enterprises/my_enterprise or https://<HOSTNAME>/myorg
0 commit comments