Replies: 1 comment
-
I think I found the answer. This is similar to #2992 The template from there was not working 100% Here is what I got #
# This defines how the "container" pod created for workflows that are
# executed inside a container.
#
apiVersion: v1
kind: ConfigMap
metadata:
name: pod-templates
namespace: arc-runners-docker
data:
default.yaml: |
---
apiVersion: v1
kind: PodTemplate
metadata:
# metadata.name should not be set as this will cause the
# workflow container pod to fail.
labels:
app: runner-pod-template
spec:
containers:
- name: $job
volumeMounts:
- name: hostedtoolcache
mountPath: /opt/hostedtoolcache
volumes:
- name: hostedtoolcache
hostPath:
# directory location on host
path: /var/lib/arc
type: DirectoryOrCreate
and values.yaml template:
spec:
containers:
- name: runner
image: YOUR-IMAGE
command: ["/home/runner/run.sh"]
env:
- name: ACTIONS_RUNNER_REQUIRE_JOB_CONTAINER
value: "false"
# This defines the template used to build the workflow containers
# Update it via:
# $ kubectl apply -f infrastructure/k8s/arc-docker-pod-templates.yaml
- name: ACTIONS_RUNNER_CONTAINER_HOOK_TEMPLATE
value: /home/runner/pod-templates/default.yaml
volumeMounts:
- name: hostedtoolcache
mountPath: /opt/hostedtoolcache
- name: pod-templates
mountPath: /home/runner/pod-templates
readOnly: true
volumes:
- name: hostedtoolcache
hostPath:
# directory location on host
path: /var/lib/arc
type: DirectoryOrCreate
- name: pod-templates
configMap:
name: pod-templates |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to attach persistent volumes to the workflow pod that is created to run the container workflow ?
I would like to add an extra volume for a cache like
/opt/hostedtoolcache
I guess that my question is related to actions/runner-container-hooks#75 , but I can't find the docs , other than the info from PR actions/runner-container-hooks#96
Note that this is not about the "normal" runner pod. That part is solved via
template.containers
I am running the helm chart with
I can see that it is created with 2 volume... but I can't find the template for it.
Beta Was this translation helpful? Give feedback.
All reactions