Merge pull request #5490 from askervin/5Bu_blockio

Support for cgroups blockio
This commit is contained in:
Mike Brown
2022-04-29 10:07:56 -05:00
committed by GitHub
27 changed files with 1898 additions and 7 deletions

View File

@@ -263,6 +263,19 @@ func (c *criService) containerSpec(
supplementalGroups := securityContext.GetSupplementalGroups()
// Get blockio class
blockIOClass, err := c.blockIOClassFromAnnotations(config.GetMetadata().GetName(), config.Annotations, sandboxConfig.Annotations)
if err != nil {
return nil, fmt.Errorf("failed to set blockio class: %w", err)
}
if blockIOClass != "" {
if linuxBlockIO, err := blockIOToLinuxOci(blockIOClass); err == nil {
specOpts = append(specOpts, oci.WithBlockIO(linuxBlockIO))
} else {
return nil, err
}
}
// Get RDT class
rdtClass, err := c.rdtClassFromAnnotations(config.GetMetadata().GetName(), config.Annotations, sandboxConfig.Annotations)
if err != nil {