From 8c078f58e18ae7d85b7e87dd84106218ec70196d Mon Sep 17 00:00:00 2001 From: Chaitanya Kulkarni Date: Fri, 18 Feb 2022 00:18:33 -0800 Subject: [PATCH] Images/Script - Added LABELs to all plugins (#894) Added LABELs (name, vendor, version, release, summary, description) to all plugins and updated scripts/set-version.sh script to include the LABEL version='' by passing TAG parameter to make set-version TAG= Signed-off-by: chaitanya1731 --- build/docker/intel-deviceplugin-operator.Dockerfile | 8 ++++++++ build/docker/intel-dlb-plugin.Dockerfile | 8 ++++++++ build/docker/intel-dsa-plugin.Dockerfile | 8 ++++++++ build/docker/intel-fpga-admissionwebhook.Dockerfile | 8 ++++++++ build/docker/intel-fpga-initcontainer.Dockerfile | 8 ++++++++ build/docker/intel-fpga-plugin.Dockerfile | 8 ++++++++ build/docker/intel-gpu-initcontainer.Dockerfile | 8 ++++++++ build/docker/intel-gpu-plugin.Dockerfile | 8 ++++++++ build/docker/intel-qat-plugin.Dockerfile | 8 ++++++++ build/docker/intel-sgx-admissionwebhook.Dockerfile | 8 ++++++++ build/docker/intel-sgx-initcontainer.Dockerfile | 8 ++++++++ build/docker/intel-sgx-plugin.Dockerfile | 8 ++++++++ scripts/set-version.sh | 4 ++-- 13 files changed, 98 insertions(+), 2 deletions(-) diff --git a/build/docker/intel-deviceplugin-operator.Dockerfile b/build/docker/intel-deviceplugin-operator.Dockerfile index 2193d749..d30e1622 100644 --- a/build/docker/intel-deviceplugin-operator.Dockerfile +++ b/build/docker/intel-deviceplugin-operator.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/operator /install_root/usr/local/bin/intel_deviceplugin_o && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/operator" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-deviceplugin-operator' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® device plugin operator for Kubernetes' +LABEL description='To simplify the deployment of the device plugins, a unified device plugins operator is implemented. Currently the operator has support for the QAT, GPU, FPGA, SGX, DSA and DLB device plugins. Each device plugin has its own custom resource definition (CRD) and the corresponding controller that watches CRUD operations to those custom resources.' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_deviceplugin_operator"] diff --git a/build/docker/intel-dlb-plugin.Dockerfile b/build/docker/intel-dlb-plugin.Dockerfile index c3fa47a1..70b3c889 100644 --- a/build/docker/intel-dlb-plugin.Dockerfile +++ b/build/docker/intel-dlb-plugin.Dockerfile @@ -34,6 +34,14 @@ RUN install -D /go/bin/dlb_plugin /install_root/usr/local/bin/intel_dlb_device_p && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/dlb_plugin" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-dlb-plugin' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® DLB device plugin for Kubernetes' +LABEL description='The DLB device plugin supports Intel Dynamic Load Balancer accelerator(DLB)' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_dlb_device_plugin"] diff --git a/build/docker/intel-dsa-plugin.Dockerfile b/build/docker/intel-dsa-plugin.Dockerfile index 02de84a5..8a1511eb 100644 --- a/build/docker/intel-dsa-plugin.Dockerfile +++ b/build/docker/intel-dsa-plugin.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/dsa_plugin /install_root/usr/local/bin/intel_dsa_device_p && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/dsa_plugin" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-dsa-plugin' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® DSA device plugin for Kubernetes' +LABEL description='The DSA device plugin supports acceleration using the Intel Data Streaming accelerator(DSA)' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_dsa_device_plugin"] diff --git a/build/docker/intel-fpga-admissionwebhook.Dockerfile b/build/docker/intel-fpga-admissionwebhook.Dockerfile index 06082157..9259abc5 100644 --- a/build/docker/intel-fpga-admissionwebhook.Dockerfile +++ b/build/docker/intel-fpga-admissionwebhook.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/fpga_admissionwebhook /install_root/usr/local/bin/intel_f && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/fpga_admissionwebhook" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-fpga-admissionwebhook' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® FPGA admission controller webhook for Kubernetes' +LABEL description='The FPGA admission controller webhook is responsible for performing mapping from user-friendly function IDs to the Interface ID and Bitstream ID that are required for FPGA programming. It also implements access control by namespacing FPGA configuration information' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_fpga_admissionwebhook"] diff --git a/build/docker/intel-fpga-initcontainer.Dockerfile b/build/docker/intel-fpga-initcontainer.Dockerfile index c5da1901..594fb1aa 100644 --- a/build/docker/intel-fpga-initcontainer.Dockerfile +++ b/build/docker/intel-fpga-initcontainer.Dockerfile @@ -63,6 +63,14 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION && cp -r /usr/share/doc/musl $ROOT/licenses/ FROM gcr.io/distroless/static + +LABEL name='intel-fpga-initcontainer' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® FPGA programming CRI hook for Kubernetes' +LABEL description='The FPGA prestart CRI-O hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description' + COPY --from=builder /install_root / ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/ && ln -sf /opt/intel/fpga-sw/intel-fpga-crihook.json /etc/containers/oci/hooks.d/" ] diff --git a/build/docker/intel-fpga-plugin.Dockerfile b/build/docker/intel-fpga-plugin.Dockerfile index ce42d85b..3e7d5292 100644 --- a/build/docker/intel-fpga-plugin.Dockerfile +++ b/build/docker/intel-fpga-plugin.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/fpga_plugin /install_root/usr/local/bin/intel_fpga_device && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/fpga_plugin" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-fpga-plugin' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® FPGA device plugin for Kubernetes' +LABEL description='The FPGA device plugin is responsible for discovering and reporting FPGA devices to kubelet' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_fpga_device_plugin"] diff --git a/build/docker/intel-gpu-initcontainer.Dockerfile b/build/docker/intel-gpu-initcontainer.Dockerfile index 6ec288a6..925a3a37 100644 --- a/build/docker/intel-gpu-initcontainer.Dockerfile +++ b/build/docker/intel-gpu-initcontainer.Dockerfile @@ -55,6 +55,14 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION && cp -r /usr/share/doc/musl $ROOT/licenses/ FROM gcr.io/distroless/static + +LABEL name='intel-gpu-initcontainer' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® GPU NFD hook for Kubernetes' +LABEL description='The GPU fractional resources, such as GPU memory is registered as a kubernetes extended resource using node-feature-discovery (NFD). A custom NFD source hook is installed as part of GPU device plugin operator deployment and NFD is configured to register the GPU memory extended resource reported by the hook' + COPY --from=builder /install_root / ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/bin/gpu-sw/intel-gpu-nfdhook /etc/kubernetes/node-feature-discovery/source.d/" ] diff --git a/build/docker/intel-gpu-plugin.Dockerfile b/build/docker/intel-gpu-plugin.Dockerfile index ea93e596..11f5e39c 100644 --- a/build/docker/intel-gpu-plugin.Dockerfile +++ b/build/docker/intel-gpu-plugin.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/gpu_plugin /install_root/usr/local/bin/intel_gpu_device_p && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/gpu_plugin" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-gpu-plugin' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® GPU device plugin for Kubernetes' +LABEL description='The GPU device plugin provides access to Intel discrete (Xe) and integrated GPU HW device files' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_gpu_device_plugin"] diff --git a/build/docker/intel-qat-plugin.Dockerfile b/build/docker/intel-qat-plugin.Dockerfile index 69ef65d8..3a4ae4d1 100644 --- a/build/docker/intel-qat-plugin.Dockerfile +++ b/build/docker/intel-qat-plugin.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/qat_plugin /install_root/usr/local/bin/intel_qat_device_p && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/qat_plugin" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-qat-plugin' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® QAT device plugin for Kubernetes' +LABEL description='The QAT plugin supports device plugin for Intel QAT adapters, and includes code showing deployment via DPDK' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_qat_device_plugin"] diff --git a/build/docker/intel-sgx-admissionwebhook.Dockerfile b/build/docker/intel-sgx-admissionwebhook.Dockerfile index cf774e4a..2ad54ba2 100644 --- a/build/docker/intel-sgx-admissionwebhook.Dockerfile +++ b/build/docker/intel-sgx-admissionwebhook.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/sgx_admissionwebhook /install_root/usr/local/bin/intel_sg && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/sgx_admissionwebhook" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-sgx-admissionwebhook' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® SGX admission controller webhook for Kubernetes' +LABEL description='The SGX admission webhook is responsible for performing Pod mutations based on the sgx.intel.com/quote-provider pod annotation set by the user. The purpose of the webhook is to hide the details of setting the necessary device resources and volume mounts for using SGX remote attestation in the cluster' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_sgx_admissionwebhook"] diff --git a/build/docker/intel-sgx-initcontainer.Dockerfile b/build/docker/intel-sgx-initcontainer.Dockerfile index a808ab62..76cc8922 100644 --- a/build/docker/intel-sgx-initcontainer.Dockerfile +++ b/build/docker/intel-sgx-initcontainer.Dockerfile @@ -55,6 +55,14 @@ RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION && cp -r /usr/share/doc/musl $ROOT/licenses/ FROM gcr.io/distroless/static + +LABEL name='intel-sgx-initcontainer' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® SGX NFD hook for Kubernetes' +LABEL description='The SGX EPC memory available on each node is registered as a Kubernetes extended resource using node-feature-discovery (NFD). A custom NFD source hook is installed as part of SGX device plugin operator deployment and NFD is configured to register the SGX EPC memory extended resource reported by the hook' + COPY --from=builder /install_root / ENTRYPOINT [ "/bin/sh", "-c", "cp -a /usr/local/bin/sgx-sw/intel-sgx-epchook /etc/kubernetes/node-feature-discovery/source.d/" ] diff --git a/build/docker/intel-sgx-plugin.Dockerfile b/build/docker/intel-sgx-plugin.Dockerfile index f3855387..3d76c548 100644 --- a/build/docker/intel-sgx-plugin.Dockerfile +++ b/build/docker/intel-sgx-plugin.Dockerfile @@ -34,5 +34,13 @@ RUN install -D /go/bin/sgx_plugin /install_root/usr/local/bin/intel_sgx_device_p && GO111MODULE=on go install github.com/google/go-licenses@v1.0.0 && go-licenses save "./cmd/sgx_plugin" --save_path /install_root/licenses/go-licenses FROM gcr.io/distroless/static + +LABEL name='intel-sgx-plugin' +LABEL vendor='Intel®' +LABEL version='devel' +LABEL release='1' +LABEL summary='Intel® SGX device plugin for Kubernetes' +LABEL description='The SGX device plugin is responsible for discovering and reporting SGX device nodes to kubelet' + COPY --from=builder /install_root / ENTRYPOINT ["/usr/local/bin/intel_sgx_device_plugin"] diff --git a/scripts/set-version.sh b/scripts/set-version.sh index 2b9b36a6..9dd171c5 100755 --- a/scripts/set-version.sh +++ b/scripts/set-version.sh @@ -15,6 +15,6 @@ if [ $# != 1 ] || [ "$1" = "?" ] || [ "$1" = "--help" ]; then exit 1 fi -for file in $(git grep -l '^TAG?*=\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/intel-[^ ]*:' Makefile deployments demo/*fpga*.yaml pkg/controllers/*/*_test.go); do - sed -i -e "s;\(^TAG?*=\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/intel-[^ ]*:\)[^ \"]*;\1$1;g" "$file"; +for file in $(git grep -l '^TAG?*=\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/intel-[^ ]*:\|version=' Makefile deployments demo/*fpga*.yaml pkg/controllers/*/*_test.go build/docker/*.Dockerfile); do + sed -i -e "s;\(^TAG?*=\|intel/crypto-perf:\|intel/opae-nlb-demo:\|intel/intel-[^ ]*:\|version=\)[^ \"]*;\1$1;g" "$file"; done