mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-08-09 05:20:32 +00:00
This change updates four dependencies: - github.com/containerd/containerd/api from v1.11.0 to v1.11.1 - github.com/cyphar/filepath-securejoin from v0.6.1 to v0.7.0 - github.com/opencontainers/cgroups from v0.0.6 to v0.0.7 - github.com/opencontainers/selinux from v1.13.1 to v1.15.1 The new filepath-securejoin release requires a newer version of cyphar.com/go-pathrs, so that module also moves from v0.2.2 to v0.2.5. The file hack/unwanted-dependencies.json did not need any changes. Signed-off-by: Davanum Srinivas <davanum@gmail.com>
38 lines
775 B
Go
38 lines
775 B
Go
package fs
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"github.com/opencontainers/cgroups"
|
|
)
|
|
|
|
type NetClsGroup struct{}
|
|
|
|
func (s *NetClsGroup) Name() string {
|
|
return "net_cls"
|
|
}
|
|
|
|
// ID returns the controller ID for net_cls subsystem.
|
|
// Returns 0 as net_cls is not a cgroups.Controller.
|
|
func (s *NetClsGroup) ID() cgroups.Controller {
|
|
return 0
|
|
}
|
|
|
|
func (s *NetClsGroup) Apply(path string, _ *cgroups.Resources, pid int) error {
|
|
return apply(path, pid)
|
|
}
|
|
|
|
func (s *NetClsGroup) Set(path string, r *cgroups.Resources) error {
|
|
if r.NetClsClassid != 0 {
|
|
if err := cgroups.WriteFile(path, "net_cls.classid", strconv.FormatUint(uint64(r.NetClsClassid), 10)); err != nil {
|
|
return err
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (s *NetClsGroup) GetStats(path string, stats *cgroups.Stats) error {
|
|
return nil
|
|
}
|