-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support jsonnet as configuration source. #4855
Conversation
Thanks for your initiative on this @S-Bohn. Can you split out the description of this PR into its own PR following our design proposal process. |
I updated this MR to include the design proposal only. |
Codecov Report
@@ Coverage Diff @@
## master #4855 +/- ##
=======================================
Coverage 71.85% 71.86%
=======================================
Files 356 356
Lines 12215 12218 +3
=======================================
+ Hits 8777 8780 +3
Misses 2786 2786
Partials 652 652
Continue to review full report at Codecov.
|
Jsonnet config schema upgrades ( |
I would even say pretty much impossible for the common case. For something like:
i can imagine that (somehow) tracking the ultimate source of a specific value to change through the interpretation steps, fiddle around with AST to change it, and output it's source again may actually work. But latest with calculated fields i don't see any reasonable solution. So fix would output the very same as of today: the updated YAML. Note that all the following files currently return the very same output for
So the schema upgrades already take place after the usual YAML preprocessing and don't return the original version. |
I think this is an interesting idea, not specifically for jsonnet but for the general approach of providing a "generator". It could allow experimenting with other config languages like cue, and help address problems reported by users where they want to use templating. I'd like to avoid having to link in jsonnet into Skaffold — Skaffold is big enough as it is — but maybe we could use a kubectl plugin-like mechanism where Skaffold could call out to named generators based either on the extension or an explicitly configured generator. For example:
would look for and pipe the file through a
would pipe the People could get shell-like environment expansion with a non-robust generator like:
|
(And good point @ilya-zuyev and there's not much we can do about that.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shelved however can be resumed later.
Adding a design proposal for adding Jsonnet support to write the configuration file.
The initial basic implementation can be found here: https://github.com/S-Bohn/skaffold/tree/jsonnet-impl-basic-support