Skip to content

Commit c7feb2d

Browse files
authored
Merge pull request #1464 from hj-johannes-lee/PR-2023-018
sgx: use sgx-sdk-demo app instead of busybox
2 parents f740a0e + d8f8c95 commit c7feb2d

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.github/workflows/e2e.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
images: intel-qat-plugin intel-qat-initcontainer openssl-qat-engine
5252
- name: e2e-sgx
5353
runner: sgx
54-
images: intel-sgx-plugin intel-sgx-initcontainer intel-sgx-admissionwebhook intel-deviceplugin-operator
54+
images: intel-sgx-plugin intel-sgx-initcontainer intel-sgx-admissionwebhook sgx-sdk-demo intel-deviceplugin-operator
5555

5656
name: ${{ matrix.name }}
5757
runs-on: ${{ matrix.runner }}

demo/sgx-sdk-demo/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN apt-get update && \
2323
# SGX SDK is installed in /opt/intel directory.
2424
WORKDIR /opt/intel
2525

26-
ARG DCAP_VERSION=DCAP_1.15
26+
ARG DCAP_VERSION=DCAP_1.17
2727

2828
RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://download.01.org/intel-sgx/sgx_repo/ubuntu jammy main" | \
2929
tee -a /etc/apt/sources.list.d/intel-sgx.list \
@@ -36,7 +36,7 @@ RUN echo "deb [arch=amd64 signed-by=/usr/share/keyrings/intel-sgx.gpg] https://d
3636
libsgx-quote-ex-dev
3737

3838
# Install SGX SDK
39-
ARG SGX_SDK_URL=https://download.01.org/intel-sgx/sgx-linux/2.18/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.18.100.3.bin
39+
ARG SGX_SDK_URL=https://download.01.org/intel-sgx/sgx-linux/2.20/distro/ubuntu22.04-server/sgx_linux_x64_sdk_2.20.100.4.bin
4040
RUN wget ${SGX_SDK_URL} \
4141
&& export SGX_SDK_INSTALLER=$(basename $SGX_SDK_URL) \
4242
&& chmod +x $SGX_SDK_INSTALLER \

scripts/set-version.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ if [ $# != 1 ] || [ "$1" = "?" ] || [ "$1" = "--help" ]; then
1515
exit 1
1616
fi
1717

18-
files=$(git grep -l '^TAG?*=\|intel/accel-config-demo:\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/openssl-qat-engine:\|intel/dlb-libdlb-demo:\|intel/intel-[^ ]*:\|version=\|appVersion:\|tag:' Makefile deployments demo/*accel-config*.yaml demo/*fpga*.yaml demo/*openssl*.yaml demo/dlb-libdlb*.yaml pkg/controllers/*/*_test.go build/docker/*.Dockerfile test/e2e/*/*.go)
18+
files=$(git grep -l '^TAG?*=\|intel/accel-config-demo:\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/openssl-qat-engine:\|intel/dlb-libdlb-demo:\|intel/sgx-sdk-demo:\|intel/intel-[^ ]*:\|version=\|appVersion:\|tag:' Makefile deployments demo/*accel-config*.yaml demo/*fpga*.yaml demo/*openssl*.yaml demo/dlb-libdlb*.yaml pkg/controllers/*/*_test.go build/docker/*.Dockerfile test/e2e/*/*.go)
1919

2020
for file in $files; do
21-
sed -i -e "s;\(^TAG?*=\|intel/accel-config-demo:\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/openssl-qat-engine:\|intel/dlb-libdlb-demo:\|intel/intel-[^ ]*:\|version=\|appVersion: [^ ]\|tag: [^ ]\)[^ \"]*;\1$1;g" "$file";
21+
sed -i -e "s;\(^TAG?*=\|intel/accel-config-demo:\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/openssl-qat-engine:\|intel/dlb-libdlb-demo:\|intel/sgx-sdk-demo:\|intel/intel-[^ ]*:\|version=\|appVersion: [^ ]\|tag: [^ ]\)[^ \"]*;\1$1;g" "$file";
2222
done

test/e2e/sgx/sgx.go

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
e2edebug "k8s.io/kubernetes/test/e2e/framework/debug"
3030
e2ekubectl "k8s.io/kubernetes/test/e2e/framework/kubectl"
3131
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
32-
imageutils "k8s.io/kubernetes/test/utils/image"
3332
admissionapi "k8s.io/pod-security-admission/api"
3433
)
3534

@@ -93,16 +92,16 @@ func describe() {
9392
}
9493
})
9594

96-
ginkgo.It("deploys a pod requesting SGX enclave resources", func(ctx context.Context) {
95+
ginkgo.It("deploys a sgx-sdk-demo pod requesting SGX enclave resources", func(ctx context.Context) {
9796
podSpec := &v1.Pod{
9897
ObjectMeta: metav1.ObjectMeta{Name: "sgxplugin-tester"},
9998
Spec: v1.PodSpec{
10099
Containers: []v1.Container{
101100
{
102-
Args: []string{"-c", "echo hello world"},
103-
Name: "testcontainer",
104-
Image: imageutils.GetE2EImage(imageutils.BusyBox),
105-
Command: []string{"/bin/sh"},
101+
Name: "testcontainer",
102+
Image: "intel/sgx-sdk-demo:devel",
103+
WorkingDir: "/opt/intel/sgx-sample-app/",
104+
Command: []string{"/opt/intel/sgx-sample-app/sgx-sample-app"},
106105
Resources: v1.ResourceRequirements{
107106
Requests: v1.ResourceList{"sgx.intel.com/epc": resource.MustParse("42")},
108107
Limits: v1.ResourceList{"sgx.intel.com/epc": resource.MustParse("42")},

0 commit comments

Comments
 (0)