fix(service): Fix secret bundle and service management bugs

This commit is contained in:
2025-01-20 02:11:12 +01:00
parent 7084d76c43
commit 04b278ee28
16 changed files with 186 additions and 11 deletions

View File

@ -21,13 +21,19 @@ export interface ISecretBundle {
*/
type: 'service' | 'npmci' | 'gitzone' | 'external';
/**
* set this if the secretBundle belongs to a service
*/
serviceId?: string;
/**
* You can add specific secret groups using this
*/
includedSecretGroupIds: string[];
/**
* You can add specific tags using this
* access to this secretBundle also grants access to resources with matching tags
*/
includedTags: {
key: string;
@ -35,12 +41,12 @@ export interface ISecretBundle {
}[];
/**
* add images
* access to this secretBundle also grants access to the images
*/
includedImages: {
imageClaims: {
imageId: string;
permissions: ('read' | 'write')[];
}[];
}[];
/**
* authrozations select a specific environment of a config bundle

View File

@ -8,7 +8,15 @@ export interface IService {
imageId: string;
imageVersion: string;
environment: { [key: string]: string };
/**
* the main secret bundle id, exclusive to the service
*/
secretBundleId: string;
/**
* those secret bundle ids do not belong to the service itself
* and thus live past the service lifecycle
*/
additionalSecretBundleIds?: string[];
scaleFactor: number;
balancingStrategy: 'round-robin' | 'least-connections';
ports: {

View File

@ -111,3 +111,19 @@ extends plugins.typedrequestInterfaces.implementsTR<
success: boolean;
};
}
export interface IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject
extends plugins.typedrequestInterfaces.implementsTR<
plugins.typedrequestInterfaces.ITypedRequest,
IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject
> {
method: 'getServiceSecretBundlesAsFlatObject';
request: {
identity: IIdentity;
serviceId: string;
environment: string;
};
response: {
flatKeyValueObject: {[key: string]: string};
};
}