57 lines
1.1 KiB
TypeScript
57 lines
1.1 KiB
TypeScript
import * as plugins from '../plugins.js';
|
|
|
|
import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js';
|
|
import type { IServer } from './server.js';
|
|
|
|
export interface IClusterIdentifier {
|
|
clusterName: string;
|
|
secretKey: string;
|
|
}
|
|
|
|
export interface ICluster {
|
|
id: string;
|
|
data: {
|
|
name: string;
|
|
secretKey: string;
|
|
jumpCode: string;
|
|
|
|
/**
|
|
* when was the jump code used
|
|
* avoid replay attacks
|
|
*/
|
|
jumpCodeUsedAt: number;
|
|
|
|
/**
|
|
* how can the cluster reach cloudly
|
|
*/
|
|
cloudlyUrl: string;
|
|
|
|
/**
|
|
* what servers are expected to be part of the cluster
|
|
*/
|
|
servers: IServer[];
|
|
|
|
/**
|
|
* ACME info. This is used to get SSL certificates.
|
|
*/
|
|
acmeInfo: {
|
|
serverAddress: string;
|
|
serverSecret: string;
|
|
};
|
|
|
|
sshKeys: plugins.tsclass.network.ISshKey[];
|
|
};
|
|
}
|
|
|
|
export interface IService {
|
|
name: string;
|
|
image: string;
|
|
ports: {
|
|
web: number;
|
|
custom?: { [domain: string]: string };
|
|
};
|
|
resources?: IServiceRessources;
|
|
domains: string[];
|
|
secrets: { [key: string]: string };
|
|
}
|