| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- {
- "$schema": "http://json-schema.org/schema#",
- "title": "schema for the default deploy driver",
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "resource name",
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
- "maxLength": 50
- },
- "driver": {
- "type": "string",
- "description": "resource driver",
- "enum": ["deploy", ""]
- },
- "depends_on": {
- "type": "array",
- "description": "list of resource names this resource depends on",
- "minItems": 1,
- "items": {
- "type": "string",
- "description": "dependency resource name",
- "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
- "maxLength": 50
- }
- },
- "source": {
- "type": "object",
- "description": "resource source",
- "properties": {
- "name": {
- "type": "string",
- "description": "source Helm chart name"
- },
- "version": {
- "type": "string",
- "description": "source Helm chart version"
- },
- "repo": {
- "type": "string",
- "description": "source Helm chart repo URL",
- "default": "https://charts.getporter.dev"
- }
- },
- "required": ["name"]
- },
- "target": {
- "type": "object",
- "description": "resource target",
- "properties": {
- "project": {
- "type": "integer",
- "description": "target Porter project ID"
- },
- "cluster": {
- "type": "integer",
- "description": "target Porter cluster ID"
- },
- "namespace": {
- "type": "string",
- "description": "target namespace"
- }
- }
- },
- "config": {
- "type": "object",
- "description": "resource configuration",
- "additionalProperties": true
- },
- "if": {
- "properties": {
- "source": {
- "properties": { "repo": { "const": "https://charts.getporter.dev" } }
- }
- }
- },
- "then": {
- "properties": {
- "config": {
- "properties": {
- "waitForJob": {
- "type": "boolean",
- "description": "wait for job to complete"
- },
- "onlyCreate": {
- "type": "boolean",
- "description": "only create the resource"
- },
- "build": {
- "type": "object",
- "description": "build configuration",
- "properties": {
- "use_cache": {
- "type": "boolean",
- "description": "use Porter build cache"
- },
- "method": {
- "type": "string",
- "description": "build method",
- "default": "docker",
- "enum": ["docker", "pack", "registry"]
- },
- "context": {
- "type": "string",
- "description": "build context"
- },
- "dockerfile": {
- "type": "string",
- "description": "Dockerfile path"
- },
- "image": {
- "type": "string",
- "description": "image name"
- },
- "builder": {
- "type": "string",
- "description": "buildpacks builder image"
- },
- "buildpacks": {
- "type": "array",
- "description": "list of buildpacks",
- "minItems": 1,
- "items": {
- "type": "string",
- "description": "buildpack"
- }
- },
- "env": {
- "type": "object",
- "description": "build-time environment variables",
- "additionalProperties": { "type": "string" }
- }
- },
- "allOf": [
- {
- "if": {
- "properties": {
- "method": { "const": "docker" }
- }
- },
- "then": {
- "dependentRequired": {
- "method": ["dockerfile"]
- }
- }
- },
- {
- "if": {
- "properties": {
- "method": { "const": "registry" }
- }
- },
- "then": {
- "dependentRequired": {
- "method": ["image"]
- }
- }
- }
- ]
- },
- "env_groups": {
- "type": "array",
- "description": "list of environment groups to use in the deployment",
- "minItems": 1,
- "items": {
- "type": "object",
- "description": "environment group",
- "properties": {
- "name": {
- "type": "string",
- "description": "environment group name"
- },
- "version": {
- "type": "integer",
- "minimum": 0,
- "default": 0,
- "description": "environment group version"
- },
- "namespace": {
- "type": "string",
- "description": "environment group namespace"
- }
- },
- "required": ["name"]
- }
- },
- "values": {
- "type": "object",
- "description": "Helm values to use for the deployment",
- "additionalProperties": true
- }
- },
- "required": ["build"]
- }
- },
- "required": ["config"]
- }
- },
- "required": ["name", "source"]
- }
|