Skip to content

Commit c475bd6

Browse files
committed
fpga: remove generation of the CRI-O hook
1 parent cdde274 commit c475bd6

File tree

3 files changed

+10
-26
lines changed

3 files changed

+10
-26
lines changed

build/docker/intel-fpga-initcontainer.Dockerfile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ RUN install -D ${DIR}/LICENSE /install_root/licenses/intel-device-plugins-for-ku
6666
--save_path /install_root/licenses/$CMD/go-licenses ; \
6767
else mkdir -p /install_root/licenses/$CMD/go-licenses/ && cd licenses/$CMD && cp -r * /install_root/licenses/$CMD/go-licenses/ ; fi
6868
###
69-
ARG SRC_DIR=/usr/local/fpga-sw
70-
ARG DST_DIR=/opt/intel/fpga-sw
71-
RUN echo "{\n\
72-
\"hook\" : \"$DST_DIR/$CRI_HOOK\",\n\
73-
\"stage\" : [ \"prestart\" ],\n\
74-
\"annotation\": [ \"fpga.intel.com/region\" ]\n\
75-
}\n">>/install_root/$SRC_DIR/$CRI_HOOK.json
7669
ARG TOYBOX_VERSION="0.8.11"
7770
ARG TOYBOX_SHA256="83a3a88cbe1fa30f099c2f58295baef4637aaf988085aaea56e03aa29168175d"
7871
ARG ROOT=/install_root
@@ -93,7 +86,7 @@ LABEL vendor='Intel®'
9386
LABEL version='devel'
9487
LABEL release='1'
9588
LABEL name='intel-fpga-initcontainer'
96-
LABEL summary='Intel® FPGA programming CRI hook for Kubernetes'
97-
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'
89+
LABEL summary='Intel® FPGA programming CDI hook for Kubernetes'
90+
LABEL description='The FPGA prestart CDI hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description'
9891
COPY --from=builder /install_root /
99-
ENTRYPOINT [ "/usr/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/" ]
92+
ENTRYPOINT [ "/usr/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/" ]

build/docker/templates/intel-fpga-initcontainer.Dockerfile.in

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,16 @@ ARG CMD=fpga_tool
1414
ARG EP=/usr/local/fpga-sw/$CMD
1515
#include "default_build.docker"
1616

17-
ARG SRC_DIR=/usr/local/fpga-sw
18-
ARG DST_DIR=/opt/intel/fpga-sw
19-
20-
RUN echo "{\n\N
21-
\"hook\" : \"$DST_DIR/$CRI_HOOK\",\n\N
22-
\"stage\" : [ \"prestart\" ],\n\N
23-
\"annotation\": [ \"fpga.intel.com/region\" ]\n\N
24-
}\n">>/install_root/$SRC_DIR/$CRI_HOOK.json
25-
2617
#include "toybox_build.docker"
2718

2819
FROM ${FINAL_BASE}
2920

3021
#include "default_labels.docker"
3122

3223
LABEL name='intel-fpga-initcontainer'
33-
LABEL summary='Intel® FPGA programming CRI hook for Kubernetes'
34-
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'
24+
LABEL summary='Intel® FPGA programming CDI hook for Kubernetes'
25+
LABEL description='The FPGA prestart CDI hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description'
3526

3627
COPY --from=builder /install_root /
3728

38-
ENTRYPOINT [ "/usr/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/" ]
29+
ENTRYPOINT [ "/usr/bin/sh", "-c", "cp -a /usr/local/fpga-sw/* /opt/intel/fpga-sw/" ]

deployments/fpga_plugin/base/intel-fpga-plugin-daemonset.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ spec:
2424
volumeMounts:
2525
- mountPath: /opt/intel/fpga-sw
2626
name: intel-fpga-sw
27-
- mountPath: /etc/containers/oci/hooks.d
28-
name: oci-hooks-config
2927
containers:
3028
- name: intel-fpga-plugin
3129
env:
@@ -50,6 +48,8 @@ spec:
5048
readOnly: true
5149
- name: kubeletsockets
5250
mountPath: /var/lib/kubelet/device-plugins
51+
- name: cdidir
52+
mountPath: /var/run/cdi
5353
volumes:
5454
- name: devfs
5555
hostPath:
@@ -64,9 +64,9 @@ spec:
6464
hostPath:
6565
path: /opt/intel/fpga-sw
6666
type: DirectoryOrCreate
67-
- name: oci-hooks-config
67+
- name: cdidir
6868
hostPath:
69-
path: /etc/containers/oci/hooks.d
69+
path: /var/run/cdi
7070
type: DirectoryOrCreate
7171
nodeSelector:
7272
kubernetes.io/arch: amd64

0 commit comments

Comments
 (0)