You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi All, chasing some advice, or even whether this is possible in kustomize.
I have a side car container, that helps connect to other containers, similar in concept to a service-mesh (istio/linkerd), but each client connection ends up being its own sidecar, rather than a monolith.
So you would have
main app
mesh-listener
client-connection 1
client-connection 2
This deploys and works alright, but becomes difficult to model nicely in kustomize.
For 'mesh-listener', I am able to write a kustomize component, then each map takes that as a 'component itself' but changes configmaps to make sure the names line up. This seems to work okay, I have a common root one, and each app has components to add in what it needs (and then the final overlay does whatever final customisation is needed, eg secrets).
Where I am struggling is with the clients. I can create components for each service it would expect to talk to 'eg mysql database', however there doesn't seem to be an elegant way to have this component depend on something 'common'.
The client sidecars are 100% the same, except they would have a 'new name'. So I really want the 'patch' to add to a deployment, but being able to have a new name, eg 'client-sidecar-database' 'client-sidecar-cache'.
Components can be included in components, but you can't seem to change them.
I have also thought that maybe the 'add component' sidecar could structure out creating the sidecar name, and a generic patch could add more, but is there any way to match a spec.template.spec.container without the name?, eg if I could match it by some other metadata I would at least know how to 'enhance' the creation of the name in the sidecar.
At the moment I end up duplicating the same sidecar patch about 8 times for different apps it needs to be added to, it's not the end of the world, but would be nicer if I didn't have to copy paste large blocks around.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi All, chasing some advice, or even whether this is possible in kustomize.
I have a side car container, that helps connect to other containers, similar in concept to a service-mesh (istio/linkerd), but each client connection ends up being its own sidecar, rather than a monolith.
So you would have
This deploys and works alright, but becomes difficult to model nicely in kustomize.
For 'mesh-listener', I am able to write a kustomize component, then each map takes that as a 'component itself' but changes configmaps to make sure the names line up. This seems to work okay, I have a common root one, and each app has components to add in what it needs (and then the final overlay does whatever final customisation is needed, eg secrets).
Where I am struggling is with the clients. I can create components for each service it would expect to talk to 'eg mysql database', however there doesn't seem to be an elegant way to have this component depend on something 'common'.
The client sidecars are 100% the same, except they would have a 'new name'. So I really want the 'patch' to add to a deployment, but being able to have a new name, eg 'client-sidecar-database' 'client-sidecar-cache'.
Components can be included in components, but you can't seem to change them.
I have also thought that maybe the 'add component' sidecar could structure out creating the sidecar name, and a generic patch could add more, but is there any way to match a spec.template.spec.container without the name?, eg if I could match it by some other metadata I would at least know how to 'enhance' the creation of the name in the sidecar.
At the moment I end up duplicating the same sidecar patch about 8 times for different apps it needs to be added to, it's not the end of the world, but would be nicer if I didn't have to copy paste large blocks around.
Beta Was this translation helpful? Give feedback.
All reactions