Users can create a Helm chart that supports form input.
Helm 3 or later versions.Form Input Support Helm Chart
Using a Helm chart that supports form input, users can input each item through a user interface when installing the Helm chart.
Helm Chart File Composition and values.schema.json File
Helm Chart File Composition
To support form input, a values.schema.json file is required in addition to the basic Helm chart file composition.
Relationship between values.schema.json and values.yaml Files
values.schema.json
- A file defined in JSON Schema to validate the values entered in the
values.yamlfile. - DevOps Console provides additional features to display forms on the screen and allow users to easily input values.
JSON Schema Basics
The values.schema.json file used in DevOps Console supports the standard format defined in JSON Schema.
For detailed guides on standard formats, please refer to the following sites:
The basic properties are described as follows:
| Property | Description | Data Type | Allowed Values |
|---|---|---|---|
| $schema |
| string | http://json-schema.org/schema# |
| type | Data type
| string |
|
| |||
| |||
| |||
| |||
| |||
| |||
| title | Label | string | Defines the label for the item |
| description | Description | string | Displays as a tooltip |
| readOnly | Read-only status | boolean |
|
| required | List of required input items | array | e.g., "required": ["username", "password"] |
DevOps Console Defined Items
The following items are defined in DevOps Console and only work in DevOps Console.
| Property | Description | Data Type | Allowed Values |
|---|---|---|---|
| form | DevOps Console screen display status
| boolean | default: false |
| render | Renderer change | string |
|
| format | String format reference | string |
|
| form_locale | Defined for internationalization processing
| object |
|
|
Hierarchical Processing
To process hierarchical structures, JSON Schema defines the "type": "object" property value and the properties property. Sub-properties are defined under the properties item.
The following example defines the service.internalPort property.
"service": {
"type": "object",
"form": true,
"properties": {
"internalPort": {
"type": "number",
"title": "Container Port",
"description": "HTTP port to expose at container level",
"form": true
}
<omitted>"service": {
"type": "object",
"form": true,
"properties": {
"internalPort": {
"type": "number",
"title": "Container Port",
"description": "HTTP port to expose at container level",
"form": true
}
<omitted>Internationalization Processing
For internationalization processing, use the form_locale property and define it as follows.
Supports Korean and English.
"db": {
"type": "string",
"title": "DB",
"description": "choose db type",
"oneOf": [
{
"const": "in",
"title": "internal"
},
{
"const": "ex",
"title": "external"
}
],
"form": true,
"form_locale": {
"ko": {
"label": "데이터베이스",
"description": "데이터베이스 타입을 선택하세요",
"internal": "내부",
"external": "외부"
},
"en": {
"label": "Database"
}
}
}"db": {
"type": "string",
"title": "DB",
"description": "choose db type",
"oneOf": [
{
"const": "in",
"title": "internal"
},
{
"const": "ex",
"title": "external"
}
],
"form": true,
"form_locale": {
"ko": {
"label": "데이터베이스",
"description": "데이터베이스 타입을 선택하세요",
"internal": "내부",
"external": "외부"
},
"en": {
"label": "Database"
}
}
}values.schema.json Writing Example
Form Type Examples
Input
To display the defined fields in the values.schema.json file as a form on the screen, set the form field value to true.
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"form_field": {
"type": "string",
"form": true
},
"hide_field": {
"type": "string"
}
}
}{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"form_field": {
"type": "string",
"form": true
},
"hide_field": {
"type": "string"
}
}
}Password
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"password_field": {
"type": "string",
"form": true,
"render": "password",
"format": "password_confirm"
}
}
}{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"password_field": {
"type": "string",
"form": true,
"render": "password",
"format": "password_confirm"
}
}
}Checkbox
"enabled": {
"title": "enable persistence",
"type": "boolean",
"form": true
}"enabled": {
"title": "enable persistence",
"type": "boolean",
"form": true
}Dropdown
To display a dropdown field on the screen and specify allowed values, use the enum and oneOf properties.
enum
Used when the displayed text and stored value are the same.
"postgres": {
"type": "string",
"title": "Postgres",
"description": "choose PostgreSQL type.",
"enum": [
"internal",
"external",
"both"
],
"form": true
}"postgres": {
"type": "string",
"title": "Postgres",
"description": "choose PostgreSQL type.",
"enum": [
"internal",
"external",
"both"
],
"form": true
}oneOf
Used when the displayed text and stored value are different.
"Oneof": {
"type": "string",
"title": "DB",
"description": "choose db type",
"oneOf": [
{
"const": "in",
"title": "internal"
},
{
"const": "ex",
"title": "external"
}
],
"form": true
}"Oneof": {
"type": "string",
"title": "DB",
"description": "choose db type",
"oneOf": [
{
"const": "in",
"title": "internal"
},
{
"const": "ex",
"title": "external"
}
],
"form": true
}Array
"Array": {
"type": "array",
"items": {
"type": "string",
"form": true
},
"form": true
}"Array": {
"type": "array",
"items": {
"type": "string",
"form": true
},
"form": true
}Object Array
"objectArray": {
"type": "array",
"title": "Object Array",
"form": true,
"items": {
"type": "object",
"form": true,
"properties": {
"host": {
"type": "string",
"form": true
},
"path": {
"type": "string",
"form": true
}
}
}
}"objectArray": {
"type": "array",
"title": "Object Array",
"form": true,
"items": {
"type": "object",
"form": true,
"properties": {
"host": {
"type": "string",
"form": true
},
"path": {
"type": "string",
"form": true
}
}
}
}values.schema.json full file writing example
system-nginx
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"form": true,
"properties": {
"service": {
"type": "object",
"form": true,
"properties": {
"type": {
"type": "string",
"title": "Service Type",
"form": true,
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
},
"externalPort": {
"type": "number",
"title": "Service Port",
"description": "HTTP port to expose at service level",
"form": true
},
"internalPort": {
"type": "number",
"title": "Container Port",
"description": "HTTP port to expose at container level",
"form": true
}
},
"required": ["type", "externalPort", "internalPort"]
},
"ingress": {
"type": "object",
"form": true,
"properties": {
"enabled": {
"type": "boolean",
"title": "Use Ingress",
"form": true
},
"domain": {
"type": ["string", "null"],
"format": "hostname",
"title": "Ingress Domain",
"description": "Default host for the ingress resource (required when `ingress.enabled=true`)",
"form": true
}
}
},
"networkPolicy": {
"type": "object",
"form": true,
"properties": {
"enabled": {
"type": "boolean",
"title": "Use NetworkPolicy",
"form": true
}
}
}
}
}{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"form": true,
"properties": {
"service": {
"type": "object",
"form": true,
"properties": {
"type": {
"type": "string",
"title": "Service Type",
"form": true,
"enum": ["ClusterIP", "NodePort", "LoadBalancer", "ExternalName"]
},
"externalPort": {
"type": "number",
"title": "Service Port",
"description": "HTTP port to expose at service level",
"form": true
},
"internalPort": {
"type": "number",
"title": "Container Port",
"description": "HTTP port to expose at container level",
"form": true
}
},
"required": ["type", "externalPort", "internalPort"]
},
"ingress": {
"type": "object",
"form": true,
"properties": {
"enabled": {
"type": "boolean",
"title": "Use Ingress",
"form": true
},
"domain": {
"type": ["string", "null"],
"format": "hostname",
"title": "Ingress Domain",
"description": "Default host for the ingress resource (required when `ingress.enabled=true`)",
"form": true
}
}
},
"networkPolicy": {
"type": "object",
"form": true,
"properties": {
"enabled": {
"type": "boolean",
"title": "Use NetworkPolicy",
"form": true
}
}
}
}
}
