{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "Albatross is a helm cli wrapper and enables using helm via http calls", "title": "Albatross API.", "version": "v1.1.1" }, "paths": { "/clusters/{cluster}/namespaces/{namespace}/releases": { "get": { "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "release" ], "summary": "List the helm releases for the cluster and namespace", "operationId": "listOperationWithNamespace", "parameters": [ { "type": "string", "format": "string", "default": "minikube", "name": "cluster", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "default", "name": "namespace", "in": "path", "required": true }, { "type": "boolean", "default": false, "name": "deployed", "in": "query" }, { "type": "boolean", "default": false, "name": "uninstalled", "in": "query" }, { "type": "boolean", "default": false, "name": "failed", "in": "query" }, { "type": "boolean", "default": false, "name": "pending", "in": "query" }, { "type": "boolean", "default": false, "name": "uninstalling", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/listResponse" }, "204": { "description": "No releases found" }, "400": { "$ref": "#/responses/listResponse" }, "404": { "$ref": "#/responses/listResponse" }, "500": { "$ref": "#/responses/listResponse" } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "release" ], "summary": "Install helm release at the specified cluster and namespace", "operationId": "installOperation", "parameters": [ { "type": "string", "format": "string", "default": "minikube", "name": "cluster", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "default", "name": "namespace", "in": "path", "required": true }, { "name": "Body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/installRequestBody" } } ], "responses": { "200": { "$ref": "#/responses/installResponse" }, "400": { "description": "Invalid request" }, "409": { "description": "", "schema": { "$ref": "#/definitions/installResponseErrorBody" } }, "500": { "$ref": "#/responses/installResponse" } } } }, "/clusters/{cluster}/namespaces/{namespace}/releases/{release_name}": { "get": { "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "release" ], "summary": "List the helm releases for the cluster", "operationId": "statusOperation", "parameters": [ { "type": "string", "format": "string", "default": "minikube", "name": "cluster", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "default", "name": "namespace", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "mysql", "name": "release_name", "in": "path", "required": true }, { "type": "number", "name": "revision", "in": "query" } ], "responses": { "200": { "description": "", "schema": { "$ref": "#/definitions/statusOkResponse" } }, "400": { "description": "", "schema": { "$ref": "#/definitions/statusErrorResponse" } }, "404": { "description": "Release not found" }, "500": { "description": "", "schema": { "$ref": "#/definitions/statusErrorResponse" } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "release" ], "summary": "Upgrade a helm release deployed at the specified cluster and namespace", "operationId": "upgradeOperation", "parameters": [ { "type": "string", "format": "string", "default": "minikube", "name": "cluster", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "default", "name": "namespace", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "mysql-final", "name": "release_name", "in": "path", "required": true }, { "name": "Body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/upgradeRequestBody" } } ], "responses": { "200": { "$ref": "#/responses/upgradeResponse" }, "400": { "description": "Invalid request" }, "500": { "$ref": "#/responses/upgradeResponse" } } }, "delete": { "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "release" ], "summary": "Uninstall a helm release", "operationId": "uninstallOperation", "parameters": [ { "type": "string", "format": "string", "default": "minikube", "name": "cluster", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "default", "name": "namespace", "in": "path", "required": true }, { "type": "string", "format": "string", "default": "mysql-final", "name": "release_name", "in": "path", "required": true }, { "type": "boolean", "default": false, "name": "dry_run", "in": "query" }, { "type": "boolean", "default": false, "name": "keep_history", "in": "query" }, { "type": "boolean", "default": false, "name": "disable_hooks", "in": "query" }, { "type": "integer", "default": 300, "name": "timeout", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/uninstallResponse" }, "400": { "description": "", "schema": { "$ref": "#/definitions/uninstallErrorResponse" } }, "404": { "description": "", "schema": { "$ref": "#/definitions/uninstallErrorResponse" } }, "500": { "$ref": "#/responses/uninstallResponse" } } } }, "/clusters/{cluster}/releases": { "get": { "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "release" ], "summary": "List the helm releases for the cluster", "operationId": "listOperation", "parameters": [ { "type": "string", "format": "string", "default": "minikube", "name": "cluster", "in": "path", "required": true }, { "type": "boolean", "default": false, "name": "deployed", "in": "query" }, { "type": "boolean", "default": false, "name": "uninstalled", "in": "query" }, { "type": "boolean", "default": false, "name": "failed", "in": "query" }, { "type": "boolean", "default": false, "name": "pending", "in": "query" }, { "type": "boolean", "default": false, "name": "uninstalling", "in": "query" } ], "responses": { "200": { "$ref": "#/responses/listResponse" }, "204": { "description": "No releases found" }, "400": { "description": "", "schema": { "$ref": "#/definitions/listErrorResponse" } }, "500": { "description": "", "schema": { "$ref": "#/definitions/listErrorResponse" } } } } }, "/repositories/{repository_name}": { "put": { "description": "The endpoint is idempotent and a repository can be updated by using the force_update parameter to true", "produces": [ "application/json" ], "schemes": [ "http" ], "tags": [ "repository" ], "summary": "Add/Update a chart repository to the server.", "operationId": "addOperation", "parameters": [ { "type": "string", "format": "string", "name": "repository_name", "in": "path", "required": true }, { "name": "Body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/addRepoRequestBody" } } ], "responses": { "200": { "description": "The repository was added successfully", "schema": { "$ref": "#/definitions/addRepoEntry" } }, "400": { "description": "Invalid Request", "schema": { "$ref": "#/definitions/addRepoErrorResponseBody" } }, "500": { "description": "Something went with the server", "schema": { "$ref": "#/definitions/addRepoErrorResponseBody" } } } } } }, "definitions": { "Request": { "type": "object", "properties": { "AllNamespaces": { "type": "boolean" }, "Deployed": { "type": "boolean" }, "Failed": { "type": "boolean" }, "Pending": { "type": "boolean" }, "Uninstalled": { "type": "boolean" }, "Uninstalling": { "type": "boolean" }, "kube_apiserver": { "type": "string", "x-go-name": "KubeAPIServer" }, "kube_token": { "type": "string", "x-go-name": "KubeToken" } }, "x-go-package": "github.com/gojekfarm/albatross/api/list" }, "Response": { "type": "object", "title": "Response represents the api response for upgrade request.", "properties": { "data": { "type": "string", "x-go-name": "Data" }, "error": { "description": "Error field is available only when the response status code is non 2xx", "type": "string", "x-go-name": "Error" }, "status": { "type": "string", "x-go-name": "Status", "example": "deployed" } }, "x-go-package": "github.com/gojekfarm/albatross/api/upgrade" }, "addRepoEntry": { "description": "Entry contains metadata about a helm repository entry object", "type": "object", "properties": { "name": { "type": "string", "x-go-name": "Name" }, "password": { "type": "string", "x-go-name": "Password" }, "url": { "type": "string", "x-go-name": "URL" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-name": "Entry", "x-go-package": "github.com/gojekfarm/albatross/api/repository" }, "addRepoErrorResponseBody": { "description": "AddErrorResponse body of non 2xx response", "type": "object", "properties": { "error": { "type": "string", "x-go-name": "Error" } }, "x-go-name": "AddErrorResponse", "x-go-package": "github.com/gojekfarm/albatross/api/repository" }, "addRepoRequestBody": { "description": "AddRequest is the body for PUT request to repository", "type": "object", "properties": { "force_update": { "type": "boolean", "x-go-name": "ForceUpdate", "example": false }, "password": { "type": "string", "x-go-name": "Password" }, "skip_tls_verify": { "type": "boolean", "x-go-name": "InsecureSkipTLSverify", "example": false }, "url": { "type": "string", "x-go-name": "URL" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-name": "AddRequest", "x-go-package": "github.com/gojekfarm/albatross/api/repository" }, "globalFlags": { "description": "GlobalFlags flags which give context about kubernetes cluster to connect to", "type": "object", "properties": { "kube_apiserver": { "type": "string", "x-go-name": "KubeAPIServer" }, "kube_token": { "type": "string", "x-go-name": "KubeToken" } }, "x-go-name": "GlobalFlags", "x-go-package": "github.com/gojekfarm/albatross/pkg/helmcli/flags" }, "installFlags": { "description": "Flags additional flags for installing a release", "type": "object", "properties": { "dry_run": { "type": "boolean", "x-go-name": "DryRun", "example": false }, "kube_apiserver": { "type": "string", "x-go-name": "KubeAPIServer" }, "kube_token": { "type": "string", "x-go-name": "KubeToken" }, "version": { "type": "string", "x-go-name": "Version", "example": "1" } }, "x-go-name": "Flags", "x-go-package": "github.com/gojekfarm/albatross/api/install" }, "installRelease": { "description": "Release wrapper for helm release", "type": "object", "properties": { "app_version": { "type": "string", "x-go-name": "AppVersion", "example": "5.7.30" }, "chart": { "type": "string", "x-go-name": "Chart", "example": "mysql" }, "name": { "type": "string", "x-go-name": "Name", "example": "mysql-5.7" }, "namespace": { "type": "string", "x-go-name": "Namespace", "example": "default" }, "status": { "x-go-name": "Status", "example": "deployed" }, "updated_at": { "x-go-name": "Updated", "example": "2021-03-24T12:24:18.450869+05:30" }, "version": { "type": "integer", "format": "int64", "x-go-name": "Version", "example": 1 } }, "x-go-name": "Release", "x-go-package": "github.com/gojekfarm/albatross/api/install" }, "installRequestBody": { "description": "Request is the body for installing a release", "type": "object", "properties": { "chart": { "type": "string", "x-go-name": "Chart", "example": "stable/mysql" }, "flags": { "$ref": "#/definitions/installFlags" }, "name": { "type": "string", "x-go-name": "Name" }, "values": { "type": "object", "additionalProperties": { "type": "object" }, "x-go-name": "Values", "example": { "replicaCount": 1 } } }, "x-go-name": "Request", "x-go-package": "github.com/gojekfarm/albatross/api/install" }, "installResponseBody": { "description": "Response body of install response", "type": "object", "properties": { "data": { "type": "string", "x-go-name": "Data" }, "error": { "description": "Error error message, field is available only when status code is non 2xx", "type": "string", "x-go-name": "Error" }, "status": { "type": "string", "x-go-name": "Status", "example": "deployed" } }, "x-go-name": "Response", "x-go-package": "github.com/gojekfarm/albatross/api/install" }, "installResponseErrorBody": { "description": "InstallErrorResponse body of install response", "type": "object", "properties": { "error": { "type": "string", "x-go-name": "Error" } }, "x-go-name": "InstallErrorResponse", "x-go-package": "github.com/gojekfarm/albatross/swagger" }, "listErrorResponse": { "description": "ListErrorResponse stub for swagger route for List", "type": "object", "properties": { "Body": { "$ref": "#/definitions/listReponseBody" } }, "x-go-name": "ListErrorResponse", "x-go-package": "github.com/gojekfarm/albatross/swagger" }, "listRelease": { "description": "Release wraps a helm release", "type": "object", "properties": { "app_version": { "type": "string", "x-go-name": "AppVersion", "example": "5.7.30" }, "chart": { "type": "string", "x-go-name": "Chart", "example": "mysql" }, "name": { "type": "string", "x-go-name": "Name", "example": "mysql-5.7" }, "namespace": { "type": "string", "x-go-name": "Namespace", "example": "default" }, "status": { "x-go-name": "Status", "example": "deployed" }, "updated_at": { "x-go-name": "Updated", "example": "2021-03-24T12:24:18.450869+05:30" }, "version": { "type": "integer", "format": "int64", "x-go-name": "Version", "example": 1 } }, "x-go-name": "Release", "x-go-package": "github.com/gojekfarm/albatross/api/list" }, "listReponseBody": { "description": "Response is the body of /list", "type": "object", "properties": { "error": { "description": "Error field is available only when the response status code is non 2xx", "type": "string", "x-go-name": "Error" }, "releases": { "type": "array", "items": { "$ref": "#/definitions/listRelease" }, "x-go-name": "Releases" } }, "x-go-name": "Response", "x-go-package": "github.com/gojekfarm/albatross/api/list" }, "statusErrorResponse": { "description": "ErrorResponse is the body of /list", "type": "object", "properties": { "error": { "type": "string", "x-go-name": "Error" } }, "x-go-name": "ErrorResponse", "x-go-package": "github.com/gojekfarm/albatross/api/status" }, "statusOkResponse": { "description": "Release is the response of a successful status request", "type": "object", "properties": { "app_version": { "type": "string", "x-go-name": "AppVersion", "example": "5.7.30" }, "chart": { "type": "string", "x-go-name": "Chart", "example": "mysql" }, "name": { "type": "string", "x-go-name": "Name", "example": "mysql-5.7" }, "namespace": { "type": "string", "x-go-name": "Namespace", "example": "default" }, "status": { "x-go-name": "Status", "example": "deployed" }, "updated_at": { "x-go-name": "Updated", "example": "2021-03-24T12:24:18.450869+05:30" }, "version": { "type": "integer", "format": "int64", "x-go-name": "Version", "example": 1 } }, "x-go-name": "Release", "x-go-package": "github.com/gojekfarm/albatross/api/status" }, "uninstallErrorResponse": { "description": "UninstallErrorResponse error body for uninstall action", "type": "object", "properties": { "error": { "type": "string", "x-go-name": "Error" } }, "x-go-name": "UninstallErrorResponse", "x-go-package": "github.com/gojekfarm/albatross/swagger" }, "uninstallRelease": { "description": "Release contains metadata about a helm release object", "type": "object", "properties": { "app_version": { "type": "string", "x-go-name": "AppVersion", "example": "5.7.30" }, "chart": { "type": "string", "x-go-name": "Chart", "example": "mysql" }, "name": { "type": "string", "x-go-name": "Name", "example": "mysql-5.7" }, "namespace": { "type": "string", "x-go-name": "Namespace", "example": "default" }, "status": { "x-go-name": "Status", "example": "deployed" }, "updated_at": { "x-go-name": "Updated", "example": "2021-03-24T12:24:18.450869+05:30" }, "version": { "type": "integer", "format": "int64", "x-go-name": "Version", "example": 1 } }, "x-go-name": "Release", "x-go-package": "github.com/gojekfarm/albatross/api/uninstall" }, "uninstallResponseBody": { "description": "Response is the body of uninstall route", "type": "object", "properties": { "error": { "description": "Error error message, field is available only when status code is non 2xx", "type": "string", "x-go-name": "Error" }, "release": { "$ref": "#/definitions/uninstallRelease" }, "status": { "description": "Status status of the release, field is available only when status code is 2xx", "type": "string", "x-go-name": "Status", "example": "uninstalled" } }, "x-go-name": "Response", "x-go-package": "github.com/gojekfarm/albatross/api/uninstall" }, "upgradeFlags": { "description": "Flags additional flags supported while upgrading a release", "type": "object", "properties": { "dry_run": { "type": "boolean", "x-go-name": "DryRun", "example": false }, "install": { "type": "boolean", "x-go-name": "Install", "example": true }, "kube_apiserver": { "type": "string", "x-go-name": "KubeAPIServer" }, "kube_token": { "type": "string", "x-go-name": "KubeToken" }, "version": { "type": "string", "x-go-name": "Version", "example": "1" } }, "x-go-name": "Flags", "x-go-package": "github.com/gojekfarm/albatross/api/upgrade" }, "upgradeReleaseBody": { "description": "Release wrapper for helm release", "type": "object", "properties": { "app_version": { "type": "string", "x-go-name": "AppVersion", "example": "5.7.30" }, "chart": { "type": "string", "x-go-name": "Chart", "example": "mysql" }, "name": { "type": "string", "x-go-name": "Name", "example": "mysql-5.7" }, "namespace": { "type": "string", "x-go-name": "Namespace", "example": "default" }, "status": { "x-go-name": "Status", "example": "deployed" }, "updated_at": { "x-go-name": "Updated", "example": "2021-03-24T12:24:18.450869+05:30" }, "version": { "type": "integer", "format": "int64", "x-go-name": "Version", "example": 2 } }, "x-go-name": "Release", "x-go-package": "github.com/gojekfarm/albatross/api/upgrade" }, "upgradeRequestBody": { "description": "Request is the body for upgrading a release", "type": "object", "properties": { "chart": { "type": "string", "x-go-name": "Chart", "example": "stable/mysql" }, "flags": { "$ref": "#/definitions/upgradeFlags" }, "values": { "type": "object", "additionalProperties": { "type": "object" }, "x-go-name": "Values", "example": { "replicaCount": 1 } } }, "x-go-name": "Request", "x-go-package": "github.com/gojekfarm/albatross/api/upgrade" } }, "responses": { "installResponse": { "description": "InstallResponse response from an install request", "schema": { "$ref": "#/definitions/installResponseBody" } }, "listResponse": { "description": "ListResponse stub for swagger route for List", "schema": { "$ref": "#/definitions/listReponseBody" } }, "uninstallResponse": { "description": "UninstallResponse stub for swagger route for uninstall", "schema": { "$ref": "#/definitions/uninstallResponseBody" } }, "upgradeResponse": { "description": "UpgradeResponse response from an upgrade request", "schema": { "$ref": "#/definitions/Response" } } } }