[release] v0.22.14

This commit is contained in:
Yann Stepienik
2026-05-06 11:30:44 +01:00
parent 8c2cdd9090
commit 992466fea5
9 changed files with 2054 additions and 305 deletions
+344 -1
View File
@@ -4,7 +4,7 @@
"description": "REST API for Cosmos Cloud server management",
"title": "Cosmos Server API",
"contact": {},
"version": "0.22.13"
"version": "0.22.14"
},
"paths": {
"/_logs": {
@@ -2196,6 +2196,305 @@
}
}
},
"/api/constellation/deployments": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns all deployment definitions from the constellation-deployments KV (Pro feature)",
"tags": [
"deployments"
],
"summary": "List all cluster deployments",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new deployment definition in the constellation-deployments KV (Pro feature)",
"tags": [
"deployments"
],
"summary": "Create a new cluster deployment",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/pro.Deployment"
}
}
},
"description": "Deployment definition",
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
}
},
"/api/constellation/deployments/{name}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single deployment definition (Pro feature)",
"tags": [
"deployments"
],
"summary": "Get a cluster deployment by name",
"parameters": [
{
"description": "Deployment name",
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing deployment definition (Pro feature)",
"tags": [
"deployments"
],
"summary": "Update a cluster deployment",
"parameters": [
{
"description": "Deployment name",
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/pro.Deployment"
}
}
},
"description": "Updated deployment",
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Removes a deployment from the constellation-deployments KV (Pro feature)",
"tags": [
"deployments"
],
"summary": "Delete a cluster deployment",
"parameters": [
{
"description": "Deployment name",
"name": "name",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.APIResponse"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/utils.HTTPErrorResult"
}
}
}
}
}
}
},
"/api/constellation/devices": {
"get": {
"security": [
@@ -11413,6 +11712,50 @@
}
}
},
"pro.Deployment": {
"type": "object",
"required": [
"compose",
"name",
"replicas"
],
"properties": {
"compose": {
"$ref": "#/components/schemas/docker.DockerServiceCreateRequest"
},
"name": {
"type": "string",
"maxLength": 64,
"minLength": 3
},
"replicas": {
"type": "integer",
"minimum": 1
},
"storage": {
"description": "Storage lists RCLONE remote names this deployment depends on. Checked\nnode-side in executeApply before docker.CreateService runs — a missing\nremote produces StatusFail and flows through the existing fail-streak\nquarantine path. Not a placement filter: RCLONE config is cluster-synced\nvia constellation, so every eligible node has the same remote set.\n${storage.NAME} in compose fields resolves to the mount path on apply.",
"type": "array",
"items": {
"type": "string"
}
},
"strategy": {
"description": "Strategy selects which PlacementStrategy the scheduler uses for this\ndeployment. Empty is treated as \"round-robin\" for back-compat with\nKV entries written before this field existed.",
"type": "string",
"enum": [
"round-robin",
"least-busy"
]
},
"tags": {
"description": "Tags filter eligible placement nodes. A deployment with Tags=[\"gpu\"]\nwill only land on nodes whose ConstellationDevice.Tags contains \"gpu\".\nMultiple tags are AND'd: [\"gpu\",\"nvme\"] requires both. Empty means no\nfilter — any node is eligible.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"pro.UpdateGroupRequest": {
"type": "object",
"properties": {
+289 -1
View File
@@ -4,7 +4,7 @@
"description": "REST API for Cosmos Cloud server management",
"title": "Cosmos Server API",
"contact": {},
"version": "0.22.13"
"version": "0.22.14"
},
"basePath": "/cosmos",
"paths": {
@@ -1812,6 +1812,250 @@
}
}
},
"/api/constellation/deployments": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns all deployment definitions from the constellation-deployments KV (Pro feature)",
"produces": [
"application/json"
],
"tags": [
"deployments"
],
"summary": "List all cluster deployments",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/utils.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
}
}
},
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Creates a new deployment definition in the constellation-deployments KV (Pro feature)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"deployments"
],
"summary": "Create a new cluster deployment",
"parameters": [
{
"description": "Deployment definition",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pro.Deployment"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/utils.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
}
}
}
},
"/api/constellation/deployments/{name}": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "Returns a single deployment definition (Pro feature)",
"produces": [
"application/json"
],
"tags": [
"deployments"
],
"summary": "Get a cluster deployment by name",
"parameters": [
{
"type": "string",
"description": "Deployment name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/utils.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
}
}
},
"put": {
"security": [
{
"BearerAuth": []
}
],
"description": "Updates an existing deployment definition (Pro feature)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"deployments"
],
"summary": "Update a cluster deployment",
"parameters": [
{
"type": "string",
"description": "Deployment name",
"name": "name",
"in": "path",
"required": true
},
{
"description": "Updated deployment",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/pro.Deployment"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/utils.APIResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "Removes a deployment from the constellation-deployments KV (Pro feature)",
"produces": [
"application/json"
],
"tags": [
"deployments"
],
"summary": "Delete a cluster deployment",
"parameters": [
{
"type": "string",
"description": "Deployment name",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/utils.APIResponse"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/utils.HTTPErrorResult"
}
}
}
}
},
"/api/constellation/devices": {
"get": {
"security": [
@@ -9660,6 +9904,50 @@
}
}
},
"pro.Deployment": {
"type": "object",
"required": [
"compose",
"name",
"replicas"
],
"properties": {
"compose": {
"$ref": "#/definitions/docker.DockerServiceCreateRequest"
},
"name": {
"type": "string",
"maxLength": 64,
"minLength": 3
},
"replicas": {
"type": "integer",
"minimum": 1
},
"storage": {
"description": "Storage lists RCLONE remote names this deployment depends on. Checked\nnode-side in executeApply before docker.CreateService runs — a missing\nremote produces StatusFail and flows through the existing fail-streak\nquarantine path. Not a placement filter: RCLONE config is cluster-synced\nvia constellation, so every eligible node has the same remote set.\n${storage.NAME} in compose fields resolves to the mount path on apply.",
"type": "array",
"items": {
"type": "string"
}
},
"strategy": {
"description": "Strategy selects which PlacementStrategy the scheduler uses for this\ndeployment. Empty is treated as \"round-robin\" for back-compat with\nKV entries written before this field existed.",
"type": "string",
"enum": [
"round-robin",
"least-busy"
]
},
"tags": {
"description": "Tags filter eligible placement nodes. A deployment with Tags=[\"gpu\"]\nwill only land on nodes whose ConstellationDevice.Tags contains \"gpu\".\nMultiple tags are AND'd: [\"gpu\",\"nvme\"] requires both. Empty means no\nfilter — any node is eligible.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"pro.UpdateGroupRequest": {
"type": "object",
"properties": {
+204 -1
View File
@@ -1049,6 +1049,51 @@ definitions:
required:
- name
type: object
pro.Deployment:
properties:
compose:
$ref: '#/definitions/docker.DockerServiceCreateRequest'
name:
maxLength: 64
minLength: 3
type: string
replicas:
minimum: 1
type: integer
storage:
description: |-
Storage lists RCLONE remote names this deployment depends on. Checked
node-side in executeApply before docker.CreateService runs — a missing
remote produces StatusFail and flows through the existing fail-streak
quarantine path. Not a placement filter: RCLONE config is cluster-synced
via constellation, so every eligible node has the same remote set.
${storage.NAME} in compose fields resolves to the mount path on apply.
items:
type: string
type: array
strategy:
description: |-
Strategy selects which PlacementStrategy the scheduler uses for this
deployment. Empty is treated as "round-robin" for back-compat with
KV entries written before this field existed.
enum:
- round-robin
- least-busy
type: string
tags:
description: |-
Tags filter eligible placement nodes. A deployment with Tags=["gpu"]
will only land on nodes whose ConstellationDevice.Tags contains "gpu".
Multiple tags are AND'd: ["gpu","nvme"] requires both. Empty means no
filter — any node is eligible.
items:
type: string
type: array
required:
- compose
- name
- replicas
type: object
pro.UpdateGroupRequest:
properties:
name:
@@ -2012,7 +2057,7 @@ info:
contact: {}
description: REST API for Cosmos Cloud server management
title: Cosmos Server API
version: 0.22.13
version: 0.22.14
paths:
/_logs:
get:
@@ -3165,6 +3210,164 @@ paths:
summary: Create a new Constellation VPN network
tags:
- constellation
/api/constellation/deployments:
get:
description: Returns all deployment definitions from the constellation-deployments
KV (Pro feature)
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/utils.APIResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"403":
description: Forbidden
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
security:
- BearerAuth: []
summary: List all cluster deployments
tags:
- deployments
post:
consumes:
- application/json
description: Creates a new deployment definition in the constellation-deployments
KV (Pro feature)
parameters:
- description: Deployment definition
in: body
name: body
required: true
schema:
$ref: '#/definitions/pro.Deployment'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/utils.APIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"409":
description: Conflict
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
security:
- BearerAuth: []
summary: Create a new cluster deployment
tags:
- deployments
/api/constellation/deployments/{name}:
delete:
description: Removes a deployment from the constellation-deployments KV (Pro
feature)
parameters:
- description: Deployment name
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/utils.APIResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"404":
description: Not Found
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
security:
- BearerAuth: []
summary: Delete a cluster deployment
tags:
- deployments
get:
description: Returns a single deployment definition (Pro feature)
parameters:
- description: Deployment name
in: path
name: name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/utils.APIResponse'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"404":
description: Not Found
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
security:
- BearerAuth: []
summary: Get a cluster deployment by name
tags:
- deployments
put:
consumes:
- application/json
description: Updates an existing deployment definition (Pro feature)
parameters:
- description: Deployment name
in: path
name: name
required: true
type: string
- description: Updated deployment
in: body
name: body
required: true
schema:
$ref: '#/definitions/pro.Deployment'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/utils.APIResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
"404":
description: Not Found
schema:
$ref: '#/definitions/utils.HTTPErrorResult'
security:
- BearerAuth: []
summary: Update a cluster deployment
tags:
- deployments
/api/constellation/devices:
get:
produces:
+3
View File
@@ -1,3 +1,6 @@
## Version 0.22.14
- added missing deployments function in the SDK
## Version 0.22.13
- Add licence to new install SDK function
+1101 -293
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,4 +1,4 @@
package cosmossdk
// Version is the SDK version, synced with Cosmos Server at build time.
const Version = "0.22.13"
const Version = "0.22.14"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "cosmos-server",
"version": "0.22.13",
"version": "0.22.14",
"description": "",
"main": "test-server.js",
"bugs": {
+1 -1
View File
@@ -202,7 +202,7 @@ func main() {
}
// @title Cosmos Server API
// @version 0.22.13
// @version 0.22.14
// @description REST API for Cosmos Cloud server management
// @BasePath /cosmos
// @securityDefinitions.apikey BearerAuth
+110 -6
View File
@@ -9,15 +9,30 @@ import (
"github.com/nats-io/nats.go"
)
type Deployment struct {
Name string `json:"name" validate:"required,min=3,max=64,alphanum"`
Replicas int `json:"replicas" validate:"required,min=1"`
Strategy string `json:"strategy" validate:"omitempty,oneof=round-robin least-busy"`
Tags []string `json:"tags,omitempty" validate:"omitempty,dive,min=1,max=64"`
Storage []string `json:"storage,omitempty" validate:"omitempty,dive,min=1,max=64"`
Compose docker.DockerServiceCreateRequest `json:"compose" validate:"required"`
Name string `json:"name" validate:"required,min=3,max=64,alphanum"`
Replicas int `json:"replicas" validate:"required,min=1"`
// Strategy selects which PlacementStrategy the scheduler uses for this
// deployment. Empty is treated as "round-robin" for back-compat with
// KV entries written before this field existed.
Strategy string `json:"strategy" validate:"omitempty,oneof=round-robin least-busy"`
// Tags filter eligible placement nodes. A deployment with Tags=["gpu"]
// will only land on nodes whose ConstellationDevice.Tags contains "gpu".
// Multiple tags are AND'd: ["gpu","nvme"] requires both. Empty means no
// filter — any node is eligible.
Tags []string `json:"tags,omitempty" validate:"omitempty,dive,min=1,max=64"`
// Storage lists RCLONE remote names this deployment depends on. Checked
// node-side in executeApply before docker.CreateService runs — a missing
// remote produces StatusFail and flows through the existing fail-streak
// quarantine path. Not a placement filter: RCLONE config is cluster-synced
// via constellation, so every eligible node has the same remote set.
// ${storage.NAME} in compose fields resolves to the mount path on apply.
Storage []string `json:"storage,omitempty" validate:"omitempty,dive,min=1,max=64"`
Compose docker.DockerServiceCreateRequest `json:"compose" validate:"required"`
}
func DeploymentsRoute(w http.ResponseWriter, req *http.Request, lock *sync.RWMutex, js nats.JetStreamContext) {
utils.Error("This is a pro and is not currently available on your server. Please upgrade to Cosmos Pro to access this feature.", nil)
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
@@ -29,3 +44,92 @@ func DeploymentsIdRoute(w http.ResponseWriter, req *http.Request, lock *sync.RWM
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
return
}
// listDeployments godoc
// @Summary List all cluster deployments
// @Description Returns all deployment definitions from the constellation-deployments KV (Pro feature)
// @Tags deployments
// @Produce json
// @Security BearerAuth
// @Success 200 {object} utils.APIResponse
// @Failure 401 {object} utils.HTTPErrorResult
// @Failure 403 {object} utils.HTTPErrorResult
// @Router /api/constellation/deployments [get]
func listDeployments(w http.ResponseWriter, req *http.Request, lock *sync.RWMutex, js nats.JetStreamContext) {
utils.Error("This is a pro and is not currently available on your server. Please upgrade to Cosmos Pro to access this feature.", nil)
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
return
}
// createDeployment godoc
// @Summary Create a new cluster deployment
// @Description Creates a new deployment definition in the constellation-deployments KV (Pro feature)
// @Tags deployments
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param body body Deployment true "Deployment definition"
// @Success 200 {object} utils.APIResponse
// @Failure 400 {object} utils.HTTPErrorResult
// @Failure 401 {object} utils.HTTPErrorResult
// @Failure 409 {object} utils.HTTPErrorResult
// @Router /api/constellation/deployments [post]
func createDeployment(w http.ResponseWriter, req *http.Request, lock *sync.RWMutex, js nats.JetStreamContext) {
utils.Error("This is a pro and is not currently available on your server. Please upgrade to Cosmos Pro to access this feature.", nil)
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
return
}
// getDeployment godoc
// @Summary Get a cluster deployment by name
// @Description Returns a single deployment definition (Pro feature)
// @Tags deployments
// @Produce json
// @Security BearerAuth
// @Param name path string true "Deployment name"
// @Success 200 {object} utils.APIResponse
// @Failure 401 {object} utils.HTTPErrorResult
// @Failure 404 {object} utils.HTTPErrorResult
// @Router /api/constellation/deployments/{name} [get]
func getDeployment(w http.ResponseWriter, req *http.Request, lock *sync.RWMutex, js nats.JetStreamContext) {
utils.Error("This is a pro and is not currently available on your server. Please upgrade to Cosmos Pro to access this feature.", nil)
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
return
}
// updateDeployment godoc
// @Summary Update a cluster deployment
// @Description Updates an existing deployment definition (Pro feature)
// @Tags deployments
// @Accept json
// @Produce json
// @Security BearerAuth
// @Param name path string true "Deployment name"
// @Param body body Deployment true "Updated deployment"
// @Success 200 {object} utils.APIResponse
// @Failure 400 {object} utils.HTTPErrorResult
// @Failure 401 {object} utils.HTTPErrorResult
// @Failure 404 {object} utils.HTTPErrorResult
// @Router /api/constellation/deployments/{name} [put]
func updateDeployment(w http.ResponseWriter, req *http.Request, lock *sync.RWMutex, js nats.JetStreamContext) {
utils.Error("This is a pro and is not currently available on your server. Please upgrade to Cosmos Pro to access this feature.", nil)
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
return
}
// deleteDeployment godoc
// @Summary Delete a cluster deployment
// @Description Removes a deployment from the constellation-deployments KV (Pro feature)
// @Tags deployments
// @Produce json
// @Security BearerAuth
// @Param name path string true "Deployment name"
// @Success 200 {object} utils.APIResponse
// @Failure 401 {object} utils.HTTPErrorResult
// @Failure 404 {object} utils.HTTPErrorResult
// @Router /api/constellation/deployments/{name} [delete]
func deleteDeployment(w http.ResponseWriter, req *http.Request, lock *sync.RWMutex, js nats.JetStreamContext) {
utils.Error("This is a pro and is not currently available on your server. Please upgrade to Cosmos Pro to access this feature.", nil)
utils.HTTPError(w, "This feature is only available in Cosmos Pro", http.StatusForbidden, "PRO001")
return
}