Merge pull request #5490 from askervin/5Bu_blockio
Support for cgroups blockio
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user