Skip to content

Commit

Permalink
Remove unsupported K8s device capability [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
pditommaso committed Oct 10, 2023
1 parent 035e6e7 commit be0cf0c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@ class PodSpecBuilder {
return this
}

PodSpecBuilder withDevices(List<String> dev) {
this.devices = dev
return this
}

PodSpecBuilder withActiveDeadline(int seconds) {
this.activeDeadlineSeconds = seconds
return this
Expand Down Expand Up @@ -417,9 +412,6 @@ class PodSpecBuilder {
if( imagePullPolicy )
container.imagePullPolicy = imagePullPolicy

if( devices )
container.devices = devices

final secContext = new LinkedHashMap(10)
if( privileged ) {
// note: privileged flag needs to be defined in the *container* securityContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,6 @@ class PodSpecBuilderTest extends Specification {

}

def 'should create pod spec with device and capabilities' () {

when:
def pod = new PodSpecBuilder()
.withPodName('foo')
.withImageName('busybox')
.withCommand('echo foo')
.withDevices(['/dev/fuse'])
.withCapabilities(add:['SYS_ADMIN'])
.build()

then:
pod.spec.containers[0].devices == ['/dev/fuse']
pod.spec.containers[0].securityContext == [capabilities: [add:['SYS_ADMIN']]]

}

def 'should create pod with resources limits' () {
when:
def pod1 = new PodSpecBuilder()
Expand Down

0 comments on commit be0cf0c

Please sign in to comment.