From 70a00bed1de85ef32e31bb772157c1c7fd08de17 Mon Sep 17 00:00:00 2001 From: iwilltry42 Date: Thu, 15 Apr 2021 14:30:39 +0200 Subject: [PATCH] json-schema: add some examples and defaults --- pkg/config/v1alpha2/schema.json | 38 +++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/pkg/config/v1alpha2/schema.json b/pkg/config/v1alpha2/schema.json index 01a168c6..ade6c64b 100644 --- a/pkg/config/v1alpha2/schema.json +++ b/pkg/config/v1alpha2/schema.json @@ -11,13 +11,15 @@ "type": "string", "enum": [ "k3d.io/v1alpha2" - ] + ], + "default": "k3d.io/v1alpha2" }, "kind": { "type": "string", "enum": [ "Simple" - ] + ], + "default": "Simple" }, "name": { "description": "Name of the cluster (must be a valid hostname and will be prefixed with 'k3d-'). Example: 'mycluster'.", @@ -41,16 +43,26 @@ }, "hostIP": { "type": "string", - "format": "ipv4" + "format": "ipv4", + "examples": [ + "0.0.0.0", + "192.168.178.55" + ] }, "hostPort": { - "type":"string" + "type":"string", + "examples": [ + "6443" + ] } }, "additionalProperties": false }, "image": { - "type": "string" + "type": "string", + "examples": [ + "rancher/k3s:latest" + ] }, "network": { "type": "string" @@ -114,7 +126,12 @@ "default": true }, "timeout": { - "type": "string" + "type": "string", + "examples": [ + "60s", + "1m", + "1m30s" + ] }, "disableLoadbalancer": { "type": "boolean", @@ -209,7 +226,14 @@ "type": "array", "items": { "type": "string" - } + }, + "examples": [ + "loadbalancer", + "server[*]", + "server[0]", + "agent[1]", + "all" + ] } } } \ No newline at end of file