ARC: How to run multiple containers pod properly? #168100
Replies: 3 comments 1 reply
-
| 🧠 First, Why Use Multiple Containers in a Pod? Share the same network (localhost) Share volumes Are scheduled together on the same node You typically use multiple containers in a Pod when they work together as a single unit — for example: A main app container + a logging/metrics sidecar A main app + a cache warm-up container A proxy container alongside your backend apiVersion: v1 volumes: | 
Beta Was this translation helpful? Give feedback.
-
| @dpanas-sollers your second point is one of the most basic things i'm missing from github, doing this in jenkins k8s plugin was amazing, but sadly github arc is not k8s native. @ChandrakantaMandal there are many reasons running multiple containers in a single pod, a use case i can tell about is for example, a CI that executed N binaries, lets say, a terraform code that part of the CI runs  you can, create a custom image, that contains all these binaries, maintain it, release it, upgrade it etc | 
Beta Was this translation helpful? Give feedback.
-
| 🕒 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.
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
Hi. Im coming from jenkins world. Jenkins k8s plugin allows 2 important things:
Specify multiple containers in one pod.
Main container is mandatory and default (it has agent service running) but doesnt even have to be used at all.
For each stage you can use any container specified in pod template.
They do not have to be modified (added jenkins agent service with auth token) just to run commands on them. So i can use generic containers or those built by other projects. And yet jenkins is fully aware of them (their health) and commands can be run there.
So i tried to replicate my CI setup/pipeline - some maven container and oracle database container - where i run both in one pod. Currently o dont use maven runner yet.
This is my values.yaml
And pipeline
And i already see that both containers are running. BUT, github is not aware of second container - it may fail or not start and if i dont use any command to connect to database, the pipeline will be green. But ok, before my main command i have to use healtchecks anyway to check if database is up and ready for connection.
So i assume point 1. is working (kind of)
But i don't know how to tacle point 2. in ARC. How to be able to run commands on those other pods? I mean i dont need that now, on this database container, but i use it in my other projects very often.
Overal what is correct approach in github actions world for such workflows?
Beta Was this translation helpful? Give feedback.
All reactions