Skip to content

Commit e58369e

Browse files
committed
rename deprecated prestart to createRuntime
`prestart` hook is marked as deprecated in the OCI runtime spec: https://github.com/opencontainers/runtime-spec/blob/main/config.md#posix-platform-hooks Renamed `prestart` to the `createRuntime` as suggested in the spec. Replaced `CDI hook` with `OCI hook` to be more clear. CDI is just a way to update OCI config and theoretically there is no such thing as CDI hook.
1 parent 1fa557e commit e58369e

17 files changed

+44
-42
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ The FPGA plugin comes as three parts.
6666

6767
- the [device plugin](#device-plugin)
6868
- the [admission controller](#admission-controller)
69-
- the [CDI prestart hook](#CDI-prestart-hook)
69+
- the [OCI createRuntime hook](#OCI-createRuntime-hook)
7070

7171
Refer to each individual sub-components documentation for more details.
7272
Brief overviews of the sub-components are below.
@@ -88,9 +88,9 @@ is responsible for performing mapping from user-friendly function IDs to the
8888
Interface ID and Bitstream ID that are required for FPGA programming. It also
8989
implements access control by namespacing FPGA configuration information.
9090

91-
#### CDI Prestart Hook
91+
#### OCI createRuntime Hook
9292

93-
The [FPGA CDI prestart hook](cmd/fpga_crihook/README.md) performs discovery
93+
The [FPGA OCI createRuntime hook](cmd/fpga_crihook/README.md) performs discovery
9494
of the requested FPGA function bitstream and programs FPGA devices based on the
9595
environment variables in the workload description.
9696

build/docker/intel-fpga-initcontainer.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ LABEL version='devel'
8787
LABEL release='1'
8888
LABEL name='intel-fpga-initcontainer'
8989
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'
90+
LABEL description='The FPGA OCI createRuntime hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description'
9191
COPY --from=builder /install_root /
9292
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FROM ${FINAL_BASE}
2222

2323
LABEL name='intel-fpga-initcontainer'
2424
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'
25+
LABEL description='The FPGA OCI createRuntime hook performs discovery of the requested FPGA function bitstream and programs FPGA devices based on the environment variables in the workload description'
2626

2727
COPY --from=builder /install_root /
2828

cmd/fpga_admissionwebhook/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ devices to Kubernetes.
2323
2424
The FPGA admission controller webhook is responsible for performing mapping from user-friendly
2525
function IDs to the Interface ID and Bitstream ID that are required for FPGA programming by
26-
the [FPGA CDI prestart hook](../fpga_crihook/README.md).
26+
the [FPGA OCI createRuntime hook](../fpga_crihook/README.md).
2727

2828
Mappings are stored in namespaced custom resource definition (CRD) objects, therefore the admission
2929
controller also performs access control, determining which bitstream can be used for which namespace.
3030
More details can be found in the [Mappings](#mappings) section.
3131

3232
The admission controller also keeps the user from bypassing namespaced mapping restrictions,
3333
by denying admission of any pods that are trying to use internal knowledge of InterfaceID or
34-
Bitstream ID environment variables used by the prestart hook.
34+
Bitstream ID environment variables used by the createRuntime hook.
3535

3636
## Dependencies
3737

3838
This component is one of a set of components that work together. You may also want to
3939
install the following:
4040

4141
- [FPGA device plugin](../fpga_plugin/README.md)
42-
- [FPGA CDI prestart hook](../fpga_crihook/README.md)
42+
- [FPGA OCI createRuntime hook](../fpga_crihook/README.md)
4343

4444
All components have the same basic dependencies as the
4545
[generic plugin framework dependencies](../../README.md#about)
@@ -129,7 +129,7 @@ The same mapping, but with its mode field set to `region`, would translate
129129
and the corresponding AF IDs are set in environment variables for the container.
130130
Though in this case the cluster administrator would probably want to rename
131131
the mapping `arria10.dcp1.2-nlb0-preprogrammed` to something like `arria10.dcp1.2-nlb0-orchestrated`
132-
to reflect its mode. The [FPGA CDI prestart hook](../fpga_crihook/README.md) then loads the requested
132+
to reflect its mode. The [FPGA OCI createRuntime hook](../fpga_crihook/README.md) then loads the requested
133133
bitstream to a region before the container is started.
134134

135135
Mappings of resource names are configured with objects of `AcceleratorFunction` and
@@ -183,4 +183,4 @@ and they are applicable to pods created in the corresponding namespaces.
183183

184184
## Next steps
185185

186-
Continue with [FPGA CDI prestart hook](../fpga_crihook/README.md).
186+
Continue with [FPGA OCI createRuntime hook](../fpga_crihook/README.md).

cmd/fpga_crihook/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Intel FPGA CDI prestart hook for Kubernetes
1+
# Intel FPGA OCI createRuntime hook for Kubernetes
22

33
Table of Contents
44

@@ -11,7 +11,7 @@ Table of Contents
1111
The FPGA CDI hook is one of the components used to add support for Intel FPGA
1212
devices to Kubernetes.
1313

14-
The FPGA prestart hook is passed by the [FPGA device plugin](../fpga_plugin/README.md) as
14+
The FPGA OCI createRuntime hook is passed by the [FPGA device plugin](../fpga_plugin/README.md) as
1515
a CDI device attribute to the Kubelet and then to the CRI runtime.
1616
It performs discovery of the requested FPGA function bitstream and then programs FPGA devices
1717
based on the environment variables in the workload description.

cmd/fpga_crihook/testdata/config-correct.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
}
5353
],
5454
"hooks": {
55-
"prestart": [
55+
"createRuntime": [
5656
{
5757
"path": "/usr/local/bin/fpga_crihook",
5858
"args": [
5959
"/usr/local/bin/fpga_crihook"
6060
],
6161
"env": [
62-
"stage=prestart"
62+
"stage=createRuntime"
6363
]
6464
}
6565
]

cmd/fpga_crihook/testdata/config-no-FPGA-devices.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
}
5353
],
5454
"hooks": {
55-
"prestart": [
55+
"createRuntime": [
5656
{
5757
"path": "/usr/local/bin/fpga_crihook",
5858
"args": [
5959
"/usr/local/bin/fpga_crihook"
6060
],
6161
"env": [
62-
"stage=prestart"
62+
"stage=createRuntime"
6363
]
6464
}
6565
]

cmd/fpga_crihook/testdata/config-no-afu.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@
5151
}
5252
],
5353
"hooks": {
54-
"prestart": [
54+
"createRuntime": [
5555
{
5656
"path": "/usr/local/bin/fpga_crihook",
5757
"args": [
5858
"/usr/local/bin/fpga_crihook"
5959
],
6060
"env": [
61-
"stage=prestart"
61+
"stage=createRuntime"
6262
]
6363
}
6464
]

cmd/fpga_crihook/testdata/config-no-devices.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
}
5353
],
5454
"hooks": {
55-
"prestart": [
55+
"createRuntime": [
5656
{
5757
"path": "/usr/local/bin/fpga_crihook",
5858
"args": [
5959
"/usr/local/bin/fpga_crihook"
6060
],
6161
"env": [
62-
"stage=prestart"
62+
"stage=createRuntime"
6363
]
6464
}
6565
]

cmd/fpga_crihook/testdata/config-no-env.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@
4242
}
4343
],
4444
"hooks": {
45-
"prestart": [
45+
"createRuntime": [
4646
{
4747
"path": "/usr/local/bin/fpga_crihook",
4848
"args": [
4949
"/usr/local/bin/fpga_crihook"
5050
],
5151
"env": [
52-
"stage=prestart"
52+
"stage=createRuntime"
5353
]
5454
}
5555
]

0 commit comments

Comments
 (0)