diff --git a/cmd/ctr/commands/commands.go b/cmd/ctr/commands/commands.go index f4c5ec034..d0e52a652 100644 --- a/cmd/ctr/commands/commands.go +++ b/cmd/ctr/commands/commands.go @@ -193,6 +193,10 @@ var ( Name: "apparmor-profile", Usage: "enable AppArmor with an existing custom profile", }, + cli.StringFlag{ + Name: "rdt-class", + Usage: "name of the RDT class to associate the container with. Specifies a Class of Service (CLOS) for cache and memory bandwidth management.", + }, } ) diff --git a/cmd/ctr/commands/run/run_unix.go b/cmd/ctr/commands/run/run_unix.go index 019d0d7e7..7641ba61b 100644 --- a/cmd/ctr/commands/run/run_unix.go +++ b/cmd/ctr/commands/run/run_unix.go @@ -324,6 +324,10 @@ func NewContainer(ctx gocontext.Context, client *containerd.Client, context *cli return nil }) } + + if c := context.String("rdt-class"); c != "" { + opts = append(opts, oci.WithRdt(c, "", "")) + } } runtimeOpts, err := getRuntimeOptions(context)