-
Notifications
You must be signed in to change notification settings - Fork 553
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
Guidelines for config.json annotations vs. an external file? #492
Comments
I highly favor the 'Recommend external files for everything' approach. To take it a step further, I'm still in favor of splitting some of the host-specific stuff out of the config.json file. I know at one point the OCI bundle contained a runtime.json and then it was decided against. I wasn't as involved within the community back at the time so I'm not fully sure what the criteria for what went into runtime.json vs config.json. That being said, having an immutable drop-in config that was specific to the container and didn't require any customization regardless of the host is very appealing as an implementor of the spec. It'd be great to be able to pull in an OCI-bundle, drop in my own custom "host-config" along side the container config and just immediately start the container. The fact that I currently have to unmarshal, modify, re-marshal and save the configurations for users importing containers to our platform just feels meh. I fear that by adding more stuff to the config.json, we're going to end up with more confusion of "where does the spec start/end?" To me, the ideal OCI-bundle structure would be something along the lines of: 'Plugins' would contain optional json configurations created by different tools/platforms that implemented the OCI-spec which could be distributed within the bundle itself. (sorry, got a little off topic-ish) |
@JakeWarner As another aside, I don't like JSON as a config format. Personally I think TOML would've been a better choice -- JSON has way too many quirks to make it a good choice of config format. |
On Tue, Jun 07, 2016 at 11:16:00PM -0700, Jake Warner wrote:
#284 has the big picture, and the list thread 1 has detailed
The use-case that spawned this issue was “where do we put information
|
On Wed, Jun 08, 2016 at 12:38:45AM -0700, Aleksa Sarai wrote:
Orthogonal? Can you open a new issue? |
Will review.
I'm all for ExposedPorts going into the config.json since almost everything requires it (probably should be part of the spec) but since networking can get so complex and it's not defined by the spec, why include it in the config.json, even as an annotation? |
On Wed, Jun 08, 2016 at 10:41:16AM -0700, Jake Warner wrote:
After the discussion in today's meeting, I'm not sure there's a
For the broader issue, @brendandburns also wants to allow structured |
As a nit, I did not recommend embedding the document, but rather On Wed, Jun 8, 2016, 13:32 W. Trevor King notifications@github.com wrote:
|
I am personally +1 for an annotation like:
I think in general we should avoid forcing someone to parse and deal with additional files between OCI specs. And this is first case where the OCI Image Spec has data that it doesn't know how to give to the OCI Runtime Spec. Original comment here: opencontainers/image-spec#87 (comment) |
On Thu, Jun 09, 2016 at 07:39:20PM -0700, Brandon Philips wrote:
So are you comfortable requiring external lookup tables (e.g. bundle |
I wrote
To ground that in something concrete, umoci uses a parallel |
In opencontainers/image-spec#87, @philips is wondering whether the runtime-spec maintainers think network configuration and other metadata should go in config.json's annotations or in an external file. That sounds like something that deserves a SHOULD suggestion in this spec, so folks who don't already have an opinion can follow whatever the best practice is deemed to be without having to think to hard.
Besides the labels/annotation work in this repository with #188, #331, and #480, there was also some IRC discussion recorded here, with me arguing for external files and @vbatts arguing for embedding in config.json. More recently, @julz floated an external hooks.json (and @mrunalp came right back and suggested annotations). So possible OCI positions:
We really don't care
Language (in the
annotations
docs?) like:Recommend external files for everything
Language like:
This is my current preference, since it means the runtime is obviously not responsible for anything related to the extra data. But it means that having
annotations
in the config.json spec at all will be a bit confusing (I'd prefer removing it).Recommend annotations for everything
Language like:
If we lift the string requirement and allow opaque data in
annotations
, we could drop the second sentence.Recommend annotations for string data, and external files for structured data
Language like:
Other ideas?
Are there breakdowns I'm missing? It's hard to say much about opaque data. And while @philips clearly has expectations about [downstream consumption of the image-spec annotations][6], I'm not sure how generic those expectations are (and maybe he doesn't think they apply to the runtime-spec's
annotations
anyway).The text was updated successfully, but these errors were encountered: