From b74ce058456baf08e29ddf2a2d8ed6a88e41fa69 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 18 Nov 2024 19:43:52 +0100 Subject: [PATCH] fix(interfaces): Remove deprecated deployment directive and update related interfaces --- changelog.md | 8 ++++++++ ts/00_commitinfo_data.ts | 2 +- ts_interfaces/data/deployment.ts | 2 +- ts_interfaces/data/deploymentdirective.ts | 19 ------------------- ts_interfaces/data/index.ts | 1 - ts_interfaces/data/service.ts | 1 - ts_interfaces/requests/config.ts | 5 ++--- ts_interfaces/requests/image.ts | 1 + ts_web/00_commitinfo_data.ts | 2 +- 9 files changed, 14 insertions(+), 27 deletions(-) delete mode 100644 ts_interfaces/data/deploymentdirective.ts diff --git a/changelog.md b/changelog.md index 2b64afb..855ed5b 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,13 @@ # Changelog +## 2024-11-18 - 4.3.21 - fix(interfaces) +Remove deprecated deployment directive and update related interfaces + +- Removed IDeploymentDirective from data and requests. +- Updated IDeployment to remove references to directives. +- Changed IRequest_Any_Cloudly_GetClusterConfig to return services instead of deployment directives. +- Removed deploymentDirectiveIds from IService data structure. + ## 2024-11-18 - 4.3.20 - fix(apiclient) Ensure mandatory parameter in CloudlyApiClient constructor diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 535dc46..0035cd1 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/cloudly', - version: '4.3.20', + version: '4.3.21', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' } diff --git a/ts_interfaces/data/deployment.ts b/ts_interfaces/data/deployment.ts index 2dd87e4..d665e15 100644 --- a/ts_interfaces/data/deployment.ts +++ b/ts_interfaces/data/deployment.ts @@ -1,7 +1,7 @@ import * as plugins from '../plugins.js'; /** - * results from a DeploymentDirective + * a deployment happens when a service is deployed * tracks the status of a deployment */ export interface IDeployment { diff --git a/ts_interfaces/data/deploymentdirective.ts b/ts_interfaces/data/deploymentdirective.ts deleted file mode 100644 index a9dfd00..0000000 --- a/ts_interfaces/data/deploymentdirective.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { IServiceRessources } from "./docker.js"; - -/** - * used for tellilng a cluster about a disired deployment - * and specifies its configuration - */ -export interface IDeploymentDirective { - id: string; - name: string; - imageClaim: string; - /** - * ports to be exposed - * hostPort is the port on the host - * containerPort is the port on the container - */ - ports: { hostPort: number; containerPort: number }[]; - environment: { [key: string]: string }; - resources?: IServiceRessources; -} \ No newline at end of file diff --git a/ts_interfaces/data/index.ts b/ts_interfaces/data/index.ts index 15ef9b6..629f54b 100644 --- a/ts_interfaces/data/index.ts +++ b/ts_interfaces/data/index.ts @@ -2,7 +2,6 @@ export * from './cloudlyconfig.js'; export * from './cluster.js'; export * from './config.js'; export * from './deployment.js'; -export * from './deploymentdirective.js'; export * from './docker.js'; export * from './env.js'; export * from './event.js'; diff --git a/ts_interfaces/data/service.ts b/ts_interfaces/data/service.ts index 3684db6..fc7c024 100644 --- a/ts_interfaces/data/service.ts +++ b/ts_interfaces/data/service.ts @@ -21,6 +21,5 @@ export interface IService { protocol?: 'http' | 'https' | 'ssh'; }[]; deploymentIds: string[]; - deploymentDirectiveIds: string[]; }; } diff --git a/ts_interfaces/requests/config.ts b/ts_interfaces/requests/config.ts index 8428787..b53a831 100644 --- a/ts_interfaces/requests/config.ts +++ b/ts_interfaces/requests/config.ts @@ -3,7 +3,6 @@ import * as clusterInterfaces from '../data/cluster.js'; import * as serverInterfaces from '../data/server.js'; import * as userInterfaces from '../data/user.js'; import type { IService } from '../data/service.js'; -import type { IDeploymentDirective } from '../data/deploymentdirective.js'; export interface IRequest_Any_Cloudly_GetServerConfig extends plugins.typedrequestInterfaces.implementsTR< @@ -31,7 +30,7 @@ extends plugins.typedrequestInterfaces.implementsTR< }; response: { configData: clusterInterfaces.ICluster; - deploymentDirectives: IDeploymentDirective[]; + services: IService[]; }; } @@ -43,7 +42,7 @@ extends plugins.typedrequestInterfaces.implementsTR< method: 'pushClusterConfig'; request: { configData: clusterInterfaces.ICluster; - deploymentDirectives: IDeploymentDirective[]; + services: IService[]; }; response: {}; } diff --git a/ts_interfaces/requests/image.ts b/ts_interfaces/requests/image.ts index 0e1538e..7da482c 100644 --- a/ts_interfaces/requests/image.ts +++ b/ts_interfaces/requests/image.ts @@ -18,6 +18,7 @@ export interface IRequest_GetAllImages extends plugins.typedrequestInterfaces.im /** * gets a single image + * authentication can happen via imageClaim or identity */ export interface IRequest_GetImage extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, diff --git a/ts_web/00_commitinfo_data.ts b/ts_web/00_commitinfo_data.ts index 535dc46..0035cd1 100644 --- a/ts_web/00_commitinfo_data.ts +++ b/ts_web/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/cloudly', - version: '4.3.20', + version: '4.3.21', description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.' }