From 622a7783f500fb7d41287317948f6530399cd4a5 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Mon, 30 Oct 2023 10:45:05 +0200 Subject: [PATCH 1/2] webhooks: update sgx device node paths Signed-off-by: Mikko Ylinen --- pkg/webhooks/sgx/sgx.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/webhooks/sgx/sgx.go b/pkg/webhooks/sgx/sgx.go index ee0a8f449..b6e9e7ec6 100644 --- a/pkg/webhooks/sgx/sgx.go +++ b/pkg/webhooks/sgx/sgx.go @@ -153,13 +153,13 @@ func (s *Mutator) Default(ctx context.Context, obj runtime.Object) error { // Quote Generation Modes: // // in-process: A container has its own quote provider library library: In this mode, - // the container needs a handle to /dev/sgx/provision (sgx.intel.com/provision resource). + // the container needs a handle to /dev/sgx_provision (sgx.intel.com/provision resource). // out-of-process: A container uses Intel aesmd. In this mode, the container must talk to // aesmd over /var/run/aesmd/aesm.sock. aesmd can run either as a side-car or a DaemonSet // // Mode selection: The mode selection is done by setting sgx.intel.com/quote-provider annotation // to a value that specifies the container name. If the annotation matches the container requesting - // SGX EPC resources, the webhook adds both /dev/sgx/provision and /dev/sgx/enclave resource requests. + // SGX EPC resources, the webhook adds both /dev/sgx_provision and /dev/sgx_enclave resource requests. // Without sgx.intel.com/quote-provider annotation set, the container is not able to generate quotes // for its enclaves. When pods set sgx.intel.com/quote-provider: "aesmd", Intel aesmd specific volume // mounts are added. In both DaemonSet and sidecar deployment scenarios for aesmd, its container name From 48fd7b82fe0ca7a30c6ee41ef994bae18243c0a9 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Mon, 30 Oct 2023 13:29:59 +0200 Subject: [PATCH 2/2] controllers: use const appLabel in tests Signed-off-by: Mikko Ylinen --- pkg/controllers/dlb/controller_test.go | 2 +- pkg/controllers/dsa/controller_test.go | 2 +- pkg/controllers/fpga/controller_test.go | 2 +- pkg/controllers/gpu/controller_test.go | 2 +- pkg/controllers/qat/controller_test.go | 2 +- pkg/controllers/sgx/controller_test.go | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/controllers/dlb/controller_test.go b/pkg/controllers/dlb/controller_test.go index a93ac4875..f0573220d 100644 --- a/pkg/controllers/dlb/controller_test.go +++ b/pkg/controllers/dlb/controller_test.go @@ -42,7 +42,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-dlb-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/dsa/controller_test.go b/pkg/controllers/dsa/controller_test.go index d1de04de6..c168093d6 100644 --- a/pkg/controllers/dsa/controller_test.go +++ b/pkg/controllers/dsa/controller_test.go @@ -43,7 +43,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-dsa-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/fpga/controller_test.go b/pkg/controllers/fpga/controller_test.go index 806a2cef9..76e974f0c 100644 --- a/pkg/controllers/fpga/controller_test.go +++ b/pkg/controllers/fpga/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-fpga-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/gpu/controller_test.go b/pkg/controllers/gpu/controller_test.go index 94b28b9cc..c0b8b8241 100644 --- a/pkg/controllers/gpu/controller_test.go +++ b/pkg/controllers/gpu/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-gpu-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/qat/controller_test.go b/pkg/controllers/qat/controller_test.go index 83c3e90cf..c2eb12bef 100644 --- a/pkg/controllers/qat/controller_test.go +++ b/pkg/controllers/qat/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-qat-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, }, diff --git a/pkg/controllers/sgx/controller_test.go b/pkg/controllers/sgx/controller_test.go index f4a7b20df..2281d78da 100644 --- a/pkg/controllers/sgx/controller_test.go +++ b/pkg/controllers/sgx/controller_test.go @@ -45,7 +45,7 @@ func (c *controller) newDaemonSetExpected(rawObj client.Object) *apps.DaemonSet }, ObjectMeta: metav1.ObjectMeta{ Namespace: c.ns, - Name: "intel-sgx-plugin", + Name: appLabel, Labels: map[string]string{ "app": appLabel, },