- Added a new `rollback` command to roll back deployments to their previous release. - Introduced `findRollbackCandidates` and `rollbackDeployment` functions to handle rollback logic. - Updated CLI command definitions to include the new `rollback` command with an alias. - Enhanced deployment conversion to use resolved images for buildable services. - Introduced a new `graph` module to visualize Kubernetes resources and their relationships. - Added tests for the new rollback functionality and graph rendering. - Updated package version to 1.3.0.
22 lines
948 B
TypeScript
22 lines
948 B
TypeScript
import type { ComposeSpecification } from "../schema/docker.d";
|
|
import { composeToKubernetes, type KubernetesResource } from "./convert";
|
|
import { reconcilePostgresClaims } from "./database";
|
|
import { reconcileS3Claims } from "./storage";
|
|
import { resolveBuildImages, type BuildOptions } from "./build";
|
|
|
|
export async function renderResources(
|
|
project: string,
|
|
compose: ComposeSpecification,
|
|
cwd = process.cwd(),
|
|
options: BuildOptions = {},
|
|
): Promise<KubernetesResource[]> {
|
|
const postgresEnv = await reconcilePostgresClaims(project, compose);
|
|
const s3Env = await reconcileS3Claims(project, compose);
|
|
const serviceEnv = { ...postgresEnv };
|
|
for (const [service, environment] of Object.entries(s3Env)) {
|
|
serviceEnv[service] = { ...serviceEnv[service], ...environment };
|
|
}
|
|
const buildImages = await resolveBuildImages(project, compose, options);
|
|
return composeToKubernetes(project, compose, cwd, serviceEnv, buildImages);
|
|
}
|