Adding components to a devfile
Each component in a single devfile must have a unique name and use one of the objects: container
, kubernetes
, openshift
, or volume
. See the following tables for component properties in a devfile:
Key | Type | Required | Description |
---|---|---|---|
|
|
no |
The list of containers. |
|
|
no |
The Kubernetes cluster. |
|
|
no |
The OpenShift container. |
|
|
no |
The list of volume components. |
Key | Type | Required | Description |
---|---|---|---|
|
|
yes |
The name of your container. |
|
|
yes |
The image version. |
|
|
no |
The memory limit that you use with your container. |
|
|
no |
Choose to mount the source or not. |
|
|
no |
The path in the container where you transfer and mount the project sources. This path is available in the container through the environment, |
|
|
no |
The list of endpoints to use. |
|
|
no |
The list of volumes to mount. |
|
|
no |
The list of environment variables to use. |
Key | Type | Required | Description |
---|---|---|---|
|
|
yes |
The name of your endpoint. |
|
|
yes |
The port number that you target. |
|
|
no |
Use the following attributes to describe how to expose the endpoints on the network: |
|
|
no |
The path to the endpoint URL. |
|
|
no |
Use the following attributes to describe the application and transport protocols of the traffic that goes through the endpoint: |
|
|
no |
Choose whether to define the endpoint as secure. |
Key | Type | Required | Description |
---|---|---|---|
|
|
yes |
The name of the volume components that you use. |
|
|
no |
The path in the component container where you mount the volume. |
Key | Type | Required | Description |
---|---|---|---|
|
|
yes |
The name of the volume component. |
|
|
no |
The size of the storage you create. |
-
Add a
components
section in the devfile, containing a list of one or more components. -
For each component, define a unique value for the mandatory
name
attribute. -
For each component, define one of the following types for the mandatory
type
attribute:kubernetes
,container
,openshift
, orvolume
.