Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
694 changes: 427 additions & 267 deletions cmd/containerd-shim-runhcs-v1/options/runhcs.pb.go

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions cmd/containerd-shim-runhcs-v1/options/runhcs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ message Options {
// The typical example is if Containerd has restarted but is expected to come back online. A 0 for this field is interpreted as an infinite
// timeout.
int32 io_retry_timeout_in_sec = 17;

// default_container_annotations specifies a set of annotations that should be set for every workload container
map<string, string> default_container_annotations = 18;
}

// ProcessDetails contains additional information about a process. This is the additional
Expand Down
6 changes: 6 additions & 0 deletions internal/oci/uvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Copy Markdown
Member

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.

// Make sure not to override any annotations which are set explicitly
if _, ok := s.Annotations[key]; !ok {
s.Annotations[key] = value
}
}
return s
}
Loading