Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
62ad1655d5 | |||
caf3a095f2 | |||
89e44b2e5f | |||
a617f51b19 | |||
355e04fd1d | |||
89bd767bea | |||
e567ebbf21 | |||
33311348e2 | |||
d6e914edab | |||
da7b866f23 | |||
7654d780b1 | |||
dbd9b661c6 |
41
changelog.md
41
changelog.md
@ -1,5 +1,46 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-12-30 - 4.11.0 - feat(external-registry)
|
||||
Introduce external registry management
|
||||
|
||||
- Added ExternalRegistryManager to handle external registry operations.
|
||||
- Implemented ability to create, retrieve, and delete external registries.
|
||||
- Enhanced Cloudly class to include ExternalRegistryManager.
|
||||
|
||||
## 2024-12-29 - 4.10.0 - feat(apiclient)
|
||||
Added support for managing external registries in the API client.
|
||||
|
||||
- Introduced methods to get a registry by ID, get all registries, and create a new registry in the externalRegistry object.
|
||||
- Updated external registry request interfaces to match new API client capabilities.
|
||||
|
||||
## 2024-12-29 - 4.9.0 - feat(apiclient)
|
||||
Add external registry management capabilities to Cloudly API client.
|
||||
|
||||
- Introduce ExternalRegistry class with methods for getting, creating, and updating external registries.
|
||||
- Expand requests module to handle external registry management, including creation and deletion.
|
||||
|
||||
## 2024-12-28 - 4.8.1 - fix(interfaces)
|
||||
Fix image location schema in IImage interface
|
||||
|
||||
- Refactored the 'external' object within IImage data to a 'location' object.
|
||||
- Added 'internal' boolean to 'location' to specify internal/external status.
|
||||
|
||||
## 2024-12-28 - 4.8.0 - feat(manager.registry)
|
||||
Add external registry management
|
||||
|
||||
- Introduced ExternalRegistry class for handling external registry configurations.
|
||||
- Updated IExternalRegistry interface to include registry details.
|
||||
- Enhanced IImage interface to support linking with external registries.
|
||||
|
||||
## 2024-12-28 - 4.7.1 - fix(secretmanagement)
|
||||
Refactor secret bundle actions and improve authorization handling
|
||||
|
||||
- Refactored secret bundle handling by renaming methods and reorganizing static and instance methods in SecretBundle class.
|
||||
- Added getSecretBundleByAuthorization method to SecretBundle.
|
||||
- Improved getFlatKeyValueObjectForEnvironment to accurately retrieve key-value pairs for specified environments.
|
||||
- Removed deprecated IEnvBundle interface and related request handler for better clarity and code usage.
|
||||
- Updated request interfaces related to secret bundles for consistent method naming and arguments.
|
||||
|
||||
## 2024-12-22 - 4.7.0 - feat(apiclient)
|
||||
Add method to flatten secret bundles into key-value objects.
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@serve.zone/cloudly",
|
||||
"version": "4.7.0",
|
||||
"version": "4.11.0",
|
||||
"private": false,
|
||||
"description": "A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.",
|
||||
"type": "module",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/cloudly',
|
||||
version: '4.7.0',
|
||||
version: '4.11.0',
|
||||
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import { CloudlyTaskmanager } from './manager.task/taskmanager.js';
|
||||
import { CloudlySecretManager } from './manager.secret/classes.secretmanager.js';
|
||||
import { CloudlyServerManager } from './manager.server/classes.servermanager.js';
|
||||
import { ExternalApiManager } from './manager.status/statusmanager.js';
|
||||
import { ExternalRegistryManager } from './manager.externalregistry/index.js';
|
||||
import { ImageManager } from './manager.image/classes.imagemanager.js';
|
||||
import { logger } from './logger.js';
|
||||
import { CloudlyAuthManager } from './manager.auth/classes.authmanager.js';
|
||||
@ -54,6 +55,7 @@ export class Cloudly {
|
||||
public clusterManager: ClusterManager;
|
||||
public coreflowManager: CloudlyCoreflowManager;
|
||||
public externalApiManager: ExternalApiManager;
|
||||
public externalRegistryManager: ExternalRegistryManager;
|
||||
public imageManager: ImageManager;
|
||||
public taskManager: CloudlyTaskmanager;
|
||||
public serverManager: CloudlyServerManager;
|
||||
@ -80,6 +82,7 @@ export class Cloudly {
|
||||
this.clusterManager = new ClusterManager(this);
|
||||
this.coreflowManager = new CloudlyCoreflowManager(this);
|
||||
this.externalApiManager = new ExternalApiManager(this);
|
||||
this.externalRegistryManager = new ExternalRegistryManager(this);
|
||||
this.imageManager = new ImageManager(this);
|
||||
this.taskManager = new CloudlyTaskmanager(this);
|
||||
this.secretManager = new CloudlySecretManager(this);
|
||||
|
@ -44,7 +44,7 @@ export class ClusterManager {
|
||||
);
|
||||
|
||||
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.cluster.IReq_Any_Cloudly_GetClusters>(
|
||||
new plugins.typedrequest.TypedHandler('getAllClusters', async (dataArg) => {
|
||||
new plugins.typedrequest.TypedHandler('getClusters', async (dataArg) => {
|
||||
// TODO: do authentication here
|
||||
const clusters = await this.getAllClusters();
|
||||
return {
|
||||
@ -57,11 +57,11 @@ export class ClusterManager {
|
||||
|
||||
// delete cluster
|
||||
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.cluster.IReq_Any_Cloudly_DeleteClusterById>(
|
||||
new plugins.typedrequest.TypedHandler('deleteCluster', async (reqDataArg, toolsArg) => {
|
||||
new plugins.typedrequest.TypedHandler('deleteClusterById', async (reqDataArg, toolsArg) => {
|
||||
await toolsArg.passGuards([this.cloudlyRef.authManager.adminIdentityGuard], reqDataArg);
|
||||
await this.deleteCluster(reqDataArg.clusterId);
|
||||
return {
|
||||
success: true,
|
||||
ok: true,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
40
ts/manager.externalregistry/classes.externalregistry.ts
Normal file
40
ts/manager.externalregistry/classes.externalregistry.ts
Normal file
@ -0,0 +1,40 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as paths from '../paths.js';
|
||||
import type { Cloudly } from 'ts/classes.cloudly.js';
|
||||
import type { ExternalRegistryManager } from './classes.externalregistrymanager.js';
|
||||
|
||||
export class ExternalRegistry extends plugins.smartdata.SmartDataDbDoc<ExternalRegistry, plugins.servezoneInterfaces.data.IExternalRegistry, ExternalRegistryManager> {
|
||||
// STATIC
|
||||
public static async getRegistryById(registryIdArg: string) {
|
||||
const externalRegistry = await this.getInstance({
|
||||
id: registryIdArg,
|
||||
});
|
||||
return externalRegistry;
|
||||
}
|
||||
|
||||
public static async getRegistries() {
|
||||
const externalRegistries = await this.getInstances({});
|
||||
return externalRegistries;
|
||||
}
|
||||
|
||||
public static async createExternalRegistry(registryDataArg: Partial<plugins.servezoneInterfaces.data.IExternalRegistry['data']>) {
|
||||
const externalRegistry = new ExternalRegistry();
|
||||
externalRegistry.id = await ExternalRegistry.getNewId();
|
||||
Object.assign(externalRegistry, registryDataArg);
|
||||
await externalRegistry.save();
|
||||
return externalRegistry;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public id: string;
|
||||
|
||||
@plugins.smartdata.svDb()
|
||||
public data: plugins.servezoneInterfaces.data.IExternalRegistry['data'];
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import { Cloudly } from '../classes.cloudly.js';
|
||||
import { ExternalRegistry } from './classes.externalregistry.js';
|
||||
|
||||
export class ExternalRegistryManager {
|
||||
public cloudlyRef: Cloudly;
|
||||
public typedrouter = new plugins.typedrequest.TypedRouter();
|
||||
public CExternalRegistry = plugins.smartdata.setDefaultManagerForDoc(this, ExternalRegistry);
|
||||
|
||||
get db() {
|
||||
return this.cloudlyRef.mongodbConnector.smartdataDb;
|
||||
}
|
||||
|
||||
constructor(cloudlyRef: Cloudly) {
|
||||
this.cloudlyRef = cloudlyRef;
|
||||
}
|
||||
|
||||
public async start() {
|
||||
// lets set up a typedrouter
|
||||
this.typedrouter.addTypedRouter(this.typedrouter);
|
||||
|
||||
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.externalRegistry.IReq_GetRegistryById>(
|
||||
new plugins.typedrequest.TypedHandler('getExternalRegistryById', async (dataArg) => {
|
||||
const registry = await ExternalRegistry.getRegistryById(dataArg.id);
|
||||
return {
|
||||
registry: await registry.createSavableObject(),
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.externalRegistry.IReq_GetRegistries>(
|
||||
new plugins.typedrequest.TypedHandler('getExternalRegistries', async (dataArg) => {
|
||||
const registries = await ExternalRegistry.getRegistries();
|
||||
return {
|
||||
registries: await Promise.all(
|
||||
registries.map((registry) => registry.createSavableObject())
|
||||
),
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
this.typedrouter.addTypedHandler<plugins.servezoneInterfaces.requests.externalRegistry.IReq_CreateRegistry>(
|
||||
new plugins.typedrequest.TypedHandler('createExternalRegistry', async (dataArg) => {
|
||||
const registry = await ExternalRegistry.createExternalRegistry(dataArg.registryData);
|
||||
return {
|
||||
registry: await registry.createSavableObject(),
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
2
ts/manager.externalregistry/index.ts
Normal file
2
ts/manager.externalregistry/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './classes.externalregistrymanager.js';
|
||||
export * from './classes.externalregistry.js';
|
@ -148,30 +148,26 @@ export class CloudlySecretManager {
|
||||
);
|
||||
|
||||
this.typedrouter.addTypedHandler(
|
||||
new plugins.typedrequest.TypedHandler<plugins.servezoneInterfaces.requests.secretbundle.IReq_GetEnvBundle>(
|
||||
'getEnvBundle',
|
||||
new plugins.typedrequest.TypedHandler<plugins.servezoneInterfaces.requests.secretbundle.IReq_GetFlatKeyValueObject>(
|
||||
'getFlatKeyValueObject',
|
||||
async (dataArg) => {
|
||||
const wantedBundle = await SecretBundle.getInstance({
|
||||
data: {
|
||||
authorizations: {
|
||||
// @ts-ignore
|
||||
$elemMatch: {
|
||||
secretAccessKey: dataArg.authorization,
|
||||
secretAccessKey: dataArg.secretBundleAuthorization.secretAccessKey,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
const authorization = await wantedBundle.getAuthorizationFromAuthKey(
|
||||
dataArg.authorization,
|
||||
dataArg.secretBundleAuthorization.secretAccessKey,
|
||||
);
|
||||
return {
|
||||
envBundle: {
|
||||
configKeyValueObject: await wantedBundle.getKeyValueObjectForEnvironment(
|
||||
authorization.environment,
|
||||
),
|
||||
environment: authorization.environment,
|
||||
timeSensitive: false,
|
||||
},
|
||||
flatKeyValueObject: await wantedBundle.getKeyValueObjectForEnvironment(
|
||||
authorization.environment,
|
||||
),
|
||||
};
|
||||
},
|
||||
),
|
||||
|
@ -7,6 +7,7 @@ import { Service } from './classes.service.js';
|
||||
import { Cluster } from './classes.cluster.js';
|
||||
import { SecretBundle } from './classes.secretbundle.js';
|
||||
import { SecretGroup } from './classes.secretgroup.js';
|
||||
import { ExternalRegistry } from './classes.externalregistry.js';
|
||||
|
||||
export class CloudlyApiClient {
|
||||
private cloudlyUrl: string;
|
||||
@ -159,6 +160,19 @@ export class CloudlyApiClient {
|
||||
return typedResponse.certificate;
|
||||
}
|
||||
|
||||
public externalRegistry = {
|
||||
// ExternalRegistry
|
||||
getRegistryById: async (registryNameArg: string) => {
|
||||
return ExternalRegistry.getExternalRegistryById(this, registryNameArg);
|
||||
},
|
||||
getRegistries: async () => {
|
||||
return ExternalRegistry.getExternalRegistries(this);
|
||||
},
|
||||
createRegistry: async (optionsArg: Parameters<typeof ExternalRegistry.createExternalRegistry>[1]) => {
|
||||
return ExternalRegistry.createExternalRegistry(this, optionsArg);
|
||||
}
|
||||
}
|
||||
|
||||
public image = {
|
||||
// Images
|
||||
getImageById: async (imageIdArg: string) => {
|
||||
|
83
ts_apiclient/classes.externalregistry.ts
Normal file
83
ts_apiclient/classes.externalregistry.ts
Normal file
@ -0,0 +1,83 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import type { CloudlyApiClient } from './classes.cloudlyapiclient.js';
|
||||
|
||||
export class ExternalRegistry implements plugins.servezoneInterfaces.data.IExternalRegistry {
|
||||
// STATIC
|
||||
public static async getExternalRegistryById(cloudlyClientRef: CloudlyApiClient, registryNameArg: string) {
|
||||
const getRegistryByIdTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.externalRegistry.IReq_GetRegistryById>(
|
||||
'getExternalRegistryById'
|
||||
);
|
||||
const response = await getRegistryByIdTR.fire({
|
||||
identity: cloudlyClientRef.identity,
|
||||
id: registryNameArg,
|
||||
});
|
||||
const newRegistry = new ExternalRegistry(cloudlyClientRef);
|
||||
Object.assign(newRegistry, response.registry);
|
||||
return newRegistry;
|
||||
}
|
||||
|
||||
public static async getExternalRegistries(cloudlyClientRef: CloudlyApiClient) {
|
||||
const getRegistriesTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.externalRegistry.IReq_GetRegistries>(
|
||||
'getExternalRegistries'
|
||||
);
|
||||
const response = await getRegistriesTR.fire({
|
||||
identity: cloudlyClientRef.identity,
|
||||
});
|
||||
const registryConfigs: ExternalRegistry[] = [];
|
||||
for (const registryConfig of response.registries) {
|
||||
const newRegistry = new ExternalRegistry(cloudlyClientRef);
|
||||
Object.assign(newRegistry, registryConfig);
|
||||
registryConfigs.push(newRegistry);
|
||||
}
|
||||
return registryConfigs;
|
||||
}
|
||||
|
||||
public static async createExternalRegistry(cloudlyClientRef: CloudlyApiClient, registryDataArg: Partial<plugins.servezoneInterfaces.data.IExternalRegistry['data']>) {
|
||||
const createRegistryTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.externalRegistry.IReq_CreateRegistry>(
|
||||
'createExternalRegistry'
|
||||
);
|
||||
const response = await createRegistryTR.fire({
|
||||
identity: cloudlyClientRef.identity,
|
||||
registryData: registryDataArg as plugins.servezoneInterfaces.data.IExternalRegistry['data'],
|
||||
});
|
||||
const newRegistry = new ExternalRegistry(cloudlyClientRef);
|
||||
Object.assign(newRegistry, response.registry);
|
||||
return newRegistry;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
public id: string;
|
||||
public data: plugins.servezoneInterfaces.data.IExternalRegistry['data'];
|
||||
public cloudlyClientRef: CloudlyApiClient;
|
||||
|
||||
constructor(cloudlyClientRef: CloudlyApiClient) {
|
||||
this.cloudlyClientRef = cloudlyClientRef;
|
||||
}
|
||||
|
||||
public async update() {
|
||||
const updateRegistryTR = this.cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.externalRegistry.IReq_UpdateRegistry>(
|
||||
'updateExternalRegistry'
|
||||
);
|
||||
const response = await updateRegistryTR.fire({
|
||||
identity: this.cloudlyClientRef.identity,
|
||||
registryData: this.data,
|
||||
});
|
||||
|
||||
const resultRegistryData = response.resultRegistry.data;
|
||||
plugins.smartexpect.expect(resultRegistryData).toEqual(this.data);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public async delete(cloudlyClientRef: CloudlyApiClient, registryIdArg: string) {
|
||||
const deleteRegistryTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.externalRegistry.IReq_DeleteRegistryById>(
|
||||
'deleteExternalRegistryById'
|
||||
);
|
||||
const response = await deleteRegistryTR.fire({
|
||||
identity: cloudlyClientRef.identity,
|
||||
registryId: this.id,
|
||||
});
|
||||
plugins.smartexpect.expect(response.ok).toBeTrue();
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,16 +1,9 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import type { CloudlyApiClient } from './classes.cloudlyapiclient.js';
|
||||
import { SecretGroup } from './classes.secretgroup.js';
|
||||
|
||||
export class SecretBundle implements plugins.servezoneInterfaces.data.ISecretBundle {
|
||||
public cloudlyClientRef: CloudlyApiClient;
|
||||
|
||||
public id: string;
|
||||
public data: plugins.servezoneInterfaces.data.ISecretBundle['data'];
|
||||
|
||||
constructor(cloudlyClientRef: CloudlyApiClient) {
|
||||
this.cloudlyClientRef = cloudlyClientRef;
|
||||
}
|
||||
|
||||
// STATIC
|
||||
public static async getSecretBundleById(cloudlyClientRef: CloudlyApiClient, secretBundleIdArg: string) {
|
||||
const getSecretBundleByIdTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.secretbundle.IReq_GetSecretBundleById>(
|
||||
'getSecretBundleById'
|
||||
@ -24,6 +17,19 @@ export class SecretBundle implements plugins.servezoneInterfaces.data.ISecretBun
|
||||
return newSecretBundle;
|
||||
}
|
||||
|
||||
public static async getSecretBundleByAuthorization(cloudlyClientRef: CloudlyApiClient, secretBundleAuthorizationArg: plugins.servezoneInterfaces.data.ISecretBundleAuthorization) {
|
||||
const getSecretBundleByAuthorizationTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.secretbundle.IReq_GetSecretBundleByAuthorization>(
|
||||
'getSecretBundleByAuthorization'
|
||||
);
|
||||
const response = await getSecretBundleByAuthorizationTR.fire({
|
||||
identity: cloudlyClientRef.identity,
|
||||
secretBundleAuthorization: secretBundleAuthorizationArg,
|
||||
});
|
||||
const newSecretBundle = new SecretBundle(cloudlyClientRef);
|
||||
Object.assign(newSecretBundle, response.secretBundle);
|
||||
return newSecretBundle;
|
||||
}
|
||||
|
||||
public static async getSecretBundles(cloudlyClientRef: CloudlyApiClient) {
|
||||
const getSecretBundlesTR = cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.secretbundle.IReq_GetSecretBundles>(
|
||||
'getSecretBundles'
|
||||
@ -64,6 +70,17 @@ export class SecretBundle implements plugins.servezoneInterfaces.data.ISecretBun
|
||||
return newSecretBundle;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
|
||||
public cloudlyClientRef: CloudlyApiClient;
|
||||
|
||||
public id: string;
|
||||
public data: plugins.servezoneInterfaces.data.ISecretBundle['data'];
|
||||
|
||||
constructor(cloudlyClientRef: CloudlyApiClient) {
|
||||
this.cloudlyClientRef = cloudlyClientRef;
|
||||
}
|
||||
|
||||
public async update() {
|
||||
const updateSecretBundleTR = this.cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.secretbundle.IReq_UpdateSecretBundle>(
|
||||
'updateSecretBundle'
|
||||
@ -94,9 +111,25 @@ export class SecretBundle implements plugins.servezoneInterfaces.data.ISecretBun
|
||||
return null;
|
||||
}
|
||||
|
||||
public async toFlatKeyValueObject() {
|
||||
return {
|
||||
// TODO: implement
|
||||
};
|
||||
public async getFlatKeyValueObjectForEnvironment(environmentArg: string = 'production') {
|
||||
const bundleAuthorization = this.data.authorizations.find(authorization => {
|
||||
return authorization.environment === environmentArg;
|
||||
});
|
||||
if (bundleAuthorization) {
|
||||
throw new Error(`no matching environment >>${environmentArg} found in secret bundle`);
|
||||
}
|
||||
|
||||
const getFlatKeyValueObjectTR = this.cloudlyClientRef.typedsocketClient.createTypedRequest<plugins.servezoneInterfaces.requests.secretbundle.IReq_GetFlatKeyValueObject>(
|
||||
'getFlatKeyValueObject'
|
||||
);
|
||||
const response = await getFlatKeyValueObjectTR.fire({
|
||||
identity: this.cloudlyClientRef.identity,
|
||||
seccretBundleId: this.id,
|
||||
secretBundleAuthorization: bundleAuthorization,
|
||||
});
|
||||
|
||||
const flatKeyValueObject: {[key: string]: string} = response.flatKeyValueObject;
|
||||
|
||||
return flatKeyValueObject;
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
|
||||
export interface IEnvBundle {
|
||||
environment: string;
|
||||
timeSensitive: boolean;
|
||||
configKeyValueObject: {[key: string]: string};
|
||||
}
|
12
ts_interfaces/data/externalregistry.ts
Normal file
12
ts_interfaces/data/externalregistry.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IExternalRegistry {
|
||||
id: string;
|
||||
data: {
|
||||
type: 'docker' | 'npm';
|
||||
name: string;
|
||||
url: string;
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
}
|
@ -4,6 +4,11 @@ export interface IImage {
|
||||
id: string;
|
||||
data: {
|
||||
name: string;
|
||||
location: {
|
||||
internal: boolean;
|
||||
externalRegistryId: string;
|
||||
externalImageTag: string;
|
||||
}
|
||||
description: string;
|
||||
versions: Array<{
|
||||
versionString: string;
|
||||
|
@ -3,8 +3,8 @@ export * from './cluster.js';
|
||||
export * from './config.js';
|
||||
export * from './deployment.js';
|
||||
export * from './docker.js';
|
||||
export * from './env.js';
|
||||
export * from './event.js';
|
||||
export * from './externalregistry.js';
|
||||
export * from './image.js';
|
||||
export * from './secretbundle.js';
|
||||
export * from './secretgroup.js'
|
||||
|
@ -45,9 +45,11 @@ export interface ISecretBundle {
|
||||
/**
|
||||
* authrozations select a specific environment of a config bundle
|
||||
*/
|
||||
authorizations: Array<{
|
||||
secretAccessKey: string;
|
||||
environment: string;
|
||||
}>;
|
||||
authorizations: Array<ISecretBundleAuthorization>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ISecretBundleAuthorization {
|
||||
secretAccessKey: string;
|
||||
environment: string;
|
||||
}
|
||||
|
72
ts_interfaces/requests/externalregistry.ts
Normal file
72
ts_interfaces/requests/externalregistry.ts
Normal file
@ -0,0 +1,72 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IReq_GetRegistryById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetRegistryById
|
||||
> {
|
||||
method: 'getExternalRegistryById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
id: string;
|
||||
};
|
||||
response: {
|
||||
registry: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetRegistries extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetRegistries
|
||||
> {
|
||||
method: 'getExternalRegistries';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
registries: data.IExternalRegistry[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_CreateRegistry extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CreateRegistry
|
||||
> {
|
||||
method: 'createExternalRegistry';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryData: data.IExternalRegistry['data'];
|
||||
};
|
||||
response: {
|
||||
registry: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateRegistry extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateRegistry
|
||||
> {
|
||||
method: 'updateExternalRegistry';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryData: data.IExternalRegistry['data'];
|
||||
};
|
||||
response: {
|
||||
resultRegistry: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteRegistryById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteRegistryById
|
||||
> {
|
||||
method: 'deleteExternalRegistryById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryId: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
@ -4,6 +4,7 @@ import * as adminRequests from './admin.js';
|
||||
import * as certificateRequests from './certificate.js';
|
||||
import * as clusterRequests from './cluster.js';
|
||||
import * as configRequests from './config.js';
|
||||
import * as externalRegistryRequests from './externalregistry.js';
|
||||
import * as identityRequests from './identity.js';
|
||||
import * as imageRequests from './image.js';
|
||||
import * as informRequests from './inform.js';
|
||||
@ -22,6 +23,7 @@ export {
|
||||
certificateRequests as certificate,
|
||||
clusterRequests as cluster,
|
||||
configRequests as config,
|
||||
externalRegistryRequests as externalRegistry,
|
||||
identityRequests as identity,
|
||||
imageRequests as image,
|
||||
informRequests as inform,
|
||||
|
@ -2,26 +2,6 @@ import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
/**
|
||||
* when retrieving secrets for actual use, you do this in the form of an envBundle.
|
||||
*/
|
||||
export interface IReq_GetEnvBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetEnvBundle
|
||||
> {
|
||||
method: 'getEnvBundle';
|
||||
request: {
|
||||
authorization: string;
|
||||
/**
|
||||
* specify this if you want to get a warning, if the envBundle is for an unexpected environment
|
||||
*/
|
||||
environment?: string;
|
||||
};
|
||||
response: {
|
||||
envBundle: data.IEnvBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetSecretBundles extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretBundles
|
||||
@ -92,3 +72,32 @@ export interface IReq_DeleteSecretBundleById extends plugins.typedrequestInterfa
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetSecretBundleByAuthorization extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretBundleByAuthorization
|
||||
> {
|
||||
method: 'getSecretBundleByAuthorization';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundleAuthorization: data.ISecretBundleAuthorization;
|
||||
};
|
||||
response: {
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetFlatKeyValueObject extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetFlatKeyValueObject
|
||||
> {
|
||||
method: 'getFlatKeyValueObject';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
seccretBundleId: string;
|
||||
secretBundleAuthorization: data.ISecretBundleAuthorization;
|
||||
};
|
||||
response: {
|
||||
flatKeyValueObject: {[key: string]: string};
|
||||
};
|
||||
}
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/cloudly',
|
||||
version: '4.7.0',
|
||||
version: '4.11.0',
|
||||
description: 'A comprehensive tool for managing containerized applications across multiple cloud providers using Docker Swarmkit, featuring web, CLI, and API interfaces.'
|
||||
}
|
||||
|
Reference in New Issue
Block a user