garden-io / garden

Automation for Kubernetes development and testing. Spin up production-like environments for development, testing, and CI on demand. Use the same configuration and workflows at every step of the process. Speed up your builds and test runs via shared result caching
https://garden.io
Mozilla Public License 2.0
3.4k stars 275 forks source link

[FEATURE]: supporting spec.env_from in test container and deploy container #6639

Closed phangiabao98 closed 1 week ago

phangiabao98 commented 1 week ago

Feature Request

Background / Motivation

As our current practice of k8s deployment, we often use spec.envFrom.configMapRef or spec.envFrom.secretMapRef like below: image

Why do they want to do this? What problem does it solve?

By doing this we don't have to manually put key by key ref in deployment.

Suggested Implementation(s)

According to https://docs.garden.io/reference/action-types/test/container#spec.env, there is no support spec.env_from at the current, believe that Garden could adapt this easily following to k8s specification.

How important is this feature for you/your team?

🌹 It’s a nice to have, but nice things are nice 🙂

I am willing to make a PR if you guys help to instruct some file to make changes just to ensure that i make a right contribution i.o issue https://github.com/garden-io/garden/issues/6635

twelvemo commented 1 week ago

Hello @phangiabao98, the container type is a simplification and abstraction on Kubernetes resources. By design it does not include all the potential fields of a kubernetes manifest. However you can use a kubernetes-pod test action where you can use a kubernetes manifest to specify the spec for your kubernetes resource.