Skip to content

Commit

Permalink
make specs-go a module
Browse files Browse the repository at this point in the history
This should allow to import CDI spec structures without adding
a lot of CDI runtime deps.

It should partly fix #97 and allow Kubernetes to refer this module directly.
There are at least 2 places in the k/k codebase that would benefit
from this change:
- this can be replaced by the specs-go import:
  https://github.com/kubernetes/kubernetes/blob/master/test/e2e/dra/test-driver/app/cdi.go
- this can import specs-go and use JSON marshalling instead of
  quite ugly approach it uses to write CDI files:
  https://github.com/kubernetes/kubernetes/blob/master/test/images/sample-device-plugin/sampledeviceplugin.go#L237

Signed-off-by: Ed Bartosh <[email protected]>
  • Loading branch information
bart0sh committed Oct 26, 2023
1 parent 1f83d84 commit 3e427f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions specs-go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module github.com/container-orchestrated-devices/container-device-interface/specs-go

go 1.17

require github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78
2 changes: 2 additions & 0 deletions specs-go/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 h1:R5M2qXZiK/mWPMT4VldCOiSL9HIAMuxQZWdG0CSM5+4=
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=

0 comments on commit 3e427f2

Please sign in to comment.