Replies: 4 comments 15 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Your approach is okay as is, honestly, that's probably how it's usually done, or at least how I would've done it. Regardless, I looked up some more information that may be helpful. ARC already gives you everything you need since the runner Pod is a normal Kubernetes Pod, so you can inject any Downward-API environment variables you want. The only thing you have to do is add the extra env-vars to the runner container that ARC creates. There are two supported ways to do that. You can use Helm values globally for every runner by adding the env block with fieldRef values to the runner container spec in your values.yaml file. Alternatively, if you're using the newer RunnerScaleSet or RunnerDeployment CRDs you can put the same env block under the container definition in the template section of the resource. You don't need an extra init-container or a pre-job script unless you want to compute something that the Downward API can't supply. The variables are already present when GitHub's run.sh starts, so they appear in the "Set up job" step automatically, though the GitHub UI might not show them automatically. |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Why are you starting this discussion?
Question
What GitHub Actions topic or product is this about?
ARC (Actions Runner Controller)
Discussion Details
We're using the GitHub Actions Runner Controller Helm configuration as documented. At first thought it might be a matter of having scripts run before or after a job but it's not clear if this is the best approach.
To first order, we could expose pod information via environment variables such as
and would have thought it would be nice to view this information as part of the "Set up job" portion of the action workflow. Is this the correct way, or is there a more preferred way of exposing some of this?
Beta Was this translation helpful? Give feedback.
All reactions