Commit Graph

27 Commits

Author SHA1 Message Date
Tuomas Katila
74006cda80 depl: drop capabilities from all plugins
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2025-01-02 15:42:32 +02:00
Hyeongju Johannes Lee
3b08a9074d Add cpu/memory requests and limits
Operator maturity level 3 requires cpu/memory requests and limits
for operands. Add them to all plugins deployed by operator

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-09-25 03:42:19 -07:00
Hyeongju Johannes Lee
ba9b012ab1 sgx: add updateStrategy to daemonSet
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2024-07-25 12:55:26 +03:00
Tuomas Katila
7e8aba1e6c Fix false failures with trivy config scan
Sadly GH's trivy-action doesn't support the trivyignore.yaml file.
The whole detection class needs to be ignored.

Include the .yaml file for future use.

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2024-01-17 12:15:47 +02:00
Mikko Ylinen
2ae4eb9f0f sgx: use NodeFeatureRule SGX label in the NFD overlay
Our SGX README guides users to first deploy NFD and create NodeFeatureRules
when sgx_plugin/overlays/epc-nfd is used. However, it turns out
the "SGX enabled" label is not being used by the plugin DaemonSet.

Use "intel.feature.node.kubernetes.io/sgx": "true" as the nodeSelector
value when the kustomization overlay with NFD is used.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-11-13 11:20:53 +02:00
Tuomas Katila
e92b752d75 deployments: move from 'vars' to 'replacements'
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-03 10:37:44 +03:00
Tuomas Katila
cb04ca0deb deployments: move from 'patchesStrategicMerge' to 'patches'
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-03 10:37:44 +03:00
Tuomas Katila
ec2930b331 deployments: move from 'bases' to 'resources'
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2023-08-03 10:37:44 +03:00
Mikko Ylinen
3a4c0e574f sgx: stop using local source hooks for EPC registration
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-04-28 14:59:41 +03:00
Mikko Ylinen
1090c12c74 deployments: fix kubectl SGX w/ NFD instructions
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-03-07 09:19:30 +02:00
Eero Tamminen
2f3dc23651 Use more generic name for NFD features host directory volume
NFD hooks are deprecated and going away:
https://github.com/kubernetes-sigs/node-feature-discovery/issues/856

This makes the mount names more future-proof, and shows where later
changes need to be done (to change operator mount directory, and
switch hook-using deployments e.g. to feature files).

Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
2023-02-08 18:20:41 +02:00
Mikko Ylinen
8c0abb54b1 deployments: disable unused serviceAccounts for plugins
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-23 08:21:25 +03:00
Alex Nordlund
79986a6096 Replace to-be obsolete patchesStrategicMerge with patches 2022-08-25 21:07:32 +02:00
Alex Nordlund
0636e2d3a1 Replace obsolete patches with patchesStrategicMerge
This was made obsolete in v1.0.9
https://github.com/kubernetes-sigs/kustomize/blob/v1.0.9/pkg/types/kustomization.go#L129
And stopped working in v3.0.3
https://github.com/kubernetes-sigs/kustomize/issues/1373
2022-08-25 09:28:03 +02: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
Manish Regmi
78d2fe24e3 changes related to selinux and permissions for openshift
* run the sgx container as container_device_plugin_t and init container
   as container_device_plugin_init_t. these labels are being added to
   container_selinux package upstream.
 * add rbac role for openshift
Signed-off-by: Manish Regmi <manish.regmi@intel.com>
2022-04-28 14:32:35 -07:00
Ed Bartosh
13780a8cdc implement terrascan check
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2022-03-01 15:54:28 +02: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
cdd7ca8376 e2e: split NFD and SGX webhook away from SGX plugin deployment
Previously, the SGX plugin deployment pulled in NFD and
SGX webhook as well. This triggered kustomize issues when
trying to get everything under the same namespace.

This commit splits the three deployments into their own steps.
It allows to keep the static parts part of [Before|After]Each
and helps to build SGX plugin/application test cases more
easily.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-12-22 11:22:14 +02:00
Hyeongju Johannes Lee
251727a3db operator: add node selection constraint (amd64 arch)
In order to make controllers consistent, I add a nodeselector constraint of daemonset to dlb, fpga, qat too.
Since the same code is commonly used in many files, I add a function that replaces duplicated code.

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-12-02 08:54:50 -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
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
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
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
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
Mikko Ylinen
597b985cdf sgx: move hookinstall job to an initcontainer
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-08-28 11:01:35 +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