mirror of
https://github.com/YuzuZensai/Minikura.git
synced 2026-01-31 14:57:49 +00:00
🎨 style: auto format
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
import { KubernetesClient } from '../utils/k8s-client';
|
||||
import { registerRBACResources } from '../utils/rbac-registrar';
|
||||
import { setupCRDRegistration } from '../utils/crd-registrar';
|
||||
import { NAMESPACE } from '../config/constants';
|
||||
import { PrismaClient } from '@minikura/db';
|
||||
import { dotenvLoad } from 'dotenv-mono';
|
||||
import { KubernetesClient } from "../utils/k8s-client";
|
||||
import { registerRBACResources } from "../utils/rbac-registrar";
|
||||
import { setupCRDRegistration } from "../utils/crd-registrar";
|
||||
import { NAMESPACE } from "../config/constants";
|
||||
import { PrismaClient } from "@minikura/db";
|
||||
import { dotenvLoad } from "dotenv-mono";
|
||||
|
||||
dotenvLoad();
|
||||
|
||||
async function main() {
|
||||
console.log('Starting to apply TypeScript-defined CRDs to Kubernetes cluster...');
|
||||
|
||||
console.log("Starting to apply TypeScript-defined CRDs to Kubernetes cluster...");
|
||||
|
||||
try {
|
||||
const k8sClient = KubernetesClient.getInstance();
|
||||
console.log(`Connected to Kubernetes cluster, using namespace: ${NAMESPACE}`);
|
||||
|
||||
await registerRBACResources(k8sClient);
|
||||
|
||||
console.log('Registering Custom Resource Definitions...');
|
||||
|
||||
console.log("Registering Custom Resource Definitions...");
|
||||
const prisma = new PrismaClient();
|
||||
await setupCRDRegistration(prisma, k8sClient, NAMESPACE);
|
||||
|
||||
console.log('Successfully applied all resources to Kubernetes cluster');
|
||||
|
||||
console.log("Successfully applied all resources to Kubernetes cluster");
|
||||
process.exit(0);
|
||||
} catch (error: any) {
|
||||
console.error('Failed to apply resources:', error.message);
|
||||
console.error("Failed to apply resources:", error.message);
|
||||
if (error.stack) {
|
||||
console.error(error.stack);
|
||||
}
|
||||
@@ -31,7 +31,7 @@ async function main() {
|
||||
}
|
||||
}
|
||||
|
||||
main().catch(error => {
|
||||
console.error('Unhandled error:', error);
|
||||
main().catch((error) => {
|
||||
console.error("Unhandled error:", error);
|
||||
process.exit(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user