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

doc/containerized-gadgets: Update Packaging chapter to reflect current status #1968

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

burak-ok
Copy link
Member

doc/containerized-gadgets: Update Packaging chapter to reflect current status

Updates the documentation about the packaging of containerized gadgets.

@burak-ok burak-ok marked this pull request as ready for review August 23, 2023 17:07
Signed-off-by: Burak Ok <burakok@microsoft.com>
Copy link
Member

@mqasimsarfraz mqasimsarfraz left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@burak-ok burak-ok merged commit 2832836 into main Aug 24, 2023
46 checks passed
@burak-ok burak-ok deleted the burak/cg/doc_spec branch August 24, 2023 06:48

TODO: How the user could specify these annotations when using the build command?

### Definition File
### Definition File <a name="def-file"></a>
Copy link
Member

Choose a reason for hiding this comment

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

nit: This change is not needed, you can create anchor links in md files just by doing [Tittle of link](#name-of-section-to-link), in this case [the definition file](#definition-file), see more here.

The OCI image should contain the following [OCI annotations](https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys):
- `org.opencontainers.image.title`
- `org.opencontainers.image.description`
- `org.opencontainers.image.url`

TODO: How the user could specify these annotations when using the build command?
Copy link
Member

Choose a reason for hiding this comment

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

I suggest to allow specifying them in the build command like fpm that allows specifying --license, --url, --description, etc.

However, I was wondering why not to move the author and description info into the definition file? Or maybe the convention is to have this info as annotations?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing is set in stone and everything is still experimental - I also don't know the best place :D

I have chosen to put it in an annotation on the eBPF layer so the author is tied to the eBPF code. The definition file is "just" a file which tells Inspektor Gadget which fields of the struct should be shown -> Nothing "to author" here

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense, so we can go with the same approach of fpm.

Comment on lines +148 to +152
"mediaType": "application/vnd.gadget.config.v1+yaml",
"digest": "sha256:eb71861c0a5d5ca9a706fffa20fead54f64a1624dfeef5d334a8a3c2462c4c37",
"size": 628,
"annotations": {
"org.opencontainers.image.title": "config.yaml"
Copy link
Member

Choose a reason for hiding this comment

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

It is called "Definition file" in the documentation but config here. I think it might lead to confusion when ppl will start referring to it some times as configuration or and some others as definition file. Maybe definition.yaml or def.yaml?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am also confused by it a lot xD I would change that in another PR which also modifies the ig image build command

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.

None yet

3 participants