Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ data:
mountPath: /lib64
- name: glibc-compat
mountPath: /lib/x86_64-linux-gnu
- name: dummy-prepare-trigger
mountPath: /tmp/dummy-prepare
volumes:
- name: sys
hostPath:
Expand Down Expand Up @@ -320,6 +322,8 @@ data:
type: Directory
- name: glibc-compat
emptyDir: {}
- name: dummy-prepare-trigger
emptyDir: {}
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ data:
mountPath: /var/lib/docker
- name: cache-1
mountPath: /nix/store
- name: dummy-prepare-trigger
mountPath: /tmp/dummy-prepare
volumes:
- name: sys
hostPath:
Expand Down Expand Up @@ -332,6 +334,8 @@ data:
hostPath:
path: /nix/store
type: DirectoryOrCreate
- name: dummy-prepare-trigger
emptyDir: {}
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
Expand Down
8 changes: 8 additions & 0 deletions pkg/templates/templates/overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
#@ volumeMounts.append({"name": "cache-" + str(i), "mountPath": cachePath.target})
#@ end
#@
#@ # WORKAROUND: Add dummy user mount volume to force k8s-novolume hook prepare script execution
#@ # The prepare script only runs when userMountVolumes exist, but it's needed to copy /github/workflow content
#@ # See: https://github.com/rkoster/deskrun/issues/26
#@ volumeMounts.append({"name": "dummy-prepare-trigger", "mountPath": "/tmp/dummy-prepare"})
#@
#@ # Note: externals (/__e), work (/__w), and github (/github) volumes are automatically
#@ # added by the k8s-novolume hooks, so we don't include them here to avoid duplicates.
#@ # The hooks handle all GitHub workspace paths including /github/workflow/event.json
Expand Down Expand Up @@ -109,6 +114,9 @@
#@ volumes.append({"name": "cache-" + str(i), "hostPath": {"path": cache_source, "type": "DirectoryOrCreate"}})
#@ end
#@
#@ # WORKAROUND: Dummy volume to trigger prepare script (see volumeMounts comment above)
#@ volumes.append({"name": "dummy-prepare-trigger", "emptyDir": {}})
#@
#@ spec["containers"] = [container]
#@ spec["volumes"] = volumes
#@
Expand Down
4 changes: 4 additions & 0 deletions pkg/templates/testdata/expected/privileged_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ data:
mountPath: /lib64
- name: glibc-compat
mountPath: /lib/x86_64-linux-gnu
- name: dummy-prepare-trigger
mountPath: /tmp/dummy-prepare
volumes:
- name: sys
hostPath:
Expand Down Expand Up @@ -320,6 +322,8 @@ data:
type: Directory
- name: glibc-compat
emptyDir: {}
- name: dummy-prepare-trigger
emptyDir: {}
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ data:
mountPath: /lib/x86_64-linux-gnu
- name: cache-0
mountPath: /var/lib/docker
- name: dummy-prepare-trigger
mountPath: /tmp/dummy-prepare
volumes:
- name: sys
hostPath:
Expand Down Expand Up @@ -326,6 +328,8 @@ data:
hostPath:
path: /tmp/github-runner-cache/test-runner-1/cache-0
type: DirectoryOrCreate
- name: dummy-prepare-trigger
emptyDir: {}
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
Expand Down
4 changes: 4 additions & 0 deletions pkg/templates/testdata/expected/privileged_multi_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ data:
mountPath: /var/lib/docker
- name: cache-1
mountPath: /nix/store
- name: dummy-prepare-trigger
mountPath: /tmp/dummy-prepare
volumes:
- name: sys
hostPath:
Expand Down Expand Up @@ -332,6 +334,8 @@ data:
hostPath:
path: /nix/store
type: DirectoryOrCreate
- name: dummy-prepare-trigger
emptyDir: {}
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
Expand Down
4 changes: 4 additions & 0 deletions pkg/templates/testdata/expected/privileged_single_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ data:
mountPath: /lib/x86_64-linux-gnu
- name: cache-0
mountPath: /var/lib/docker
- name: dummy-prepare-trigger
mountPath: /tmp/dummy-prepare
volumes:
- name: sys
hostPath:
Expand Down Expand Up @@ -326,6 +328,8 @@ data:
hostPath:
path: /var/lib/docker
type: DirectoryOrCreate
- name: dummy-prepare-trigger
emptyDir: {}
---
apiVersion: actions.github.com/v1alpha1
kind: AutoscalingRunnerSet
Expand Down
Loading