sidecar interfering w/sync - bonzai
# 🌱|help-and-getting-started
e
I'm using 1passwd secrets injector which manifests itself as a sidecar to my container. Sync mode seems to try to connect to this 1pwd sidecar container rather than my container as it's 'first'. I understand that the kubernetes module type allows explicit targeting of the sync container by name, but I'd really hate to lose the convenience of the container module type. Any way to specify sync target otherwise, or might it possible to tell my container it needs to be 'first' so sync finds it? (Been with Garden since .10 - love it!)
q
Hey @eager-yacht-45658 love the love, thank you for your support! I don't believe there's a way to work around it. I know manifests are a pain to deal with but have you tried some autogeneration methods like those outlined in https://devopscube.com/create-kubernetes-yaml/ ? If there's another reason outside writing all that YAML you are trying to avoid, I'd love to hear what your pains are
e
Thanks for the reply @quaint-dress-831 . We're trying to hang on to the very convenient Garden Container module format because it elegantly represents our simple setup, and supports out goal to foster a full stack development environment. The simplied container format means most developers can make small changes to the garden container descriptor without needing to be a kubernetes expert. Anyway - a follow up question / request - why not support the full k8 sync configuration style across all module types? That would help us in this situation as we could keep Container modules and also specify a sync pod container by name... Thanks again.
q
My plane just leapt into the air but I have a solution for you I will detail when I land!
Love the goal to use Garden for your Internal Developer Platform IdP. We have others doing this too!
Ok I just landed and I'm tapping this out on my phone so I'll just start with pointers to resources. If we have not reached the threshold to understanding by the end you're welcome to book me for a call (DM me for that option) or I'll try and whip up an example in code for you tomorrow
In Acorn (0.12) we have Module Templates which allow you to arrange and expose a manifest any way you like so e.g. your developers can just have key values you want them to fill out with the rest of that YAML madness of a K8s manifest unexposed.
Here's a video tour

https://www.youtube.com/watch?v=KrHwgdpsDLw

The New Way and the one we encourage you to use is Config Templates docs page at https://docs.garden.io/using-garden/config-templates
In Bonsai (0.13) you hand your devs `RenderTemplate`s with whatever configurable values you want them to fill e.g.
Copy code
yaml
kind: RenderTemplate
template: k8s-container
name: my-service
inputs:
  containerPort: 8080
  servicePort: 80
Let me know if that makes sense and if not we can continue the chat tomorrow in whatever form you prefer
You the Platform Team or DevOps Engineers will still need to write or auto-generate that first Kubernetes manifest just once but then you're free to vend whatever config values you choose to expose to your devs in your self-service catalog
@eager-yacht-45658 hopefully that gives you a solid start 😀
e
@quaint-dress-831 excellent - thank you sir - will try this out.
4 Views