interfaces/ts/data/cluster.ts
2024-02-02 12:46:59 +01:00

53 lines
1.0 KiB
TypeScript

import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js';
import type { IServerConfig } from './server.js';
export interface IClusterIdentifier {
clusterName: string;
secretKey: string;
}
export interface IClusterConfig {
id: string;
data: {
name: string;
secretKey: string;
jumpCode: string;
jumpCodeUsedAt: number;
/**
* how can the cluster reach cloudly
*/
cloudlyUrl: string;
/**
* what servers are expected to be part of the cluster
*/
servers: IServerConfig[];
/**
* the containers running
*/
containers: IClusterConfigContainer[];
/**
*
*/
acmeInfo: {
serverAddress: string;
serverSecret: string;
};
registryInfo: IDockerRegistryInfo;
};
}
export interface IClusterConfigContainer {
name: string;
image: string;
ports: {
web: number;
custom?: { [domain: string]: string };
};
resources?: IServiceRessources;
domains: string[];
secrets: { [key: string]: string };
}