Merge pull request #1356 from Random-Liu/revert-#1349
Fix privileged support
This commit is contained in:
commit
e68cc95fe4
@ -8,8 +8,9 @@ environment:
|
|||||||
GOPATH: C:\gopath
|
GOPATH: C:\gopath
|
||||||
PATH: C:\go\bin;C:\tools\mingw64\bin;$(PATH)
|
PATH: C:\go\bin;C:\tools\mingw64\bin;$(PATH)
|
||||||
CGO_ENABLED: 1
|
CGO_ENABLED: 1
|
||||||
|
GO111MODULE: off
|
||||||
matrix:
|
matrix:
|
||||||
- GO_VERSION: 1.12.9
|
- GO_VERSION: 1.13.4
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install Mingw
|
# Install Mingw
|
||||||
|
@ -3,7 +3,7 @@ git:
|
|||||||
|
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.12.x
|
- 1.13.4
|
||||||
- tip
|
- tip
|
||||||
|
|
||||||
|
|
||||||
@ -13,6 +13,9 @@ matrix:
|
|||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
|
|
||||||
|
env:
|
||||||
|
- GO111MODULE=off
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ func (c *criService) containerSpec(id string, sandboxID string, sandboxPid uint3
|
|||||||
}
|
}
|
||||||
specOpts = append(specOpts, oci.WithPrivileged)
|
specOpts = append(specOpts, oci.WithPrivileged)
|
||||||
if !ociRuntime.PrivilegedWithoutHostDevices {
|
if !ociRuntime.PrivilegedWithoutHostDevices {
|
||||||
specOpts = append(specOpts, oci.WithHostDevices)
|
specOpts = append(specOpts, oci.WithHostDevices, oci.WithAllDevicesAllowed)
|
||||||
}
|
}
|
||||||
} else { // not privileged
|
} else { // not privileged
|
||||||
specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext))
|
specOpts = append(specOpts, customopts.WithDevices(c.os, config), customopts.WithCapabilities(securityContext))
|
||||||
|
Loading…
Reference in New Issue
Block a user