Skip to content
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

Unpack tool, its image and an example #1

Merged
merged 4 commits into from
Sep 21, 2020
Merged

Conversation

muvaf
Copy link
Member

@muvaf muvaf commented Sep 18, 2020

This PR includes the lean unpack tool which reads all Kubernetes YAMLs in the current directory recursively and prints them to stdout. For additional metadata processing, flags or different binaries and their images can be built.

@kasey I couldn't add you as reviewer, seems you're not member of crossplane-contrib org.

Fixes crossplane/crossplane#1714

Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
@muvaf muvaf requested review from negz and hasheddan September 18, 2020 13:33
@muvaf
Copy link
Member Author

muvaf commented Sep 18, 2020

Currently, this reads only YAML files. The stream piping each and every file is not feasible because we'd need to invent new file separators for different files and different types of files. I believe for additional Upbound metadata, we'll either need to build another binary or introduce a flag to this one that will read icons, ui-schemas etc directly from the filesystem rather than its stdin. It can use this binary to get all YAMLs or be completely separate.

@muvaf muvaf mentioned this pull request Sep 18, 2020
2 tasks
Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, this reads only YAML files.

This SGTM 👍 I could also see requiring even things like icons being encapsulated in a YAML document so that they could still be handled by the parser.

cluster/images/pkg-unpack/Dockerfile Show resolved Hide resolved
cmd/pkg-unpack/main.go Outdated Show resolved Hide resolved
examples/configuration/resources/clusterrole.yaml Outdated Show resolved Hide resolved
cmd/pkg-unpack/main.go Show resolved Hide resolved
Signed-off-by: Muvaffak Onus <onus.muvaffak@gmail.com>
@muvaf
Copy link
Member Author

muvaf commented Sep 21, 2020

@hasheddan thanks for the review! All your feedback should be addressed.

Copy link
Member

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this @muvaf! I am good with moving forward and we can circle back for any clean up needed after doing more manual e2e testing 👍

@muvaf muvaf merged commit 530f193 into crossplane:master Sep 21, 2020
@muvaf muvaf deleted the run branch September 21, 2020 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build and publish unpack base image
2 participants