mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 07:19:06 +00:00
virtcontainers: remove all the code related to HasCRIContainerType
All the code related to HasCRIContainerType is useless and no longer needed since the CRIContainerType annotation is not considered for constraining or not the sandbox Signed-off-by: Julio Montes <julio.montes@intel.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
8f5a69373b
commit
e6aac8390e
@ -843,8 +843,6 @@ func SandboxConfig(ocispec specs.Spec, runtime RuntimeConfig, bundlePath, cid, c
|
||||
// Spec: &ocispec,
|
||||
|
||||
Experimental: runtime.Experimental,
|
||||
|
||||
HasCRIContainerType: HasCRIContainerType(ocispec.Annotations),
|
||||
}
|
||||
|
||||
if err := addAnnotations(ocispec, &sandboxConfig); err != nil {
|
||||
@ -1013,14 +1011,3 @@ func GetOCIConfig(status vc.ContainerStatus) (specs.Spec, error) {
|
||||
|
||||
return *status.Spec, nil
|
||||
}
|
||||
|
||||
// HasCRIContainerType returns true if annottations contain
|
||||
// a CRI container type annotation
|
||||
func HasCRIContainerType(annotations map[string]string) bool {
|
||||
for _, key := range CRIContainerTypeKeyList {
|
||||
if _, ok := annotations[key]; ok {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
@ -123,9 +123,6 @@ type SandboxConfig struct {
|
||||
|
||||
DisableGuestSeccomp bool
|
||||
|
||||
// HasCRIContainerType specifies whether container type was set explicitly through annotations or not.
|
||||
HasCRIContainerType bool
|
||||
|
||||
// Experimental features enabled
|
||||
Experimental []exp.Feature
|
||||
|
||||
@ -2135,8 +2132,6 @@ func (s *Sandbox) setupSandboxCgroup() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
s.Logger().WithField("hasCRIContainerType", s.config.HasCRIContainerType).Debug("Setting sandbox cgroup")
|
||||
|
||||
s.state.CgroupPath, err = vccgroups.ValidCgroupPath(spec.Linux.CgroupsPath, s.config.SystemdCgroup)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Invalid cgroup path: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user