Skip to content

Commit 6ae5122

Browse files
authored
feat: implement Intel TDX/AMD SEV-SNP support
Hardware Support: Added support for Intel TDX and AMD SEV-SNP device attestation. Architecture: Refactored to a multi-resource architecture supporting concurrent plugin instances. Resource Logic: Fixed vTPM sharing limits (corrected from 1 to 256). Reliability: Implemented robust socket cleanup and standardized error handling (errcheck). CI/CD: Updated GitHub Actions to v5, enabled strict linting, and expanded test coverage to ./... .
1 parent f500743 commit 6ae5122

11 files changed

Lines changed: 491 additions & 379 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,47 +29,38 @@ jobs:
2929
matrix:
3030
go-version: [1.21.x]
3131
os: [ubuntu-latest]
32-
architecture: [x32, x64]
33-
name: Generate/Build/Test (${{ matrix.os }}, ${{ matrix.architecture }}, Go ${{ matrix.go-version }})
32+
architecture: [x64]
33+
name: Build/Test (${{ matrix.os }}, ${{ matrix.architecture }}, Go ${{ matrix.go-version }})
3434
runs-on: ${{ matrix.os }}
3535
steps:
36-
- uses: actions/checkout@v3
37-
- uses: actions/setup-go@v4
36+
- uses: actions/checkout@v4
37+
- uses: actions/setup-go@v5
3838
with:
3939
go-version: ${{ matrix.go-version }}
4040
architecture: ${{ matrix.architecture }}
41+
cache: true
4142
- name: Build all modules
42-
run: CGO_ENABLED=0 go build -v
43+
run: CGO_ENABLED=0 go build -v ./...
4344
- name: Test all modules
44-
run: CGO_ENABLED=0 go test ./deviceplugin/... -v
45+
run: CGO_ENABLED=0 go test ./... -v
4546

4647
lint:
47-
strategy:
48-
matrix:
49-
go-version: [1.21.x]
50-
os: [ubuntu-latest]
51-
dir: ["./"]
52-
name: Lint ${{ matrix.dir }} (${{ matrix.os }}, Go ${{ matrix.go-version }})
53-
runs-on: ${{ matrix.os }}
48+
runs-on: ubuntu-latest
5449
steps:
55-
- uses: actions/checkout@v3
56-
- uses: actions/setup-go@v2
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-go@v5
5752
with:
58-
go-version: ${{ matrix.go-version }}
53+
go-version: 1.21.x
54+
cache: true
5955
- name: Run golangci-lint
60-
uses: golangci/golangci-lint-action@v3.2.0
56+
uses: golangci/golangci-lint-action@v4
6157
with:
6258
version: latest
63-
working-directory: ${{ matrix.dir }}
6459
args: >
65-
-D errcheck
60+
-E errcheck
6661
-E stylecheck
6762
-E goimports
6863
-E misspell
6964
-E revive
7065
-E gofmt
71-
-E goimports
72-
--exclude-use-default=false
73-
--max-same-issues=0
74-
--max-issues-per-linter=0
75-
--timeout 2m
66+
--timeout 5m

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ this plugin deployed in your Kubernetes cluster, you will be able to run jobs
1515
* This plugin targets Kubernetes v1.18+.
1616

1717
## Deployment
18-
The device plugin needs to be run on all the nodes that are equipped with Confidential Computing devices (e.g. TPM). The simplest way of doing so is to create a Kubernetes [DaemonSet][dp], which run a copy of a pod on all (or some) Nodes in the cluster. We have a pre-built Docker image on [Goolge Artifact Registry][release] that you can use for with your DaemonSet. This repository also have a pre-defined yaml file named `cc-device-plugin.yaml`. You can create a DaemonSet in your Kubernetes cluster by running this command:
18+
The device plugin needs to be run on all the nodes that are equipped with Confidential Computing devices (e.g. TPM). The simplest way of doing so is to create a Kubernetes [DaemonSet][dp], which run a copy of a pod on all (or some) Nodes in the cluster. We have a pre-built Docker image on [Google Artifact Registry][release] that you can use for with your DaemonSet. This repository also have a pre-defined yaml file named `cc-device-plugin.yaml`. You can create a DaemonSet in your Kubernetes cluster by running this command:
1919

2020
```
2121
kubectl create -f manifests/cc-device-plugin.yaml

0 commit comments

Comments
 (0)