Closed hjanuschka closed 5 years ago
This would definitely be useful! The root issue is that a single emrichenable template file itself could contain more than one YAML document, which would be handled correctly at present (i.e. emitted as multiple YAML documents in a single file), but that doesn't help in this case.
The patch should be pretty simple to implement, though. Please hold š
In case of k8s you can use kind: List. But I agree emrichen should support this.
On Thu, 4 Jul 2019 at 10.18, Aarni Koskela notifications@github.com wrote:
This would definitely be useful! The root issue is that a single emrichenable template file itself could contain more than one YAML document, which would be handled correctly at present (i.e. emitted as multiple YAML documents in a single file), but that doesn't help in this case.
The patch should be pretty simple to implement, though. Please hold š
ā You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/con2/emrichen/issues/31?email_source=notifications&email_token=AAA2WVN2CFIWRGICLN7F6EDP5WP3DA5CNFSM4H5UBVVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZGRU7A#issuecomment-508369532, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA2WVKWSXGQFNU5RZFH3BLP5WP3DANCNFSM4H5UBVVA .
-- Santtu Pajukanta
@japsu i couldnt get the "Kind" list to work, "kubectl apply" refused the file. anyway can you review/merge/release #32 ? ā¤ļø thx for all your effort you are putting into this project š¤
i succesfully avoided to get into python the last 20 years! can someone tell me how to run it locally so i can give the #32 a try?
pip3 install git+https://github.com/con2/emrichen.git@multi-doc
tried it - works perfect
For future readers of this thread, the change required is as_documents: true
to the !Loop
tag, e.g.
!Loop
over: !Var backend_mutations
as: backend
index_as: id
as_documents: true
template:
apiVersion: apps/v1
kind: Deployment
metadata:
name: !Lookup backend.name
labels:
krn: !Lookup backend.name
@hjanuschka Released in Emrichen 0.2.2 ā you can just pip3 install -U emrichen
:)
i am trying to render multiple deployments based on a variable
vars.yaml
template.yaml
(redacted the rest of the deployment spec.)the problem is that
!Loop
produces a list. which is not apply'able to K8s.ideally i would like to generate a single output file with multiple yaml files in it. seperated by
---
like my supposed output would be like:
is there anything i am missing - or is it currently not possible?