interfaces/ts/data/cluster.ts

57 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-02-10 03:47:15 +00:00
import * as plugins from '../plugins.js';
2024-02-02 11:46:59 +00:00
import { type IDockerRegistryInfo, type IServiceRessources } from '../data/docker.js';
2024-02-06 11:32:52 +00:00
import type { IServer } from './server.js';
2024-02-02 11:46:59 +00:00
2024-01-23 22:38:10 +00:00
export interface IClusterIdentifier {
clusterName: string;
secretKey: string;
}
2024-02-02 11:46:59 +00:00
2024-02-06 09:12:59 +00:00
export interface ICluster {
2024-02-02 11:46:59 +00:00
id: string;
data: {
name: string;
secretKey: string;
jumpCode: string;
2024-02-06 09:12:59 +00:00
/**
* when was the jump code used
* avoid replay attacks
*/
2024-02-02 11:46:59 +00:00
jumpCodeUsedAt: number;
2024-02-06 09:12:59 +00:00
2024-02-02 11:46:59 +00:00
/**
* how can the cluster reach cloudly
*/
cloudlyUrl: string;
/**
* what servers are expected to be part of the cluster
*/
2024-02-06 11:32:52 +00:00
servers: IServer[];
2024-02-02 11:46:59 +00:00
/**
2024-02-06 09:12:59 +00:00
* ACME info. This is used to get SSL certificates.
2024-02-02 11:46:59 +00:00
*/
acmeInfo: {
serverAddress: string;
serverSecret: string;
};
2024-02-10 03:47:15 +00:00
sshKeys: plugins.tsclass.network.ISshKey[];
2024-02-02 11:46:59 +00:00
};
}
2024-02-06 09:16:44 +00:00
export interface IService {
2024-02-02 11:46:59 +00:00
name: string;
image: string;
ports: {
web: number;
custom?: { [domain: string]: string };
};
resources?: IServiceRessources;
domains: string[];
secrets: { [key: string]: string };
}