From 6899092fa54e0ade5c3c002dd38a5d38f7e58509 Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 18 Aug 2021 15:34:02 -0500 Subject: [PATCH 1/2] docs(api): demo of swagger shortcode --- content/en/docs/reference/_index.md | 5 + .../en/docs/reference/api-deploy-engine.md | 8 + .../en/docs/reference/api-deploy-engine2.md | 8 + .../deploy-engine/deployment-swagger.json | 1411 +++++++++++++++++ themes/docsy | 2 +- 5 files changed, 1433 insertions(+), 1 deletion(-) create mode 100644 content/en/docs/reference/_index.md create mode 100644 content/en/docs/reference/api-deploy-engine.md create mode 100644 content/en/docs/reference/api-deploy-engine2.md create mode 100644 static/reference/deploy-engine/deployment-swagger.json diff --git a/content/en/docs/reference/_index.md b/content/en/docs/reference/_index.md new file mode 100644 index 0000000000..d79b10f6e5 --- /dev/null +++ b/content/en/docs/reference/_index.md @@ -0,0 +1,5 @@ +--- +title: "API Reference" +description: API Reference for Armory products +weight: 24 +--- diff --git a/content/en/docs/reference/api-deploy-engine.md b/content/en/docs/reference/api-deploy-engine.md new file mode 100644 index 0000000000..89d82b6988 --- /dev/null +++ b/content/en/docs/reference/api-deploy-engine.md @@ -0,0 +1,8 @@ +--- +title: "Deploy Engine API" +type: swagger +weight: 1 +description: Reference for the Deploy Engine API +--- + +{{< swaggerui src="/reference/deploy-engine/deployment-swagger.json" >}} \ No newline at end of file diff --git a/content/en/docs/reference/api-deploy-engine2.md b/content/en/docs/reference/api-deploy-engine2.md new file mode 100644 index 0000000000..c99e8f772c --- /dev/null +++ b/content/en/docs/reference/api-deploy-engine2.md @@ -0,0 +1,8 @@ +--- +title: "Deploy Engine API 2" +type: swagger +weight: 1 +description: Reference for the Deploy Engine API 2 +--- + +{{< swaggerui src="https://github.com/armory-io/deploy-engine/blob/master/third_party/openapi/deployment.swagger.json" >}} \ No newline at end of file diff --git a/static/reference/deploy-engine/deployment-swagger.json b/static/reference/deploy-engine/deployment-swagger.json new file mode 100644 index 0000000000..6644e0fc5f --- /dev/null +++ b/static/reference/deploy-engine/deployment-swagger.json @@ -0,0 +1,1411 @@ +{ + "swagger": "2.0", + "info": { + "title": "Armory Deployment Engine", + "description": "Reliable deployments with Armory", + "version": "1.0", + "contact": { + "name": "Armory", + "url": "https://armory.io", + "email": "engineering@armory.io" + } + }, + "tags": [ + { + "name": "DeploymentService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/v1/accounts": { + "get": { + "summary": "Get accounts available", + "operationId": "DeploymentService_GetAccounts", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/accountGetAccountResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "provider", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/applications": { + "get": { + "summary": "Get applications", + "operationId": "DeploymentService_GetApplications", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/appGetAppResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "env.provider", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "env.account", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "env.alias", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "env.kubernetes.namespace", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "env.aws.region", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "env.aws.vpc", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/applications/{app}/deployments": { + "get": { + "summary": "Get deployments for the specified application(s)", + "operationId": "DeploymentService_GetApplicationDeployments", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/appGetAppDeployResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "app", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "all", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/deployments": { + "post": { + "summary": "Start a deployment", + "operationId": "DeploymentService_Start", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/statusDescriptor" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/deploymentDeployment" + } + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/deployments/{deploymentId}": { + "get": { + "summary": "Get deployment status", + "operationId": "DeploymentService_Status", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/statusDescriptor" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "deploymentId", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/deployments/{deploymentId}/abort": { + "post": { + "summary": "Abort a deployment", + "operationId": "DeploymentService_Abort", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rolloutRolloutResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "deploymentId", + "description": "Deployment to resume", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/deployments/{deploymentId}/events": { + "get": { + "summary": "Watch deployment events\nCommented out for now - clients will need to poll\n rpc WatchEvents(status.GetEventRequest) returns (stream event.Event) {\n option (google.api.http) = {\n get: \"/v1/deployments/{deploymentId}/events/watch\"\n };\n }\nGet deployment recent events", + "operationId": "DeploymentService_GetEvents", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/statusEventListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "deploymentId", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "eventFilter.type", + "description": " - DEPLOYMENT: Events related to the overall deployment\n - ATOMIC: Events related to atomic deployment", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "DEPLOYMENT", + "ATOMIC" + ], + "default": "DEPLOYMENT" + }, + { + "name": "eventFilter.lastEventOnly", + "in": "query", + "required": false, + "type": "boolean" + }, + { + "name": "eventFilter.afterId", + "in": "query", + "required": false, + "type": "string", + "format": "int64" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/deployments/{deploymentId}/restart": { + "post": { + "summary": "Restart a deployment", + "operationId": "DeploymentService_Restart", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rolloutRolloutResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "deploymentId", + "description": "Deployment to resume", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "DeploymentService" + ] + } + }, + "/v1/deployments/{deploymentId}/resume": { + "post": { + "summary": "Resume a paused deployment", + "operationId": "DeploymentService_Resume", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/rolloutRolloutResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/googlerpcStatus" + } + } + }, + "parameters": [ + { + "name": "deploymentId", + "description": "Deployment to resume", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "DeploymentService" + ] + } + } + }, + "definitions": { + "AMIArtifactImageFinder": { + "type": "object", + "properties": { + "package": { + "type": "string" + }, + "regions": { + "type": "array", + "items": { + "type": "string" + } + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "AWSObjectEmbeddedType": { + "type": "string", + "enum": [ + "CLOUDFORMATION", + "CLOUDFORMATION_TEMPLATE", + "LAUNCH_TEMPLATE_REFERENCE", + "LAUNCH_TEMPLATE" + ], + "default": "CLOUDFORMATION", + "title": "- CLOUDFORMATION: See https://docs.aws.amazon.com/sdk-for-go/api/service/cloudformation/#CloudFormation.ValidateTemplate\n - LAUNCH_TEMPLATE: See https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-anatomy.html" + }, + "AntiAffinityPreferredDuringSchedulingIgnoredDuringExecution": { + "type": "object", + "properties": { + "weight": { + "type": "integer", + "format": "int32" + } + } + }, + "AntiAffinityRequiredDuringSchedulingIgnoredDuringExecution": { + "type": "object" + }, + "ArtifactSourceGet": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "url": { + "type": "string" + }, + "branch": { + "type": "string" + }, + "path": { + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "CanaryCanaryStep": { + "type": "object", + "properties": { + "setWeight": { + "type": "integer", + "format": "int32" + }, + "pause": { + "$ref": "#/definitions/CanaryRolloutPause" + }, + "wait": { + "$ref": "#/definitions/CanaryRolloutWait" + }, + "experiment": { + "$ref": "#/definitions/CanaryRolloutExperimentStep" + }, + "analysis": { + "$ref": "#/definitions/successCheckRun" + }, + "setCanaryScale": { + "$ref": "#/definitions/CanarySetCanaryScale" + } + } + }, + "CanaryPodTemplateMetadata": { + "type": "object", + "properties": { + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "CanaryRolloutExperimentStep": { + "type": "object", + "properties": { + "templates": { + "type": "array", + "items": { + "$ref": "#/definitions/CanaryRolloutExperimentTemplate" + } + }, + "duration": { + "type": "string", + "title": "TODO make duration type" + }, + "analyses": { + "type": "array", + "items": { + "$ref": "#/definitions/successCheckRun" + } + } + } + }, + "CanaryRolloutExperimentTemplate": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "specRef": { + "type": "string" + }, + "replicas": { + "type": "integer", + "format": "int32" + }, + "metadata": { + "$ref": "#/definitions/CanaryPodTemplateMetadata" + }, + "selector": { + "$ref": "#/definitions/v1LabelSelector" + } + } + }, + "CanaryRolloutPause": { + "type": "object" + }, + "CanaryRolloutWait": { + "type": "object", + "properties": { + "duration": { + "$ref": "#/definitions/strategyIntOrString" + } + } + }, + "CanarySetCanaryScale": { + "type": "object", + "properties": { + "weight": { + "type": "integer", + "format": "int32" + }, + "replicas": { + "type": "integer", + "format": "int32" + }, + "matchTrafficWeight": { + "type": "boolean" + } + } + }, + "GetEventRequestEventFilter": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/eventType" + }, + "lastEventOnly": { + "type": "boolean" + }, + "afterId": { + "type": "string", + "format": "int64" + } + } + }, + "NamingOptionsMoniker": { + "type": "object", + "properties": { + "app": { + "type": "string" + }, + "cluster": { + "type": "string" + }, + "detail": { + "type": "string" + }, + "stack": { + "type": "string" + }, + "sequence": { + "type": "string" + } + } + }, + "accountAccount": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "account": { + "type": "string" + } + } + }, + "accountGetAccountResponse": { + "type": "object", + "properties": { + "accounts": { + "type": "array", + "items": { + "$ref": "#/definitions/accountAccount" + } + } + } + }, + "appAppDeploy": { + "type": "object", + "properties": { + "environment": { + "$ref": "#/definitions/environmentEnvironment" + }, + "deploymentId": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/eventStatus" + } + } + }, + "appAppSummary": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "deployments": { + "type": "integer", + "format": "int32" + }, + "lastSuccessful": { + "type": "string", + "format": "date-time" + }, + "lastFailure": { + "type": "string", + "format": "date-time" + } + } + }, + "appGetAppDeployResponse": { + "type": "object", + "properties": { + "deployments": { + "type": "array", + "items": { + "$ref": "#/definitions/appAppDeploy" + } + } + } + }, + "appGetAppResponse": { + "type": "object", + "properties": { + "apps": { + "type": "array", + "items": { + "$ref": "#/definitions/appAppSummary" + } + } + } + }, + "artifactAMIArtifact": { + "type": "object", + "properties": { + "amiId": { + "type": "string" + }, + "params": { + "$ref": "#/definitions/AMIArtifactImageFinder" + } + }, + "description": "AMIArtifact represents an AMI reference either direct (= ID)\nor with parameters to resolve at runtime." + }, + "artifactAWSArtifact": { + "type": "object", + "properties": { + "ec2": { + "$ref": "#/definitions/artifactAMIArtifact" + }, + "object": { + "$ref": "#/definitions/artifactAWSObject" + } + }, + "title": "AWS specific artifacts" + }, + "artifactAWSObject": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/AWSObjectEmbeddedType" + }, + "definition": { + "type": "object" + } + }, + "description": "AWSObject represents the definition of an AWS object. It can\nbe given as CloudFormation, launch template, etc.\nWe don't have (or haven't found) a reliable protobuf definition\nfor AWS SDK objects." + }, + "artifactArtifact": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "kubernetes": { + "$ref": "#/definitions/artifactKubernetesArtifact" + }, + "aws": { + "$ref": "#/definitions/artifactAWSArtifact" + } + } + }, + "artifactArtifactSource": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "get": { + "$ref": "#/definitions/ArtifactSourceGet" + }, + "via": { + "$ref": "#/definitions/commonVia" + }, + "provided": { + "$ref": "#/definitions/protobufAny" + } + }, + "title": "ArtifactSource: where we get the data from" + }, + "artifactHelmArtifact": { + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/artifactArtifactSource" + }, + "version": { + "type": "string" + } + }, + "title": "Helm chart to run" + }, + "artifactKubernetesArtifact": { + "type": "object", + "properties": { + "kustomize": { + "$ref": "#/definitions/artifactKustomizeArtifact" + }, + "manifests": { + "$ref": "#/definitions/artifactManifestsArtifact" + }, + "helm": { + "$ref": "#/definitions/artifactHelmArtifact" + }, + "versions": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "artifactKustomizeArtifact": { + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/artifactArtifactSource" + } + }, + "title": "Kustomization" + }, + "artifactManifestsArtifact": { + "type": "object", + "properties": { + "source": { + "$ref": "#/definitions/artifactArtifactSource" + } + }, + "title": "Direct manifests in JSON or YAML" + }, + "commonVia": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "account": { + "type": "string" + } + } + }, + "deploymentDeployment": { + "type": "object", + "properties": { + "application": { + "type": "string" + }, + "environment": { + "$ref": "#/definitions/environmentEnvironment" + }, + "artifacts": { + "type": "array", + "items": { + "$ref": "#/definitions/artifactArtifact" + } + }, + "strategy": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/strategyStrategy" + } + }, + "namingOptions": { + "$ref": "#/definitions/deploymentNamingOptions" + } + } + }, + "deploymentNamingOptions": { + "type": "object", + "properties": { + "spinnaker": { + "type": "boolean" + }, + "moniker": { + "$ref": "#/definitions/NamingOptionsMoniker" + } + } + }, + "environmentAWSQualifier": { + "type": "object", + "properties": { + "region": { + "type": "string" + }, + "vpc": { + "type": "string" + } + } + }, + "environmentEnvironment": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "account": { + "type": "string" + }, + "alias": { + "type": "string" + }, + "kubernetes": { + "$ref": "#/definitions/environmentKubernetesQualifier" + }, + "aws": { + "$ref": "#/definitions/environmentAWSQualifier" + } + } + }, + "environmentKubernetesQualifier": { + "type": "object", + "properties": { + "namespace": { + "type": "string" + } + } + }, + "eventEvent": { + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/eventType" + }, + "status": { + "$ref": "#/definitions/eventStatus" + }, + "message": { + "type": "string" + }, + "occurredAt": { + "type": "string" + }, + "state": { + "$ref": "#/definitions/protobufAny", + "title": "Optionally carries an updated state. The state won't be saved in DE" + } + }, + "description": "Event can be emitted during the lifecycle of a deployment\nAll events are then centralized in Deploy Engine." + }, + "eventStatus": { + "type": "string", + "enum": [ + "NOT_STARTED", + "RESOLVED", + "PENDING", + "FAILED", + "FAILED_CLEANING", + "SUCCEEDED", + "SUCCEEDED_CLEANING", + "ABORTED", + "PAUSED", + "QUEUED" + ], + "default": "NOT_STARTED" + }, + "eventType": { + "type": "string", + "enum": [ + "DEPLOYMENT", + "ATOMIC" + ], + "default": "DEPLOYMENT", + "title": "- DEPLOYMENT: Events related to the overall deployment\n - ATOMIC: Events related to atomic deployment" + }, + "googlerpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "protobufAny": { + "type": "object", + "properties": { + "typeUrl": { + "type": "string", + "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." + } + }, + "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := \u0026pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" + }, + "protobufNullValue": { + "type": "string", + "enum": [ + "NULL_VALUE" + ], + "default": "NULL_VALUE", + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + }, + "rolloutRolloutResponse": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "numberAffected": { + "type": "integer", + "format": "int32" + } + } + }, + "statusDescriptor": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "startedAt": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/eventStatus" + }, + "initiatedBy": { + "type": "string" + }, + "initiatedMethod": { + "type": "string" + }, + "env": { + "$ref": "#/definitions/environmentEnvironment" + }, + "application": { + "type": "string" + }, + "state": { + "$ref": "#/definitions/protobufAny", + "title": "Optionally carries an updated state. The state won't be saved in DE" + } + } + }, + "statusEventListResponse": { + "type": "object", + "properties": { + "events": { + "type": "array", + "items": { + "$ref": "#/definitions/eventEvent" + } + }, + "cursor": { + "type": "string", + "format": "int64" + } + } + }, + "strategyAntiAffinity": { + "type": "object", + "properties": { + "preferredDuringSchedulingIgnoredDuringExecution": { + "$ref": "#/definitions/AntiAffinityPreferredDuringSchedulingIgnoredDuringExecution" + }, + "requiredDuringSchedulingIgnoredDuringExecution": { + "$ref": "#/definitions/AntiAffinityRequiredDuringSchedulingIgnoredDuringExecution" + } + } + }, + "strategyBlueGreen": { + "type": "object", + "properties": { + "activeService": { + "type": "string" + }, + "previewService": { + "type": "string" + }, + "previewReplicaCount": { + "type": "integer", + "format": "int32" + }, + "autoPromotionEnabled": { + "type": "boolean" + }, + "autoPromotionSeconds": { + "type": "integer", + "format": "int32" + }, + "scaleDownDelaySeconds": { + "type": "integer", + "format": "int32" + }, + "scaleDownDelayRevisionLimit": { + "type": "integer", + "format": "int32" + }, + "prePromotionAnalysis": { + "$ref": "#/definitions/successCheckRun" + }, + "antiAffinity": { + "$ref": "#/definitions/strategyAntiAffinity" + }, + "postPromotionAnalysis": { + "$ref": "#/definitions/successCheckRun" + } + }, + "title": "Blue/green: bring up the new deployment, switch at once, and keep the old instances for a little while\nThis is strongly inspired by Argo's blue/green with potential adjustments to\ngeneralize blue/green strategy" + }, + "strategyCanary": { + "type": "object", + "properties": { + "canaryService": { + "type": "string" + }, + "stableService": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/CanaryCanaryStep" + } + }, + "maxUnavailable": { + "$ref": "#/definitions/strategyIntOrPercent" + }, + "maxSurge": { + "$ref": "#/definitions/strategyIntOrPercent" + }, + "analysis": { + "$ref": "#/definitions/successCheckRun" + }, + "antiAffinity": { + "$ref": "#/definitions/strategyAntiAffinity" + }, + "canaryMetadata": { + "$ref": "#/definitions/CanaryPodTemplateMetadata" + }, + "stableMetadata": { + "$ref": "#/definitions/CanaryPodTemplateMetadata" + } + }, + "title": "Canary: run a subset of instances, measure and if successful gradually increase instances" + }, + "strategyIntOrPercent": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "format": "int64" + }, + "percent": { + "type": "number", + "format": "double" + } + } + }, + "strategyIntOrString": { + "type": "object", + "properties": { + "iValue": { + "type": "integer", + "format": "int32" + }, + "sValue": { + "type": "string" + } + } + }, + "strategyRecreate": { + "type": "object", + "title": "Recreate: delete the whole thing, recreate: traffic may be lost but it will be cheap" + }, + "strategyRollback": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "title": "Rollback options" + }, + "strategyRollingUpdate": { + "type": "object", + "title": "Gradually rolls out new replicas to the mix until complete" + }, + "strategyStability": { + "type": "object", + "title": "When is the deployment stable?" + }, + "strategyStrategy": { + "type": "object", + "properties": { + "recreate": { + "$ref": "#/definitions/strategyRecreate" + }, + "blueGreen": { + "$ref": "#/definitions/strategyBlueGreen" + }, + "canary": { + "$ref": "#/definitions/strategyCanary" + }, + "rolling": { + "$ref": "#/definitions/strategyRollingUpdate" + }, + "Versioned": { + "type": "boolean", + "title": "Versioned: change the name and track references in Deployment\nConfigMap and Secrets are versioned by default" + }, + "Update": { + "type": "boolean", + "title": "Update object in place" + }, + "trafficRouting": { + "$ref": "#/definitions/trafficTrafficRouting" + }, + "rollback": { + "$ref": "#/definitions/strategyRollback" + }, + "stability": { + "$ref": "#/definitions/strategyStability" + }, + "checks": { + "type": "array", + "items": { + "$ref": "#/definitions/successCheck" + } + } + } + }, + "successArgument": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "value": { + "type": "string" + }, + "objectValue": { + "$ref": "#/definitions/protobufAny" + } + } + }, + "successCheck": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "name of the check" + }, + "metric": { + "$ref": "#/definitions/successMetric" + }, + "group": { + "$ref": "#/definitions/successGroup" + } + } + }, + "successCheckRun": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "requiredForCompletion": { + "type": "boolean" + }, + "arguments": { + "type": "array", + "items": { + "$ref": "#/definitions/successArgument" + } + } + } + }, + "successGroup": { + "type": "object", + "properties": { + "checks": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "title": "Analysis is a named series of checks" + }, + "successMetric": { + "type": "object", + "properties": { + "interval": { + "type": "string" + }, + "initialDelay": { + "type": "string" + }, + "count": { + "type": "integer", + "format": "int32" + }, + "successCondition": { + "type": "string" + }, + "failureCondition": { + "type": "string" + }, + "failureLimit": { + "type": "integer", + "format": "int32" + }, + "inconclusiveLimit": { + "type": "integer", + "format": "int32" + }, + "consecutiveErrorLimit": { + "type": "integer", + "format": "int32" + }, + "via": { + "$ref": "#/definitions/commonVia" + } + }, + "title": "Metric defines a metric in which to perform analysis" + }, + "trafficALBTrafficRouting": { + "type": "object", + "properties": { + "ingress": { + "type": "string" + }, + "servicePort": { + "type": "integer", + "format": "int32" + }, + "rootService": { + "type": "string" + }, + "annotationPrefix": { + "type": "string" + } + } + }, + "trafficIstioTrafficRouting": { + "type": "object", + "properties": { + "virtualService": { + "$ref": "#/definitions/trafficIstioVirtualService" + } + } + }, + "trafficIstioVirtualService": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "routes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "title": "IstioVirtualService holds information on the virtual service the rollout needs to modify" + }, + "trafficNginxTrafficRouting": { + "type": "object", + "properties": { + "annotationPrefix": { + "type": "string" + }, + "stableIngress": { + "type": "string" + }, + "additionalIngressAnnotations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "trafficSMITrafficRouting": { + "type": "object", + "properties": { + "rootService": { + "type": "string" + }, + "trafficSplitName": { + "type": "string" + } + } + }, + "trafficTrafficRouting": { + "type": "object", + "properties": { + "istio": { + "$ref": "#/definitions/trafficIstioTrafficRouting" + }, + "nginx": { + "$ref": "#/definitions/trafficNginxTrafficRouting" + }, + "alb": { + "$ref": "#/definitions/trafficALBTrafficRouting" + }, + "smi": { + "$ref": "#/definitions/trafficSMITrafficRouting" + } + } + }, + "v1LabelSelector": { + "type": "object", + "properties": { + "matchLabels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "title": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.\n+optional" + }, + "matchExpressions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1LabelSelectorRequirement" + }, + "title": "matchExpressions is a list of label selector requirements. The requirements are ANDed.\n+optional" + } + }, + "title": "A label selector is a label query over a set of resources. The result of matchLabels and\nmatchExpressions are ANDed. An empty label selector matches all objects. A null\nlabel selector matches no objects.\n+structType=atomic" + }, + "v1LabelSelectorRequirement": { + "type": "object", + "properties": { + "key": { + "type": "string", + "title": "key is the label key that the selector applies to.\n+patchMergeKey=key\n+patchStrategy=merge" + }, + "operator": { + "type": "string", + "description": "operator represents a key's relationship to a set of values.\nValid operators are In, NotIn, Exists and DoesNotExist." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "title": "values is an array of string values. If the operator is In or NotIn,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.\n+optional" + } + }, + "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates the key and values." + } + }, + "externalDocs": { + "description": "Armory Deploy Engine", + "url": "https://docs.github.com/armory-io/deploy-engine" + } +} \ No newline at end of file diff --git a/themes/docsy b/themes/docsy index 003b798c12..86c70cfa35 160000 --- a/themes/docsy +++ b/themes/docsy @@ -1 +1 @@ -Subproject commit 003b798c1252004c5c7a2915496b90c78d7a36e2 +Subproject commit 86c70cfa354d6a1f63bcf4ea5a87009221dd746b From 9b9c89ba53cd54574ba6e84cee622e9a93a173d6 Mon Sep 17 00:00:00 2001 From: Aimee Ukasick Date: Wed, 18 Aug 2021 15:36:17 -0500 Subject: [PATCH 2/2] add some comments --- content/en/docs/reference/api-deploy-engine.md | 2 ++ content/en/docs/reference/api-deploy-engine2.md | 3 +++ 2 files changed, 5 insertions(+) diff --git a/content/en/docs/reference/api-deploy-engine.md b/content/en/docs/reference/api-deploy-engine.md index 89d82b6988..080e072018 100644 --- a/content/en/docs/reference/api-deploy-engine.md +++ b/content/en/docs/reference/api-deploy-engine.md @@ -5,4 +5,6 @@ weight: 1 description: Reference for the Deploy Engine API --- +Retrieved via file in `/static` directory + {{< swaggerui src="/reference/deploy-engine/deployment-swagger.json" >}} \ No newline at end of file diff --git a/content/en/docs/reference/api-deploy-engine2.md b/content/en/docs/reference/api-deploy-engine2.md index c99e8f772c..1b5994315a 100644 --- a/content/en/docs/reference/api-deploy-engine2.md +++ b/content/en/docs/reference/api-deploy-engine2.md @@ -5,4 +5,7 @@ weight: 1 description: Reference for the Deploy Engine API 2 --- +Retrieved via URL + + {{< swaggerui src="https://github.com/armory-io/deploy-engine/blob/master/third_party/openapi/deployment.swagger.json" >}} \ No newline at end of file