I have a config field for CPU limit, and I want to include the CPU limit in my Deployment manifest only if the field has a value. I tried the following in the deployment manifest since I read in the documentation that the full Go templating library is supported:
$ replicated release lint --app "gitguardian-seal" --yaml-dir manifests
RULE TYPE FILENAME LINE MESSAGE
invalid-yaml error manifests/app-deployment.yaml 133 yaml: line 133: could not find expected ':'
Error: One or more errors of severity "error" or higher were found
I believe that using something like repl if only really works if you use it for the value of a key, not an entire block of a manifest. There is an example of using this here.
While maybe not the ideal solution, you could instead have two manifests, one with the limits and one without. Then use the kots.io/when label annotation (example here ) to only deploy the one based on the config option.
Hello, this is unfortunate since we need to disable some manifest mapping depending on the configuration, on all our deployments. This force us to duplicate hundreds of lines.
Hi @chbrosso - can you help me understand that a little better? What is making that difficult for you? If there is a manual workaround involved, what steps would you use and how long do you expect it to take per customer?