Commit Graph

45 Commits

Author SHA1 Message Date
Mikko Ylinen
51df411cb1 dsa: make initImage spec consistent with other APIs
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-01-11 08:17:35 +02:00
Mikko Ylinen
45f4666beb allow v1 CRD API only
controller-gen v0.7.0 dropped the support for v1beta1 CRD API as it
was also dropped in k8s.io v1.22.

update 'make generate' to only allow v1 CRD APIs and run it with
controller-gen v0.7.0.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-10-19 12:36:32 +03:00
Ed Bartosh
4df36258e5 add missing AF mappings to the mapping collection
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-08-19 17:24:16 +03:00
Mikko Ylinen
383778a24b qat: fix C4xxx driver name
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2021-06-10 08:45:23 +03:00
Mikko Ylinen
c3cf958c85 images: move most plugin images to distroless/static
All but one (VPU) of the published container images can be built with
static binaries which allows us to use distroless/static as the
base image. Moreover, when combined with stripping the plugin binaries,
we can get both build time and image size savings.

This is the part 1 (out of 2) of the rework. Part 2 will finish the
change by making some adjustments to VPU plugin image and moving the
FPGA/SGX/GPU initcontainers to distroless/static too.

Partial: #516

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
2021-05-19 09:44:47 +03:00
Oleg Zhurakivskyy
83d4789e5d deployments: Move to v1 API for CRDs
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2021-02-18 10:37:10 +00: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
f0fa9df292 operator: prepare for publishing at operatorhub.io 2020-11-24 18:35:56 +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
e054440a32 webhooks: move to admissionregistration.k8s.io/v1
With controller-gen 0.4.0, admissionregistration defaults to v1 API.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-10-14 14:48:40 +03:00
Mikko Ylinen
f0d4754d53 move to cert-manager v1.0.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-02 18:07:05 +03:00
Dmitry Rozhkov
200e2f8181 operator: add simple FPGA operator combined with FPGA webhook 2020-08-18 17:32:23 +03:00
Dmitry Rozhkov
a62c6f7d5e fpga webhook: reimplement to use kubebuilder framework
Simplify upgrade procedure to newer versions of kubernetes by relying on the
kubebuilder framework rather than using codegen directly.

Closes #377
2020-08-17 12:09:03 +03:00
Dmitry Rozhkov
e87d94d4fb fpga: finalize plugin kustomization
closes #318
2020-07-01 11:57:45 +03:00
linjiach
9cdb9a1446 add mappings for d5005-matrix-mult-orchestrated 2020-06-29 14:01:00 +00:00
Ed Bartosh
0c9831bf5c mapping-collection: add mappings for arria10.dcp1.2-nlb3-preprogrammed
This mapping will be used in the new demo screencast for FPGA plugin
deployment in preprogrammed mode.
2020-06-29 12:01:17 +03:00
linjiach
179a70179d
extend afu id length to 40 for aocx unique id
OpenCL bitstream .aocx has longer than 32 unique ID. Extend to 40 to accommodate it.
2020-06-25 00:31:50 -07:00
Dmitry Rozhkov
7177409f19 fpga webhook: rework deployment to use kustomize
Contributes to #318
2020-06-23 15:53:36 +03:00
Dmitry Rozhkov
c63dbf61b8 fpgawebhook: move to v2 API of fpga.intel.com group 2020-05-04 15:43:20 +03:00
Dmitry Rozhkov
99fcb69d33 fpga: compress fpga AF resource names 2020-04-29 11:59:50 +03:00
Dmitry Rozhkov
6c2eacfae5 webhook: remove mode of operation
fpga: make AFU resource name 63 char long

webhook: drop mode from README

webhook: extend mappings description

webhook: tighten CRD definitions

webhook: drop mapping to non-existing afuId

explicitly state mappings names can be in any format

use consistent terminology across fpga webhook and plugin
2020-04-22 13:55:43 +03:00
Ed Bartosh
7d8a33c30f fpga webhook: fix deployment issue
Webhook uses region CRDs even if run in preprogrammed mode.

Adding them to the base configuration should fix this deployment error:
  Failed to list *v1.FpgaRegion: the server could not find the requested resource

Fixes: #361
2020-04-09 15:21:33 +03:00
Ed Bartosh
1ce6a1fb89 fix flag provided but not defined error again
The same fix as previous:
  The `-v 1` arg is treated as single word thus klog throws
  "flag provided but not defined: -v 1" error.

This time it's in the webhook kustomize base.
2020-04-09 10:58:31 +03:00
Dmitry Rozhkov
7a86e8416f fix flag provided but not defined error
The `-v 1` arg is treated as single word thus klog throws
"flag provided but not defined: -v 1" error.
2020-04-06 11:38:59 +03:00
Graham Whaley
71d08224ee fpga: move to using klog for logs and debug
Move all the fpga components to using klog for logging
and debug. This includes replacing our homebrew 'fatal()'
with klog.Error().

Modify the deployment files to move from `-debug` to
`-v`, and set their default level to '1' (Info), rather
than full debug mode ('4').

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-24 14:31:53 +00:00
Antti Kervinen
5fe8174077 fpga_plugin: add kustomization files
- Add script/fpga-plugin-prepare-for-kustomization.sh, creates contents
  for the secret needed by the fpga plugin webhook.
- Single-command fpga plugin + webhook deployment for both modes:
  - `kubectl create -k deployments/fpga_plugin/overlays/af`
  - `kubectl create -k deployments/fpga_plugin/overlays/region`
- Change intel-fpga-plugin image CMD to ENTRYPOINT.
2020-02-24 16:32:26 +02:00
Ed Bartosh
368f34c76b fpga: run webhook container with user privileges
Modified deployment template and script to run admission controller
webhook with user credentials.
2020-01-14 16:31:32 +02:00
Ed Bartosh
1b1206e39a fpga: change webhook service port
Changed port webhook is listening on from 443 to 8443 to be able
to bind to it from non-root user account.
2020-01-14 16:31:12 +02:00
Hector Augusto Garcia Baleon
f4bb37dc9e fpga: Migrate webhook deployment to use the apps/v1 API
Since Kubernetes v1.16 release, DaemonSet, Deployment, StatefulSet, and ReplicaSet in the extensions/v1beta1 and apps/v1beta2 API groups have been deprecated. This PR migrates the webhook deployment to use apps/v1 instead of extensions/v1beta1 and add the selector part also required by the migration.

Signed-off-by: Hector Augusto Garcia Baleon <hector.augusto.garcia.baleon@intel.com>
2019-12-18 11:29:53 -06:00
Mikko Ylinen
7a8ff9ccc1 deployments: set readOnlyRootFilesystem
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-30 12:53:17 +03:00
Mikko Ylinen
d06f98690f images: tag with intel prefix
In preparations to get some of the images to hub.docker.com/intel,
start using intel/ prefix.

Moreover, set the Makefile variables so that the images built
by make [images|demos] can easily be pushed to any registry/org
by 'docker push' (e.g., by Jenkins).

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2019-08-29 13:21:19 +03:00
Alexander D. Kanevskiy
9d585ea0b8
Merge pull request #209 from bart0sh/PR0061-fix-deployment-setup
fpga: fix deployment setup
2019-08-27 16:26:13 +03:00
Ed Bartosh
a4c124777a fpga: fix deployment setup
- used ENTRYPOINT instead of CMD in plugin and admission webhook
  Dockerfiles to avoid duplicating commands in the pod yamls
- fixed path to deploy.sh script in fpga initcontainer Dockerfile
2019-08-27 11:03:03 +03:00
Ed Bartosh
a2a4ef7cce fpga: update mapping collection
- Ordered collection in DCP release/region/afus order for simpler
maintenance.

- Got rid of ambiguous entries without dcp releases, e.g. Arria10,
Arria10-nlb3 etc.
2019-08-26 15:13:37 +03:00
Alexander Kanevskiy
6395b1626d FPGA example mappings update
- For AOCX files, afuId should be set to unique UUID
  (can be seen via fpga_tool)
- arria10 now points to DCP 1.2 release
- added mappings for Stratix10 based D5005 PAC card
2019-08-25 02:37:07 +03:00
Ed Bartosh
eb9f50c977 fpga: add mappings for dpc1.0 resources
Current mappings break admissionwebhook deployment with this
kind of errors:
  Invalid value: "arria10_dcp1.0": a DNS-1123 subdomain must consist of
  lower case alphanumeric characters, '-' or '.', and must start and end
    with an alphanumeric character (e.g. 'example.com', regex used for
    validation is
    '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'

New mappings conform DNS-1123 regexp. They have been tested by the
compression demo and known to work.
2018-11-28 20:01:36 +02:00
Ed Bartosh
471ef9bca3 fpga: add support for Arria10 DCP 1.0
Added DCP 1.0 Arria10 region and compress AFU ids
to the mapping collection to be able to work with
DCP 1.0 bitstreams.

This is also an enabler for FPGA demo that uses compress.aocx,
which is not compilable by aoc compiler from DCP 1.1
2018-11-16 17:24:27 +02:00
Dmitry Rozhkov
4fb7848af6 fpga: update to dcp 1.1 2018-10-17 12:26:53 +03:00
Ed Bartosh
5a3aae9d12 mapping-collection: add mappings for arria10-compress
Added compress.aocx bitstream to the mapping collection.
This is an enabler for OpenCL gzip compression workload.
2018-09-04 17:18:36 +03:00
Dmitry Rozhkov
eccd70c600 replace glog with simpler home-grown debug logging 2018-08-16 17:40:16 +03:00
Dmitry Rozhkov
5de8d18638 webhook: add --namespace option to deployment script 2018-08-10 15:57:55 +03:00
Dmitry Rozhkov
763d229f65 webhook: adjust deployment script to accommodate CRDs 2018-08-08 17:58:18 +03:00
Dmitry Rozhkov
271bc0d29a webhook: add dynamically configured mappings
Currently we have hardcoded mapping from human readable names of
AFs and FPGA regions like arria10-nlb0 to the resource names
produced by the FPGA device plugin. This is not sustainable
long term solution.

Implement CRD based mappings so that a new mapping can be added or
removed dynamically by cluster admins with CRD resources.
2018-08-08 17:58:18 +03:00
Dmitry Rozhkov
3082d453ad extend webhook-deploy.sh to accept --mode
Since the webhook can operate in two modes, either `preprogrammed`
or `orchestrated`, extend the deploying script to support these
modes.
2018-06-29 16:30:36 +03:00
Dmitry Rozhkov
62a8c50f6c automate FPGA webhook deployment 2018-06-20 14:54:49 +03:00