Tye is a tool that makes developing, testing, and deploying microservices and distributed applications easier. Project Tye includes a local orchestrator to make developing microservices easier and the ability to deploy microservices to Kubernetes with min
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

312 lines
10 KiB

{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://microsoft.com/dotnet/tye.schema.json",
"title": "Tye Configuration",
"description": "Configuration file schema for Tye.",
"type": "object",
"properties": {
"name": {
"description": "The application name.",
"type": "string"
},
"registry": {
"description": "Dockerhub username or hostname of remote registry. Used for tagging images.",
"type": "string"
},
"namespace": {
"description": "The Kubernetes namespace to use.",
"type": "string"
},
"network": {
"description": "The Docker network to use.",
"type": "string"
},
"ingress": {
"description": "The application's ingresses.",
"type": "array",
"minItems": 1,
"items": {
"$ref": "#/definitions/ingress"
}
},
"services": {
"description": "The application's services.",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"oneOf": [
{
"$ref": "#/definitions/executable"
},
{
"$ref": "#/definitions/external"
},
{
"$ref": "#/definitions/image"
},
{
"$ref": "#/definitions/project"
}
]
}
}
},
"required": [
"services"
],
"definitions": {
"binding": {
"type": "object",
"properties": {
"name": {
"description": "The binding name.",
"type": "string"
},
"port": {
"description": "The binding port.",
"type": "integer"
},
"containerPort": {
"description": "The port used when running inside a container.",
"type": "integer"
},
"host": {
"description": "The hostname for the binding.",
"type": "string"
},
"protocol": {
"description": "The protocol used by the binding",
"type": "string"
},
"autoAssignPort": {
"description": "Whether to auto-assign a port value.",
"type": "boolean",
"default": false
},
"connectionString": {
"description": "The connection string.",
"type": "string"
}
},
"additionalProperties": false
},
"env-var": {
"type": "object",
"properties": {
"name": {
"description": "Environment variable name.",
"type": "string"
},
"value": {
"description": "Environment variable value.",
"type": "string"
}
},
"required": [
"name",
"value"
],
"additionalProperties": false
},
"executable": {
"type": "object",
"properties": {
"name": {
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"executable": {
"description": "The file path (or file name if on the system path) of an executable.",
"type": "string"
},
"workingDirectory": {
"description": "The working directory to use when launching.",
"type": "string"
},
"env": {
"description": "Environment variables to use when launching.",
"type": "array",
"items": {
"$ref": "#/definitions/env-var"
}
},
"args": {
"description": "Command-line arguments to use when launching.",
"type": "string"
},
"replicas": {
"description": "Number of service replices to create.",
"type": "integer"
},
"bindings": {
"description": "The bindings provided by the service.",
"type": "array",
"items": {
"$ref": "#/definitions/binding"
}
}
},
"required": [
"name",
"executable"
]
},
"external": {
"properties": {
"name": {
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"external": {
"description": "Designates as service as external. External services will not be launched and can only provide bindings.",
"type": "boolean",
"const": true
}
},
"additionalProperties": false
},
"image": {
"type": "object",
"properties": {
"name": {
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"image": {
"description": "The name of a Docker image.",
"type": "string"
},
"env": {
"description": "Environment variables to use when launching.",
"type": "array",
"items": {
"$ref": "#/definitions/env-var"
}
},
"args": {
"description": "Command-line arguments to use when launching.",
"type": "string"
},
"replicas": {
"description": "Number of service replices to create.",
"type": "integer"
},
"bindings": {
"description": "The bindings provided by the service.",
"type": "array",
"items": {
"$ref": "#/definitions/binding"
}
}
},
"required": [
"name",
"image"
]
},
"ingress": {
"type": "object",
"properties": {
"name": {
"description": "The ingress name.",
"type": "string"
},
"bindings": {
"description": "Bindings for the ingress in local development.",
"type": "array",
"items": {
"$ref": "#/definitions/ingress-binding"
}
},
"rules": {
"description": "Rules for ingress routing.",
"type": "array",
"items": {
"$ref": "#/definitions/ingress-rule"
}
}
}
},
"ingress-binding": {
"type": "object",
"properties": {
"name": {
"description": "The binding name.",
"type": "string"
},
"port": {
"description": "The binding port.",
"type": "integer"
},
"protocol": {
"description": "The protocol used by the binding",
"type": "string"
}
}
},
"ingress-rule": {
"type": "object",
"properties": {
"service": {
"description": "The service to route traffic when the rule matches.",
"type": "string"
},
"path": {
"description": "The path prefix to match.",
"type": "string"
},
"host": {
"description": "The hostname to match.",
"type": "string"
}
},
"required": [
"service"
]
},
"project": {
"type": "object",
"properties": {
"name": {
"description": "The service name. Must be unique per-application.",
"type": "string"
},
"project": {
"description": "The relative path to a .NET project file.",
"type": "string"
},
"env": {
"description": "Environment variables to use when launching.",
"type": "array",
"items": {
"$ref": "#/definitions/env-var"
}
},
"args": {
"description": "Command-line arguments to use when launching.",
"type": "string"
},
"build": {
"description": "Whether to build the project.",
"type": "boolean"
},
"replicas": {
"description": "Number of service replices to create.",
"type": "integer"
},
"bindings": {
"description": "The bindings provided by the service.",
"type": "array",
"items": {
"$ref": "#/definitions/binding"
}
}
},
"required": [
"name",
"project"
]
}
}
}