Configure GUI Schema
In Devtron, you can create CRDs for defining the GUI schema. Your GUI schema will be used to determine the fields displayed to the user when they edit the manifest in GUI mode.
Who Can Perform This Action?
Only a Super-Admin can configure GUI Schema.
Editing GUI Schema
Go to Resource Browser and select your cluster.
Use the searchbox labelled 'Jump to Kind' and search for
Guischema
.Figure 1: Searching GUI Schema Click the GUI schema you wish to edit. In case no GUI schema exists, you may create a GUI schema for your resource kind.
Figure 2: Click GUI Schema Click Edit Live Manifest to modify the YAML.
Figure 3: Edit Live Manifest Locate the
schema
object and customize it according to your requirements.Figure 4: Modifying Schema Click Apply Changes.
Create your own GUI Schema
Go to Resource Browser and select your cluster.
Click Create Resource at the top.
Use the following template and define your schema in the
schema
object, also specify the resource kinds inapplyTo
. Once done, click Apply.
apiVersion: crd.devtron.ai/alpha1
kind: GuiSchema
metadata:
creationTimestamp: 2024-11-08T13:01:00Z
generation: 1
name: devtron-pod-gui
resourceVersion: "216257"
uid: 70e91158-288e-4c4a-8448-012e820148ca
spec:
applyTo:
- group: ""
kind: Pod
version: v1
schema: |
{
"title": "Pod Configuration",
"description": "A form to create a Kubernetes pod manifest",
"type": "object",
"required": [
"metadata",
"spec"
],
"properties": {
"metadata": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Pod Name",
"default": "my-pod",
"pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
"description": "Lower case letters, numbers, and hyphens only"
}
}
},
"spec": {
"type": "object",
"required": [
"containers"
],
"properties": {
"containers": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"name",
"image"
],
"properties": {
"name": {
"type": "string",
"title": "Container Name",
"default": "container-1",
"pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$",
"description": "Lower case letters, numbers, and hyphens only"
},
"image": {
"type": "string",
"title": "Container Image",
"description": "Docker image name with optional tag (e.g., nginx:1.14.2)"
},
"ports": {
"type": "array",
"title": "Container Ports",
"items": {
"type": "object",
"required": [
"containerPort"
],
"properties": {
"containerPort": {
"type": "integer",
"title": "Port Number",
"minimum": 1,
"maximum": 65535
}
}
}
}
}
}
}
}
}
}
}
Last updated
Was this helpful?