-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Conversation
cd637c5
to
60cdec6
Compare
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>
60cdec6
to
def5ff3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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. |
@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 |
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.