crossplane / example-cnp

Platform API as Configuration
Apache License 2.0
11 stars 5 forks source link

Define a package unpack format? #10

Open negz opened 4 years ago

negz commented 4 years ago

This is roughly this existing issue: https://github.com/crossplane/crossplane/issues/1248

Currently I believe some (all?) of the code that deals in packages reaches into the package image and expects metadata to be at certain paths (e.g. .registry/app.yaml). I believe we instead want to actually execute the image's ENTRYPOINT and have it output a stream of configuration. Presumably this steam could include:

Currently the crossplane package unpack command does something like this, but emits a stream of YAML documents. Presumably we might need a better way to relate documents to each other (i.e. to indicate which icon or which UI metadata is for which resource) when emitting package content.

negz commented 4 years ago

@rbwsam @bassam I recall you met yesterday to discuss whether we should invoke an image's ENTRYPOINT to emit a stream of YAML. Did you come to any decisions? Do we think moving to the invocation approach will be in scope for September? If not we'll need to update the scoped-september branch of this repo with any changes required to reflect that.

rbwsam commented 4 years ago

@negz I think that is what we want long term but it is definitely more work than reading static YAML from a container image. If time is a factor it seems like we are better off punting it. If we focus on a developer workflow that utilizes a CLI tool to build packages we can probably encapsulate that choice as an implementation detail.