import type { IServiceRessources } from './docker.js'; export interface IService { id: string; data: { name: string; description: string; 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[]; /** * Service category determines deployment behavior * - base: Core services that run on every node (coreflow, coretraffic, corelog) * - distributed: Services that run on limited nodes (cores3, coremongo) * - workload: User applications */ serviceCategory: 'base' | 'distributed' | 'workload'; /** * Deployment strategy for the service * - all-nodes: Deploy to every node in the cluster * - limited-replicas: Deploy to a limited number of nodes * - custom: Custom deployment logic */ deploymentStrategy: 'all-nodes' | 'limited-replicas' | 'custom'; /** * Maximum number of replicas for distributed services * For example, 3 for cores3 or coremongo */ maxReplicas?: number; /** * Whether to enforce anti-affinity rules * When true, tries to spread deployments across different BareMetal servers */ antiAffinity?: boolean; scaleFactor: number; balancingStrategy: 'round-robin' | 'least-connections'; ports: { web: number; custom?: { [domain: string]: string }; }; resources?: IServiceRessources; domains: { name: string; port?: number; protocol?: 'http' | 'https' | 'ssh'; }[]; deploymentIds: string[]; }; }