crossplane icon indicating copy to clipboard operation
crossplane copied to clipboard

Cannot parse partial configs

Open kenneth-vkd opened this issue 3 years ago • 8 comments

Describe the bug Unable to process config file with http block

To Reproduce Parse this file: template-config-no-http.txt

It works if you wrap it in an http block: template-config-http.txt

Expected behavior Since the file is a valid partial configuration, it would be expected to have this work

Your environment

  • Operating System Ubuntu 20.04
  • Version of crossplane crossplane 0.5.7

kenneth-vkd avatar Jan 21 '22 11:01 kenneth-vkd

the same issue with server block - parsing returns lots of errors got some alternative to this? @kenneth-vkd

rogueloop avatar Apr 30 '22 15:04 rogueloop

@rogueloop have not yet found another solution. Currently reading a template config file to a string and the replace the simple parts, such as server_name and ssl certificate paths. For more "complex" things, such as adding directives at specific points or remove directives, I convert the string to a list with .splitlines() and then use .join() to merge it back to a single string before creating a file

kenneth-vkd avatar May 02 '22 05:05 kenneth-vkd

Yeah I want to edit the file(s) I have in sites-available and since they are partial (just a server block) that gets pulled into the main config with an include, clossplane throws nothing but errors. Kind of defeats the purpose ...

I could use the combine param on the nginix.conf file but then there's no way to split out just what's in sites-available.

Isn't putting server blocks insites-available a best practice? why wouldn't crossplane support editing those files?

astrowonk avatar Aug 13 '22 16:08 astrowonk

Same issue here. I wish to edit just the files in sites-available, I was hoping there was a way to do so.

nikhilweee avatar Jul 27 '23 05:07 nikhilweee