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

Add annotations to CreateSandbox request #8960

Merged
merged 2 commits into from
Aug 23, 2023

Conversation

dcantah
Copy link
Member

@dcantah dcantah commented Aug 12, 2023

An oft employed scheme for a lot of our APIs is to include an
annotations field which is just a map of string to string. This
usually allows folks using the API to send over metadata or auxiliary
information without needing to get a new field added (especially where
the field might not make sense for it to be a standalone field). I think
having annotations for CreateSandbox makes sense for this same use case.

@dcantah dcantah force-pushed the sandbox-annotations branch 2 times, most recently from cd637c5 to 60cdec6 Compare August 12, 2023 06:50
An oft employed scheme for a lot of our APIs is to include an
annotations field which is just a map of string to string. This
usually allows folks using the API to send over metadata or auxiliary
information without needing to get a new field added (especially where
the field might not make sense for it to be a standalone field). I think
having annotations for CreateSandbox make sense for this same use case.

Signed-off-by: Danny Canter <danny@dcantah.dev>
Following the addition of annotations to the grpc/ttrpc API surface,
follow suit with adding annotations to the controller api surface.

Signed-off-by: Danny Canter <danny@dcantah.dev>
Copy link
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcgowan
Copy link
Member

What type of information would be stored in the annotations? We more commonly use "labels" in our API and storage layer. The difference between the two is labels are often used or interpreted by containerd plugins (gc labels, filtering labels, plugin features) while annotations are mostly metadata that just gets passed or inherited as part of another structure.

@dcantah
Copy link
Member Author

dcantah commented Aug 16, 2023

@dmcgowan I was thinking "feature" toggles or other info related to actually running the workload. For instance this might've been used before the netnspath field was added to send over that info while someone explored its viability, or if it needed to be a full field

@mxpv mxpv merged commit e7dee26 into containerd:main Aug 23, 2023
45 checks passed
@dmcgowan dmcgowan changed the title Sandbox: Add annotations to CreateSandbox surface Add annotations to CreateSandbox surface May 3, 2024
@dmcgowan dmcgowan changed the title Add annotations to CreateSandbox surface Add annotations to CreateSandbox request May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

6 participants