From 5c6e60eeb1c03111eee02af3b67c5330585f5c05 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Mon, 20 Feb 2023 13:18:22 +0200 Subject: [PATCH 1/3] operator: move to controller-tools v0.11.3 Signed-off-by: Mikko Ylinen --- Makefile | 2 +- .../crd/bases/fpga.intel.com_acceleratorfunctions.yaml | 2 +- .../crd/bases/fpga.intel.com_fpgaregions.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml | 2 +- .../crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml | 2 +- .../operator/crd/bases/fpga.intel.com_acceleratorfunctions.yaml | 2 +- deployments/operator/crd/bases/fpga.intel.com_fpgaregions.yaml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 8885c4f4f..5e27d6088 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ BUILDER ?= "docker" EXTRA_BUILD_ARGS ?= "" CERT_MANAGER_VERSION ?= v1.11.0 -CONTROLLER_GEN_VERSION ?= v0.11.1 +CONTROLLER_GEN_VERSION ?= v0.11.3 GOLANGCI_LINT_VERSION ?= v1.50.1 KIND_VERSION ?= v0.17.0 GOLICENSES_VERSION ?= v1.6.0 diff --git a/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_acceleratorfunctions.yaml b/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_acceleratorfunctions.yaml index 716acdee3..429d5c28a 100644 --- a/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_acceleratorfunctions.yaml +++ b/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_acceleratorfunctions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: acceleratorfunctions.fpga.intel.com spec: diff --git a/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_fpgaregions.yaml b/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_fpgaregions.yaml index 170bc10f5..b1334193b 100644 --- a/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_fpgaregions.yaml +++ b/deployments/fpga_admissionwebhook/crd/bases/fpga.intel.com_fpgaregions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: fpgaregions.fpga.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml index a18a9cdf9..181781d1e 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_dlbdeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: dlbdeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml index 084a5f527..c5c34c13a 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_dsadeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: dsadeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml index e7b6a574a..4613262a2 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_fpgadeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: fpgadeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml index 6fc07cff5..bba1051bb 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_gpudeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: gpudeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml index b684fbd3f..8fff02625 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_iaadeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: iaadeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml index 7143d3131..7b04fe020 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_qatdeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: qatdeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml b/deployments/operator/crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml index be2c62f6f..b1de4946e 100644 --- a/deployments/operator/crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml +++ b/deployments/operator/crd/bases/deviceplugin.intel.com_sgxdeviceplugins.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: sgxdeviceplugins.deviceplugin.intel.com spec: diff --git a/deployments/operator/crd/bases/fpga.intel.com_acceleratorfunctions.yaml b/deployments/operator/crd/bases/fpga.intel.com_acceleratorfunctions.yaml index 716acdee3..429d5c28a 100644 --- a/deployments/operator/crd/bases/fpga.intel.com_acceleratorfunctions.yaml +++ b/deployments/operator/crd/bases/fpga.intel.com_acceleratorfunctions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: acceleratorfunctions.fpga.intel.com spec: diff --git a/deployments/operator/crd/bases/fpga.intel.com_fpgaregions.yaml b/deployments/operator/crd/bases/fpga.intel.com_fpgaregions.yaml index 170bc10f5..b1334193b 100644 --- a/deployments/operator/crd/bases/fpga.intel.com_fpgaregions.yaml +++ b/deployments/operator/crd/bases/fpga.intel.com_fpgaregions.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 + controller-gen.kubebuilder.io/version: v0.11.3 creationTimestamp: null name: fpgaregions.fpga.intel.com spec: From eb632f625ad9958f4fb0d80a0785dc01d56dcb4a Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Tue, 21 Feb 2023 07:04:47 +0200 Subject: [PATCH 2/3] deployments: remove unused deviceplugins RBAC rules Signed-off-by: Mikko Ylinen --- .../rbac/fpgadeviceplugin_editor_role.yaml | 24 ------------------- .../rbac/fpgadeviceplugin_viewer_role.yaml | 20 ---------------- .../rbac/gpudeviceplugin_editor_role.yaml | 24 ------------------- .../rbac/gpudeviceplugin_viewer_role.yaml | 20 ---------------- .../rbac/qatdeviceplugin_editor_role.yaml | 24 ------------------- .../rbac/qatdeviceplugin_viewer_role.yaml | 20 ---------------- 6 files changed, 132 deletions(-) delete mode 100644 deployments/operator/rbac/fpgadeviceplugin_editor_role.yaml delete mode 100644 deployments/operator/rbac/fpgadeviceplugin_viewer_role.yaml delete mode 100644 deployments/operator/rbac/gpudeviceplugin_editor_role.yaml delete mode 100644 deployments/operator/rbac/gpudeviceplugin_viewer_role.yaml delete mode 100644 deployments/operator/rbac/qatdeviceplugin_editor_role.yaml delete mode 100644 deployments/operator/rbac/qatdeviceplugin_viewer_role.yaml diff --git a/deployments/operator/rbac/fpgadeviceplugin_editor_role.yaml b/deployments/operator/rbac/fpgadeviceplugin_editor_role.yaml deleted file mode 100644 index d3a8beca1..000000000 --- a/deployments/operator/rbac/fpgadeviceplugin_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit fpgadeviceplugins. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: fpgadeviceplugin-editor-role -rules: -- apiGroups: - - deviceplugin.intel.com - resources: - - fpgadeviceplugins - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - deviceplugin.intel.com - resources: - - fpgadeviceplugins/status - verbs: - - get diff --git a/deployments/operator/rbac/fpgadeviceplugin_viewer_role.yaml b/deployments/operator/rbac/fpgadeviceplugin_viewer_role.yaml deleted file mode 100644 index ee4bbd801..000000000 --- a/deployments/operator/rbac/fpgadeviceplugin_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view fpgadeviceplugins. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: fpgadeviceplugin-viewer-role -rules: -- apiGroups: - - deviceplugin.intel.com - resources: - - fpgadeviceplugins - verbs: - - get - - list - - watch -- apiGroups: - - deviceplugin.intel.com - resources: - - fpgadeviceplugins/status - verbs: - - get diff --git a/deployments/operator/rbac/gpudeviceplugin_editor_role.yaml b/deployments/operator/rbac/gpudeviceplugin_editor_role.yaml deleted file mode 100644 index 3a1881169..000000000 --- a/deployments/operator/rbac/gpudeviceplugin_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit gpudeviceplugins. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: gpudeviceplugin-editor-role -rules: -- apiGroups: - - deviceplugin.intel.com - resources: - - gpudeviceplugins - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - deviceplugin.intel.com - resources: - - gpudeviceplugins/status - verbs: - - get diff --git a/deployments/operator/rbac/gpudeviceplugin_viewer_role.yaml b/deployments/operator/rbac/gpudeviceplugin_viewer_role.yaml deleted file mode 100644 index 6d7195036..000000000 --- a/deployments/operator/rbac/gpudeviceplugin_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view gpudeviceplugins. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: gpudeviceplugin-viewer-role -rules: -- apiGroups: - - deviceplugin.intel.com - resources: - - gpudeviceplugins - verbs: - - get - - list - - watch -- apiGroups: - - deviceplugin.intel.com - resources: - - gpudeviceplugins/status - verbs: - - get diff --git a/deployments/operator/rbac/qatdeviceplugin_editor_role.yaml b/deployments/operator/rbac/qatdeviceplugin_editor_role.yaml deleted file mode 100644 index 3c01ae1ce..000000000 --- a/deployments/operator/rbac/qatdeviceplugin_editor_role.yaml +++ /dev/null @@ -1,24 +0,0 @@ -# permissions for end users to edit qatdeviceplugins. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: qatdeviceplugin-editor-role -rules: -- apiGroups: - - deviceplugin.intel.com - resources: - - qatdeviceplugins - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - deviceplugin.intel.com - resources: - - qatdeviceplugins/status - verbs: - - get diff --git a/deployments/operator/rbac/qatdeviceplugin_viewer_role.yaml b/deployments/operator/rbac/qatdeviceplugin_viewer_role.yaml deleted file mode 100644 index 1b73c40b7..000000000 --- a/deployments/operator/rbac/qatdeviceplugin_viewer_role.yaml +++ /dev/null @@ -1,20 +0,0 @@ -# permissions for end users to view qatdeviceplugins. -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: qatdeviceplugin-viewer-role -rules: -- apiGroups: - - deviceplugin.intel.com - resources: - - qatdeviceplugins - verbs: - - get - - list - - watch -- apiGroups: - - deviceplugin.intel.com - resources: - - qatdeviceplugins/status - verbs: - - get From 3dc815cda986cecdf020372cfe14649ce0d86612 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Tue, 21 Feb 2023 07:14:21 +0200 Subject: [PATCH 3/3] deployments: fix FPGA plugin namespace Signed-off-by: Mikko Ylinen --- deployments/fpga_plugin/base/kustomization.yaml | 1 + deployments/fpga_plugin/base/namespace.yaml | 4 ++++ deployments/fpga_plugin/overlays/af/kustomization.yaml | 2 +- deployments/fpga_plugin/overlays/region/kustomization.yaml | 2 +- test/e2e/utils/utils.go | 2 +- 5 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 deployments/fpga_plugin/base/namespace.yaml diff --git a/deployments/fpga_plugin/base/kustomization.yaml b/deployments/fpga_plugin/base/kustomization.yaml index a232c8fa5..b4f552547 100644 --- a/deployments/fpga_plugin/base/kustomization.yaml +++ b/deployments/fpga_plugin/base/kustomization.yaml @@ -2,3 +2,4 @@ resources: - role.yaml - role_binding.yaml - intel-fpga-plugin-daemonset.yaml + - namespace.yaml diff --git a/deployments/fpga_plugin/base/namespace.yaml b/deployments/fpga_plugin/base/namespace.yaml new file mode 100644 index 000000000..1ab3a7255 --- /dev/null +++ b/deployments/fpga_plugin/base/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: system diff --git a/deployments/fpga_plugin/overlays/af/kustomization.yaml b/deployments/fpga_plugin/overlays/af/kustomization.yaml index 31db918e4..c45bea893 100644 --- a/deployments/fpga_plugin/overlays/af/kustomization.yaml +++ b/deployments/fpga_plugin/overlays/af/kustomization.yaml @@ -1,6 +1,6 @@ namespace: intelfpgaplugin-system namePrefix: intelfpgaplugin- -bases: +resources: - ../../base - ../../../fpga_admissionwebhook/base diff --git a/deployments/fpga_plugin/overlays/region/kustomization.yaml b/deployments/fpga_plugin/overlays/region/kustomization.yaml index f3b847c4e..55ab43ba1 100644 --- a/deployments/fpga_plugin/overlays/region/kustomization.yaml +++ b/deployments/fpga_plugin/overlays/region/kustomization.yaml @@ -1,7 +1,7 @@ namespace: intelfpgaplugin-system namePrefix: intelfpgaplugin- -bases: +resources: - ../../base - ../../../fpga_admissionwebhook/base diff --git a/test/e2e/utils/utils.go b/test/e2e/utils/utils.go index 20eee8618..66fdd1e79 100644 --- a/test/e2e/utils/utils.go +++ b/test/e2e/utils/utils.go @@ -126,7 +126,7 @@ func CreateKustomizationOverlay(namespace, base, overlay string) error { } relPath = relPath + base[1:] - content := fmt.Sprintf("namespace: %s\nbases:\n - %s", namespace, relPath) + content := fmt.Sprintf("namespace: %s\nresources:\n - %s", namespace, relPath) return os.WriteFile(overlay+"/kustomization.yaml", []byte(content), 0600) }