Commit Graph

36 Commits

Author SHA1 Message Date
Mikko Ylinen
fd1b25b9d4 docs: move away from 01.org doc links
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-10-03 18:22:07 +03:00
Mikko Ylinen
8ac321f5e3 sgx: send nil TopologyInfo
/dev/sgx_* cannot be mapped to any topology. SGX itself is topology
aware but we cannot control it with TopologyInfo.

Currently, pkg/topology returns empty TopologyInfo{Nodes:[]*NUMANode{}}
for /dev/sgx_* but kubelet TopologyManager (when enabled and with the
policy other than 'none') interpretes that as "Hint Provider has no
possible NUMA affinities for resource" and rejects the SGX resources.

What we want is "Hint Provider has no preference for NUMA affinity with
resource". This is communicated using nil TopologyInfo.

See: https://github.com/kubernetes/kubernetes/issues/112234

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-06 08:43:04 +03:00
Mikko Ylinen
1b3accacc2 docs: rework development guide
Currently, each individual plugin README documents roughly the same
daily development steps to git clone, build, and deploy. Re-purpose
the plugin READMEs more towards cluster admin type of documentation
and start moving all development related documentation to DEVEL.md.

The same is true for e2e testing documentation which is scattered
in places where they don't belong to. Having all day-to-day
development Howtos is good to have in a centralized place.

Finally, the cleanup includes some harmonization to plugins'
table of contents which now follows the pattern:

* [Introduction](#introduction)
(* [Modes and Configuration Options](#modes-and-configuration-options))
* [Installation](#installation)
    (* [Prerequisites](#prerequisites))
    * [Pre-built Images](#pre-built-images)
    * [Verify Plugin Registration](#verify-plugin-registration)
* [Testing and Demos](#testing-and-demos)
    * ...

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-08-31 20:00:15 +03:00
astronaut0131
2d155edac7 sgx: add kind deployment notes for aesmd 2022-08-15 15:26:01 +08:00
Huang Xin
89caad1cd4 doc: modify SGX device plugin deployments url from 'main' to '<RELEASE_VERSION>'
Signed-off-by: Huang Xin <xin1.huang@intel.com>
2022-06-25 17:33:46 +08:00
Hyeongju Johannes Lee
85a12609a3 sgx: deprecate /dev/sgx/ mounts
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2022-05-09 18:59:34 +03:00
Mikko Ylinen
72c4552253 deployments: move SGX NFD config to an NFD kustomize overlay
Start using the newly created NodeFeatureRule configs with SGX.
This allows to drop the custom worker config.

Additionally, split the example NFD deployment into two steps

1) plain NFD (+SGX json patches)
2) NodeFeatureRule creation

NodeFeatureRule creation is not guaranteed to succeed when it's
part of the same kustomization with the CRD creation. Users may
also have NFD already running so allowing 2) alone works better
in that scenario.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-02-18 11:17:57 +02:00
Mikko Ylinen
a74774f939 docs: update cert-manager installation instructions
The webhooks' default deployments depend on cert-manager. Our existing
documentation points to a specific cert-manager version giving users
the impression that it should be used. However, that is not the case.

Update the documentation so that we just point to cert-manager
installation page. With this, we don't have to hard-code to any
specific version.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-02-16 11:26:37 +02:00
Ed Bartosh
55f3e17dd0 add 'annotations' parameter to the NewDeviceInfo API
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-02-07 15:15:30 +02:00
Ed Bartosh
cec004c398 lint: enable wsl check
Fixes: #392

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-12-17 11:48:48 +02:00
Mikko Ylinen
e83a811ec7 sgx: update README
The cmdline flags talked about the old device nodes. With the
upstream driver, the devices nodes are /dev/sgx_[enclave|provision].

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-12-01 14:33:33 +02:00
Mikko Ylinen
1c4ee778b3 sgx: update NFD deployment
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-11-25 17:13:03 +02:00
Hyeongju Johannes Lee
8fc5df7e37 Add govet-fieldalignment
Add govet-fieldalignment to .golangci.yml
Fix errors that come from adding govet-fieldalignment
- by reordering the fields of structs
- by putting nolint:govet annotations

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-09-20 20:59:04 +03:00
Li Ning
dcc12d9089 documentation: remove deprecated toc section in README
The 'Verify node kubelet config' content was removed in 6b208f8.

Signed-off-by: Li Ning <ning.a.li@transwarp.io>
2021-09-07 19:38:41 +08:00
Shijia Wei
9b66176ca5 Add SGX admissionwebhook as dependency of sgx-nfd daemonset;
Mentioned dependency of the cert-manager in DaemonSet deployment method
in SGX README.
2021-07-27 00:39:59 -05:00
Mikko Ylinen
facb4214a2 tree-wide: drop deprecated io/ioutil
Go 1.16 release notes announced the deprecation of io/ioutil [1]. It's easy
for us to move to use what is was recommended so just do it.

[1] https://golang.org/doc/go1.16#ioutil

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-06-02 13:41:15 +03:00
Mikko Ylinen
111b833ea8 sgx: add note about the SGX DCAP driver usage
The SGX DCAP out-of-tree v1.41 driver is also known to work
with the SGX plugin. However, the default NFD labeling does not
work with the out-of-tree driver so warn users about it.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-04-27 22:10:21 +03:00
Ed Bartosh
08c2094329 update to cert-manager v1.3.1
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-04-22 14:45:39 +03:00
Dmitry Shmulevich
c8b5dce247 added an option to create a node label if epc memory is present
updated README for SGX device plugin

Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-03-18 11:53:49 -07:00
Mikko Ylinen
abfa3496a2 sgx: update SGX SDK/DCAP versions
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-02-18 09:31:28 +02:00
Mikko Ylinen
f8c20905aa update to cert-manager v1.2.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-02-12 15:39:07 +02:00
DougTW
a856f3215d Editing sgx_plugin README. Replacing 'master' with 'main'. Related to pr499.
Signed-off-by: DougTW <doug.martin@intel.com>
2021-02-09 17:17:05 -08:00
Dmitry Shmulevich
3c3a3d1145 added implementation of EPC extended resource advertiser
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-02-04 17:35:17 -08:00
Mikko Ylinen
0892a34705 move to k8s.io v1.20.x and klog/v2 v2.4.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-01-21 15:34:39 +02:00
Dmitry Rozhkov
771b0c7432
Merge pull request #544 from mythi/PR-2021-003
sgx: change getDefaultPodCount() logic
2021-01-13 10:31:16 +02:00
Mikko Ylinen
ed3a650ddd sgx: change getDefaultPodCount() logic
Decouple the default enclaveLimit/provisionLimit from core count. With
this change, the default limit is constant and it can be made relative
to core count by setting PODS_PER_CORE multiplier via env variable.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-01-12 20:24:46 +02:00
Ed Bartosh
6b208f8acf documentation: remove kubelet configuration check
Removed device plugin socket check from the documentation as
device plugin support is enabled by default in Kubelet.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-01-12 13:00:20 +02:00
Mikko Ylinen
d65cb902e6 sgx: move to RFC v4x device API
The SGX device nodes have changed from /dev/sgx/[enclave|provision]
to /dev/sgx_[enclave|provision] in v4x RFC patches according to the
LKML feedback.

This changes moves to use the new device nodes. Backwards compatibility
is provided by adding /dev/sgx directory mount to containers. This
assumes the cluster admin has installed the udev rules provided in the
README to make the old device nodes as symlinks to the new device nodes.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-11-18 21:17:28 +02:00
Mikko Ylinen
0f6eefee23 sgx: add documentation
This commit documents the SGX building blocks for Kubernetes and
how to deploy them in the cluster.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-10-27 15:02:40 +02:00
Mikko Ylinen
161298190f sgx: make SGX NFD kustomization overlay independent
With the addition of SGX webhook in the operator, full SGX stack
depends on having the operator deployed first. SgxDevicePlugin CRD
is set to get intel-sgx-plugin and intel-sgx-initcontainer deployed
by the operator.

As a pre-requisite, node-feature-discovery must be deployed but it
is currently deployed via sgx_plugin kustomization overlay only.

It's better to allow NFD with the SGX specific settings deployed with
a kustomization of its own.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-10-23 12:44:36 +03:00
Kevin Putnam
1d149ffee6 Documentation: Fixes broken links and standardizes headers.
Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2020-09-22 08:32:21 -07:00
Dmitry Rozhkov
1b82ab9df6 sync README.md files with the current state of the code
Closes #356
2020-09-16 10:54:39 +03:00
Dmitry Rozhkov
be713f1c8b lint: enable errcheck 2020-08-28 16:14:14 +03:00
Mikko Ylinen
a5f648077e sgx: add NFD EPC source, README and deployment YAMLs
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-08-24 16:33:45 +03:00
Ismo Puustinen
3ab60b4027 sgx: add tests for the plugin.
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2020-08-24 16:33:45 +03:00
Ismo Puustinen
8751afb6c7 sgx: add new plugin.
The SGX plugin exposes two device files as separate resources:

  * /dev/sgx/enclave   as sgx.intel.com/enclave
  * /dev/sgx/provision as sgx.intel.com/provision

The number of resources is configurable, but it's intended to be equal
to the pod count by default, so that any pod requiring access would have
it. The access control (who can do SGX remote attestation) is done
outside this plugin.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2020-08-24 16:33:45 +03:00