Customize the OpenShift Dev Spaces Dashboard to display custom samples that reflect your organization’s preferred languages, frameworks, and project templates for faster onboarding.
Procedure
Create a JSON file with the samples configuration. The file must contain an array of objects, where each object represents a sample.
cat > my-samples.json <<EOF
[
{
"displayName": "<display_name> ",
"description": "<description> ",
"tags": <tags> ,
"url": "<url> ",
"icon": {
"base64data": "<base64data> ",
"mediatype": "<mediatype> "
}
}
]
EOFCopy code to clipboard
where:
displayName
The display name of the sample.
description
The description of the sample.
tags
The JSON array of tags, for example, ["java", "spring"].
url
The URL to the repository containing the devfile.
base64data
The base64-encoded data of the icon.
mediatype
The media type of the icon. For example, image/png.
Create a ConfigMap with the samples configuration:
oc create configmap getting-started-samples --from-file=my-samples.json -n openshift-devspacesCopy code to clipboard
Add the required labels to the ConfigMap:
oc label configmap getting-started-samples app.kubernetes.io/part-of=che.eclipse.org app.kubernetes.io/component=getting-started-samples -n openshift-devspacesCopy code to clipboard
Results
Refresh the OpenShift Dev Spaces Dashboard page and verify that the new samples are displayed on the Create Workspace page.