Commit Graph

7 Commits

Author SHA1 Message Date
Mikko Ylinen
d7997800a9 logging: move away from klogr to ktesting/textlogger
klog has added ktesting/textlogger and is going to deprecate
klogr. The deprecation is going to trigger golangci-lint (staticcheck)
errors so rework the logging and move to ktesting/textlogger.

The commit also fixes the loglevel setting with operator.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-11-20 09:46:41 +02:00
Dmitry Rozhkov
2cb914225c fpga_webhook: never reject already mutated CRs
For some reason the API server may want to pass an already mutated CR
through the webhook once again. The webhook must accept such CR with
no additional transformations.

This patch adds support for such idempotence by maintaining
a set of identity mappings which effectively resolve to themselves. No
patching is applied to them.
2022-03-29 11:01:49 +03:00
Dmitry Rozhkov
961fb3412c
fpga_webhook: make patcher idempotent (#892)
Webhook's patcher currently can't be re-applied to its output because it
rejects containers with the env vars it adds (e.i. FPGA_AFU_* and
FPGA_REGION_*).

Instead of rejecting container with disallowed env vars just reset them
first upon patching.
2022-02-18 10:24:03 +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
Dmitry Rozhkov
f0fa9df292 operator: prepare for publishing at operatorhub.io 2020-11-24 18:35:56 +02:00
Mikko Ylinen
f4c33d198e patcher: move ENV validation away from getRequestedResources
This commit adds new function validateContainer() that runs the
same FPGA_* ENV validation checks as before in getRequestedResources().

The restructuring is done in preparations for moving
getRequestedResources() to a separate package.

Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2020-09-10 15:31:26 +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