'Kustomize with Nginx Virtual Server - Server Snippets

I'm migrating a complex helm deployment to Kustomize to remove the templating complexities but am running up against trouble when it comes to the nginx virtual server manifests.

I think it's based on the server-snippets sections because Kustomize can't recognise it, due to it being unformatted and not YAML. I thought I could alleviate this by just patching the entire server-snippet block, but of course it doesn't know which is which, and which block belongs to which route etc.Generally speaking, Kustomize is just having a mare, which is leaving my rendered manifest about 100 lines shorter than it should be.

I don't think envsubst is a viable answer (although it may have to be) because there are so many things which would need to change. Has anyone else ran across these limitations with Kustomize? And if so are there any plugins which have proved helpful?



Sources

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

Source: Stack Overflow

Solution Source