Add support for OCI based plugin discovery and distribution#1043
Add support for OCI based plugin discovery and distribution#1043anujc25 merged 4 commits intovmware-tanzu:mainfrom
Conversation
|
Cluster Generation A/B Results: |
1390a65 to
047853f
Compare
|
Cluster Generation A/B Results: |
047853f to
c8a28f3
Compare
|
Cluster Generation A/B Results: |
c8a28f3 to
d824e90
Compare
|
Cluster Generation A/B Results: |
d824e90 to
3a7c874
Compare
|
Cluster Generation A/B Results: |
3a7c874 to
f82f837
Compare
|
Cluster Generation A/B Results: |
zjs
left a comment
There was a problem hiding this comment.
I appreciate the quick progress on this! Overall, it looks like things are coming together as planned. (Which means good job on the design as well 🙂)
I left a few minor comments. Let me know if anything is unclear!
| func (r *registry) GetFile(imageWithTag, filename string) ([]byte, error) { | ||
| ref, err := regname.ParseReference(imageWithTag, regname.WeakValidation) |
There was a problem hiding this comment.
question: What's driving this change? (Naively, passing in the image and tag and handling the concatenation within the method seems better.)
There was a problem hiding this comment.
The main reason behind this change is to support sha256 based images as well. For example, User can also provide the image as projects.registry.vmware.com/tanzu/tanzu-plugins/standalone-cliplugins@sha256:e78f0c57a68737561b6217dcbe4976b46393e1ee6615f7c957f162ef428d5ac8.
For this type of images, providing image as projects.registry.vmware.com/tanzu/tanzu-plugins/standalone-cliplugins@sha256 and tag as e78f0c57a68737561b6217dcbe4976b46393e1ee6615f7c957f162ef428d5ac8 seems odd and hence the refactoring.
fdd21e3 to
d20be10
Compare
|
Cluster Generation A/B Results: |
|
Cluster Generation A/B Results: |
vuil
left a comment
There was a problem hiding this comment.
Thanks for the changes! I have some minor comments and questions.
|
|
||
| for path, fileData := range filesMap { | ||
| // Skip any testing related directory paths if bundled | ||
| if utils.ContainsString(filepath.SplitList(path), "test") { |
There was a problem hiding this comment.
Is there some convention where these test related directories are often bundled in the image that we have to explicitly filter them? If so are they always named 'test'?
There was a problem hiding this comment.
The publish script takes the artifacts directory as an input. And for publishing the artifacts, It traverse to the specific plugin/version artifact directory at bundles the plugins from there. Sometimes, if the test plugin directory exists the bundle also includes test plugin directory, and this change just trying to skip that if it exists.
To improve around this, we can make some changes in the publish script to make sure it only publishes plugin binary and skip the publishing of the directory. But this check has been added as a safeguard for now.
- This change adds support for `oci` discovery/distribution with `tanzu builder publish` command - Adds a new `Makefile` section for "Building and publishing CLIPlugin Discovery resources and binaries to OCI image
- Adds support for OCI based plugin discovery and artifact downloads - Adds support to use carvel package as an OCI discovery endpoint. This change uses ytt and kbld library to read the carvel package
d20be10 to
9cc9029
Compare
9cc9029 to
cc71669
Compare
|
Cluster Generation A/B Results: |
|
Cluster Generation A/B Results: |
|
Cluster Generation A/B Results: |
What this PR does / why we need it
ocidiscovery/distribution withtanzu builder publishcommandMakefilesection for "Building and publishing CLIPluginDiscovery resources and binaries to OCI image
change uses ytt and kbld library to read the carvel package
Which issue(s) this PR fixes
Fixes #946
Describe testing done for PR
Release note
PR Checklist
Additional information
Special notes for your reviewer