diff --git a/helm/values.schema.json b/helm/values.schema.json new file mode 100644 index 00000000..da24f3cb --- /dev/null +++ b/helm/values.schema.json @@ -0,0 +1,140 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": true, + "properties": { + "global": { + "type": "object", + "properties": { + "databaseType": { + "type": "string", + "enum": ["internal", "external"] + }, + "storageClass": { + "type": "string" + } + } + }, + "replicaCount": { + "type": "integer", + "minimum": 1 + }, + "autoscaling": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "minReplicas": { + "type": "integer", + "minimum": 1 + }, + "maxReplicas": { + "type": "integer", + "minimum": 1 + }, + "targetCPUUtilizationPercentage": { + "type": "integer", + "minimum": 1, + "maximum": 100 + } + } + }, + "ingress": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "host": { + "type": "string" + } + } + }, + "externalDatabase": { + "type": "object", + "properties": { + "host": { + "type": "string" + } + } + }, + "persistence": { + "type": "object", + "properties": { + "repositories": { + "type": "object", + "properties": { + "size": { + "type": "string", + "pattern": "^[0-9]+[KMGT]i?$" + }, + "retainOnDelete": { + "type": "boolean" + } + } + } + } + }, + "ssh": { + "type": "object", + "properties": { + "serviceType": { + "type": "string", + "enum": ["LoadBalancer", "NodePort", "ClusterIP"] + } + } + } + }, + "if": { + "properties": { + "ingress": { + "properties": { + "enabled": { + "const": true + } + } + } + }, + "required": ["ingress"] + }, + "then": { + "properties": { + "ingress": { + "required": ["host"], + "properties": { + "host": { + "minLength": 1 + } + } + } + } + }, + "allOf": [ + { + "if": { + "properties": { + "global": { + "properties": { + "databaseType": { + "const": "external" + } + } + } + } + }, + "then": { + "properties": { + "externalDatabase": { + "required": ["host"], + "properties": { + "host": { + "minLength": 1 + } + } + } + } + } + } + ] +}