-
Notifications
You must be signed in to change notification settings - Fork 264
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 DefaultContainerAnnotations runhcs option #1210
Add DefaultContainerAnnotations runhcs option #1210
Conversation
e6212c5
to
3784904
Compare
Assigning to @kevpar, since it was his idea 😄 |
Signed-off-by: Maksim An <maksiman@microsoft.com>
Signed-off-by: Maksim An <maksiman@microsoft.com>
3784904
to
c5f2a39
Compare
@anmaxvl Could you please add a description about why this is required? |
Signed-off-by: Maksim An <maksiman@microsoft.com>
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
@@ -395,5 +395,11 @@ func UpdateSpecFromOptions(s specs.Spec, opts *runhcsopts.Options) specs.Spec { | |||
s.Annotations[annotations.NetworkConfigProxy] = opts.NCProxyAddr | |||
} | |||
|
|||
for key, value := range opts.DefaultContainerAnnotations { |
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.
It's weird this code lives in uvm.go
, given it is not at all specific to UVMs, or hv-isolation. Perhaps we can address that in a future change.
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
Related work items: microsoft#1067, microsoft#1097, microsoft#1119, microsoft#1170, microsoft#1176, microsoft#1180, microsoft#1181, microsoft#1182, microsoft#1183, microsoft#1184, microsoft#1185, microsoft#1186, microsoft#1187, microsoft#1188, microsoft#1189, microsoft#1191, microsoft#1193, microsoft#1194, microsoft#1195, microsoft#1196, microsoft#1197, microsoft#1200, microsoft#1201, microsoft#1202, microsoft#1203, microsoft#1204, microsoft#1205, microsoft#1206, microsoft#1207, microsoft#1209, microsoft#1210, microsoft#1211, microsoft#1218, microsoft#1219, microsoft#1220, microsoft#1223
protos: Add default_container_annotations to runhcs options protos Assign default container annotations from runhcs options to container spec Annotations, without overriding the ones that are explicitly passed Signed-off-by: Maksim An <maksiman@microsoft.com>
Add default_container_annotations to runhcs options protos
Set container spec Annotations from runhcs options
This PR adds support for a scenario, when we'd want to set default
annotations on all containers within a deployment, e.g.
/dev/shm
size,container's scratch size or any other setting controlled by annotations.
The default annotations don't override the ones passed explicitly in the
container spec.