{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/ti8m-cdk-concrete-environment-config.json",
  "title": "Concrete Environment Config",
  "description": "Defines the concrete environment configuration",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/definitions/concrete-environment-spec"
    }
  ],
  "definitions": {
    "concrete-environment-spec": {
      "type": "object",
      "additionalProperties": {
        "$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/serviceConfiguration",
        "description": "per-service overrides"
      },
      "properties": {
        "image-pull-secret": {
          "type": "string",
          "description": "the secret credentials type to authenticate against a private Docker registry, NOT the credentials itself"
        },
        "server": {
          "type": "string"
        },
        "includes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "global-template-parameters": {
          "type": "array",
          "items": {
            "$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/templateParameter"
          }
        },
        "template-parameters": {
          "type": "array",
          "items": {
            "$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/templateParameter"
          }
        },
        "hostname": {
          "type": "string",
          "description": "DNS name by which this concrete environment can be reached"
        },
        "target": {
          "description": "type of the target environment",
          "enum": ["docker-compose", "openshift", "kubernetes"]
        },
        "remote-project": {
          "type": "string",
          "description": "the name of the project/namespace in a cloud manager like kubernetes. Defaults to the name of the environment."
        },
        "resource-quota": {
          "$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/resourceSpec",
          "type": "object",
          "description": "Specifies resource usage of a container instance"
        },
        "route-mode": {
          "type": "string",
          "description": "The mode of the route for openshift. If it is not set the normal routing is used.",
          "enum": ["service-mesh"]
        },
        "tags": {
          "type": "object",
          "description": "the tags for the images referenced in the environment definition",
          "additionalProperties": {
            "type": "string",
            "description": "tag value"
          }
        },
        "critical": {
          "type": "boolean",
          "description": "Defines if it's a critical environment to deploy on. If so a prompt is shown."
        },
        "include": {
          "type": "array",
          "description": "List of service names or aliases, which should be instantiated in this specific environment. If set no other services from environment-definition will be loaded",
          "items": {
            "type": "string"
          }
        },
        "exclusions": {
          "type": "array",
          "description": "List of service names or aliases, which should *not* be instantiated in this specific environment",
          "items": {
            "type": "string"
          }
        },
        "config-set": {
          "type": "object",
          "description": "environment-specific additions and overrides for configuration sets",
          "additionalProperties": {
            "type": "object",
            "description": "per-config-set overrides",
            "allOf": [
              {
                "$ref": "https://json.schemastore.org/ti8m-cdk-environment-definition.json#/definitions/serviceConfiguration"
              }
            ]
          }
        }
      }
    }
  }
}
