'Patch container in overlays

I have use case to add some library (agent) base on the environment

├───k8s
│   ├───base
│   ├───modules
│   │   └───someagent
│   └───overlays
│       └───local

This agent basically is a container that will communicate with the main container that I define in the base.

Can someone advice how to define in kustomization.yaml in local? I have tried with patchesStrategicMerge, but it doesn't work.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source