I'm working with Kustomize and Helm for deploying the kube-prometheus-stack, and I'm running into a frustrating issue with file reference paths. My project's folder structure includes a 'base' directory and several overlays (like 'dev' and 'production'). However, when I try to reference a values file located in the base directory from my overlay, I get an error due to security restrictions. Specifically, the error indicates that the path to the values file isn't acceptable because it's going above my overlay directory. I want to avoid duplicating files, restructuring my directories, or making any significant changes to my setup, so I'm looking for a way to refer to the values file without running into this issue. Any advice or workarounds?
3 Answers
The limitation you're facing is indeed a security measure that restricts referencing files outside the Kustomize directory structure. A potential workaround is to create a new kustomization.yaml file in the folder with your base values. Reference this new kustomization file in your original one, and include the values file there as a resource. That way, you should be able to manage your values while staying within the rules.
You might want to check out disabling the security feature causing this restriction. It's usually added to prevent issues, but in your case, it seems like it’s a hindrance. Just make sure you're aware of the risks involved if you choose to go that route.
Correct me if I'm wrong, but if you're moving your helmCharts config to the base/kustomization.yaml, how do you plan to ensure that additional values (like values-kind.yaml) are only triggered for KinD? It sounds tricky to manage!

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically