Where to store all variables

26 views
Skip to first unread message

Baris Simsek

unread,
Dec 1, 2023, 8:53:00 PM12/1/23
to kpt-users
Hi, newbie here!

I followed the guide on Kpt homepage. Example is updating a few YAMLs from a source configmap (package-context.yaml)

But as you can guess, I have more than names. Eventually i'll have 50-100 variables that changes per environment (dev, prod, staging). I thought i could store those variables in a configmap but when i try to create a deployment from my blueprint with the command `kpt pkg get` I noticed it's removing other key: value pairs in the configmap data section, only leaves name. So how am i supposed to store my variables and feed them into Kpt as source for the mutations?
 
Thank you!

Baris Simsek

unread,
Dec 4, 2023, 5:21:26 PM12/4/23
to kpt-users
Answer to my question for the records:

I ended up creating a separate config file for env variables since package-context.yaml is actually controlled by apt itself. Mutation functions should use the separate config file as configPath.

Reply all
Reply to author
Forward
0 new messages