Commit Graph

62 Commits

Author SHA1 Message Date
Mikko Ylinen
ed5d1e6269 make: update controller-gen to v0.17
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2025-01-02 12:00:34 +02:00
Mikko Ylinen
ff257cb2d2 operator: move to controller-tools v0.16.1
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-08-15 10:02:39 +03:00
Mikko Ylinen
06dc494982 operator: update to controller-gen v0.14 and generate CRDs with it
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-02-12 10:33:53 +02:00
Mikko Ylinen
69f5ccfe66 operator: update controller-gen to v0.13.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-09-05 14:30:10 +03:00
Mikko Ylinen
c3a3561cb8 webhooks: stop handling Pod updates
FPGA and SGX webhooks mutate container resources which
are immutable. Therefore, stop processing pod updates
and act on creation only.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-08-14 15:18:51 +03: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
Hyeongju Johannes Lee
bf286c689d update version of controller gen to v0.12.1
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
2023-07-20 10:17:44 +03:00
Mikko Ylinen
16724043b2 operator: move to controller-tools v0.12.0
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-05-05 15:02:36 +03:00
Mikko Ylinen
5c6e60eeb1 operator: move to controller-tools v0.11.3
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-02-21 20:14:03 +02:00
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
6602d56ef9 deployments: fix leader election RBAC rules
controller-runtime now defaults LeaderElectionResourceLock to
leases and we had missed the migration to it properly.

Update the RBAC rules to get our controllers to write their
leader election locks to leases.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-14 08:51:12 +03:00
Mikko Ylinen
b81d2dcba8 Update SGX and FPGA webhook flags
SGX Admission webhook was quickly forked from FPGA's
implementation. After a bit of thinking, it turns out
leader election and metrics are not necessary for a
(idempotent) webhook-only functionality.

For FPGA Admission webhook, the metrics isn't correctly
set up so it's better to disable the functionality. Leader
election is kept but the flag name is renamed to align with
"kubebuilder v3 functionality" similar to how we changed it
to the operator as well.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-09-13 13:18:28 +03:00
Mikko Ylinen
a13ee14e5f deployments: regenerate using the latest controller-gen
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-07-26 13:57:27 +03:00
Mikko Ylinen
cbc521e505 move to k8s.io v1.24.0-rc.1
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2022-04-27 09:26:07 +03: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
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