UNPKG

@starship-ci/generator

Version:

Kubernetes manifest generator for Starship deployments

32 lines (31 loc) 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CosmosStatefulSetGenerator = void 0; const genesis_1 = require("./genesis"); const validator_1 = require("./validator"); /** * StatefulSet generator for Cosmos chains * Handles genesis and validator StatefulSets */ class CosmosStatefulSetGenerator { config; chain; scriptManager; statefulSetGenerators; constructor(chain, config, scriptManager) { this.config = config; this.chain = chain; this.scriptManager = scriptManager; this.statefulSetGenerators = [ new genesis_1.CosmosGenesisStatefulSetGenerator(this.chain, this.config, this.scriptManager) ]; // Add validator StatefulSet if numValidators > 1 if (this.chain.numValidators && this.chain.numValidators > 1) { this.statefulSetGenerators.push(new validator_1.CosmosValidatorStatefulSetGenerator(this.chain, this.config, this.scriptManager)); } } generate() { return this.statefulSetGenerators.flatMap((generator) => generator.generate()); } } exports.CosmosStatefulSetGenerator = CosmosStatefulSetGenerator;