Commit Graph

11 Commits

Author SHA1 Message Date
Mikko Ylinen
0f5afc258d operator: move to controller-tools v0.10.0
With the latest version of controller-tools, we get to set
reinvocationPolicy tag so that we no longer have to add that
field manually in our Admission Webhook manifests.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-21 19:37:00 +03:00
Mikko Ylinen
8784eb057c sgx: fix volumeMounts mutation
The changes made by addVolumeMount() were overriden when the
intermediate container variable was assigned to the pod and
thus the volumeMount changes were lost.

Fix it by making the volumeMount changes to the intermediate
container that is then assigned to the final pod.

Also, make the latest e2e test case to use the
checkMutatedVolumes() helper and fix the illegal Volume
name.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2021-12-21 13:32:50 +02:00
Ismo Puustinen
3469318c29 sgx-webhook: do not add Volume(Mount)s if they exist.
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
2021-12-20 02:41:30 -08: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
Hyeongju Johannes Lee
09ba9fde00 Update tool versions and fix errors and warnings that originated from the update
Update tool versions
Fix the errors and warnings originated from the update:
-Correct type deviceInfo (->DeviceInfo) to make it public
-Fix gpu_plugin.go and vpu_plugin_test.go where stylecheck errors occur
-Fix deprecation warnings
-Rename type 'PatcherManager' to 'Manager' to solve exported errors
-Rename type 'SgxMutator' to 'Mutator' to solve exported errors

Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2021-08-25 07:09:34 +00:00
Mikko Ylinen
e0d32dc3e6 sgx: fix golint warnings
Go report card shows golint warnings for the SGX webhook. This
commit fixes those.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-01-12 12:36:29 +02:00
Mikko Ylinen
d63037c2e1 Move to Admission v1 API
Update to controller-runtime v0.7.0 and Admission types to v1 with it.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-12-17 11:02:21 +02:00
Dmitry Rozhkov
7e621f7905 upgrade controller-gen to v0.4.1
The new versions adds admissionReviewVersions annotation and makes it
mandatory.
2020-11-18 11:44:37 +02:00
Mikko Ylinen
5270dca027 sgx: add warnings to webhook
Warn users if sgx.intel.com/[enclave|provision] resources are
specified in the pod spec. Only sgx.intel.com/epc should be used
directly.

The warnings work only with kubernetes 1.19 and later.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-11-11 22:05:00 +02:00
Mikko Ylinen
87312d3a44 sgx webhook: implement quote generation logic
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-10-12 10:07:28 +03:00
Mikko Ylinen
33a4f8f546 sgx: add SgxDevicePlugin CRD and admission webhook
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-10 15:31:26 +03:00