Yaml and Listings for more complicated objects #388
Unanswered
dkyanakiev
asked this question in
Q&A
Replies: 2 comments 9 replies
-
|
Modifying the basealerts file to this Solves the indentation and |
Beta Was this translation helpful? Give feedback.
5 replies
-
The "it" in that sentence refers to There are two things "wrong" with that;
If I understand your scenario correctly, what you want is |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
While working on the yaml validation for alert rules(prometheus/vm) generated with pkl I ran into a yaml specific issue and I'm having trouble understanding the correct usage of listings for this usecase.
Valid syntax looks like this
I have the following structure
And using this and amending it via
Great.. but not really it generates result like
Which unfortunately is not valid as it needs to be a list type of obj to be validated by Prom/VM correctly..
I tried to shuffle the classes and force an additional objects but it would always conflict because I cant have dynamic object creation apparently.
I tried to create a new object and maybe copy over the properties like so
But ran into
It must be something fairly basic I'm missing
Beta Was this translation helpful? Give feedback.
All reactions