UNPKG

@chimoney.io/iaas-k8s-deployment

Version:

Kubernetes Infrastructure as a Service deployment package for streamlined multi-cloud environments

417 lines 17.2 kB
import { z } from "zod"; import type { DeploymentOptions, DeploymentConfig, FieldValidationError } from "../types/index.js"; export declare const LogLevelSchema: z.ZodEnum<["debug", "info", "warn", "error", "silent"]>; export declare const DeploymentActionSchema: z.ZodEnum<["up", "preview", "destroy", "outputs", "refresh", "rollback"]>; export declare const DeploymentStatusSchema: z.ZodEnum<["initializing", "configuring", "deploying", "completed", "failed", "rolling-back"]>; export declare const AwsCloudConfigSchema: z.ZodObject<{ region: z.ZodString; profile: z.ZodOptional<z.ZodString>; accessKeyId: z.ZodOptional<z.ZodString>; secretAccessKey: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; }, { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; }>; export declare const GcpCloudConfigSchema: z.ZodObject<{ project: z.ZodString; region: z.ZodString; zone: z.ZodOptional<z.ZodString>; credentials: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>>; }, "strip", z.ZodTypeAny, { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; }, { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; }>; export declare const CloudConfigSchema: z.ZodUnion<[z.ZodObject<{ region: z.ZodString; profile: z.ZodOptional<z.ZodString>; accessKeyId: z.ZodOptional<z.ZodString>; secretAccessKey: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; }, { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; }>, z.ZodObject<{ project: z.ZodString; region: z.ZodString; zone: z.ZodOptional<z.ZodString>; credentials: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>>; }, "strip", z.ZodTypeAny, { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; }, { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; }>]>; export declare const NamespaceSchema: z.ZodString; export declare const DeploymentTypeSchema: z.ZodEnum<["shared", "dedicated"]>; export declare const DeploymentConfigSchema: z.ZodObject<{ stackName: z.ZodString; secretsJson: z.ZodEffects<z.ZodString, string, string>; companyName: z.ZodString; cloudProvider: z.ZodOptional<z.ZodEnum<["aws", "gcp"]>>; helmChartPath: z.ZodOptional<z.ZodString>; namespace: z.ZodOptional<z.ZodString>; deploymentType: z.ZodOptional<z.ZodEnum<["shared", "dedicated"]>>; }, "strip", z.ZodTypeAny, { stackName: string; companyName: string; secretsJson: string; helmChartPath?: string | undefined; cloudProvider?: "aws" | "gcp" | undefined; namespace?: string | undefined; deploymentType?: "shared" | "dedicated" | undefined; }, { stackName: string; companyName: string; secretsJson: string; helmChartPath?: string | undefined; cloudProvider?: "aws" | "gcp" | undefined; namespace?: string | undefined; deploymentType?: "shared" | "dedicated" | undefined; }>; export declare const DeploymentOptionsSchema: z.ZodObject<{ action: z.ZodEnum<["up", "preview", "destroy", "outputs", "refresh", "rollback"]>; stackName: z.ZodString; secretsJson: z.ZodEffects<z.ZodString, string, string>; companyName: z.ZodString; workDir: z.ZodOptional<z.ZodString>; helmChartPath: z.ZodOptional<z.ZodString>; logLevel: z.ZodOptional<z.ZodEnum<["debug", "info", "warn", "error", "silent"]>>; validateConfig: z.ZodOptional<z.ZodBoolean>; enableRollback: z.ZodOptional<z.ZodBoolean>; timeout: z.ZodOptional<z.ZodNumber>; cloudProvider: z.ZodOptional<z.ZodEnum<["aws", "gcp"]>>; cloudConfig: z.ZodOptional<z.ZodUnion<[z.ZodObject<{ region: z.ZodString; profile: z.ZodOptional<z.ZodString>; accessKeyId: z.ZodOptional<z.ZodString>; secretAccessKey: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; }, { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; }>, z.ZodObject<{ project: z.ZodString; region: z.ZodString; zone: z.ZodOptional<z.ZodString>; credentials: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>]>>; }, "strip", z.ZodTypeAny, { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; }, { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; }>]>>; autoSetupConfig: z.ZodOptional<z.ZodBoolean>; namespace: z.ZodOptional<z.ZodString>; deploymentType: z.ZodEnum<["shared", "dedicated"]>; planTier: z.ZodOptional<z.ZodEnum<["basic", "standard", "premium", "enterprise"]>>; kubecostEnabled: z.ZodOptional<z.ZodBoolean>; billingAccountId: z.ZodOptional<z.ZodString>; defaultDomain: z.ZodOptional<z.ZodString>; authDomain: z.ZodOptional<z.ZodString>; openPaymentsDomain: z.ZodOptional<z.ZodString>; connectorDomain: z.ZodOptional<z.ZodString>; enableRafikiAuth: z.ZodOptional<z.ZodBoolean>; enableRafikiBackend: z.ZodOptional<z.ZodBoolean>; enableNginx: z.ZodOptional<z.ZodBoolean>; enableRedis: z.ZodOptional<z.ZodBoolean>; rafikiAuthImage: z.ZodOptional<z.ZodObject<{ repository: z.ZodOptional<z.ZodString>; tag: z.ZodOptional<z.ZodString>; pullPolicy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }>>; rafikiBackendImage: z.ZodOptional<z.ZodObject<{ repository: z.ZodOptional<z.ZodString>; tag: z.ZodOptional<z.ZodString>; pullPolicy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }>>; nginxImage: z.ZodOptional<z.ZodObject<{ repository: z.ZodOptional<z.ZodString>; tag: z.ZodOptional<z.ZodString>; pullPolicy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }>>; redisImage: z.ZodOptional<z.ZodObject<{ repository: z.ZodOptional<z.ZodString>; tag: z.ZodOptional<z.ZodString>; pullPolicy: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }, { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; }>>; ingressClassName: z.ZodOptional<z.ZodString>; dedicatedDeploymentHpaEnabledByDefault: z.ZodOptional<z.ZodBoolean>; sharedDeploymentNetworkPolicyEnabled: z.ZodOptional<z.ZodBoolean>; ingressControllerNamespace: z.ZodOptional<z.ZodString>; ingressControllerPodSelectorLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; allowedExternalEgressRules: z.ZodOptional<z.ZodArray<z.ZodObject<{ cidr: z.ZodString; ports: z.ZodOptional<z.ZodArray<z.ZodObject<{ port: z.ZodNumber; protocol: z.ZodEnum<["TCP", "UDP"]>; }, "strip", z.ZodTypeAny, { port: number; protocol: "TCP" | "UDP"; }, { port: number; protocol: "TCP" | "UDP"; }>, "many">>; }, "strip", z.ZodTypeAny, { cidr: string; ports?: { port: number; protocol: "TCP" | "UDP"; }[] | undefined; }, { cidr: string; ports?: { port: number; protocol: "TCP" | "UDP"; }[] | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { stackName: string; companyName: string; secretsJson: string; deploymentType: "shared" | "dedicated"; action: "up" | "preview" | "destroy" | "outputs" | "refresh" | "rollback"; helmChartPath?: string | undefined; planTier?: "basic" | "standard" | "premium" | "enterprise" | undefined; cloudProvider?: "aws" | "gcp" | undefined; namespace?: string | undefined; workDir?: string | undefined; logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined; validateConfig?: boolean | undefined; enableRollback?: boolean | undefined; timeout?: number | undefined; cloudConfig?: { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; } | { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined; } | undefined; autoSetupConfig?: boolean | undefined; kubecostEnabled?: boolean | undefined; billingAccountId?: string | undefined; defaultDomain?: string | undefined; authDomain?: string | undefined; openPaymentsDomain?: string | undefined; connectorDomain?: string | undefined; enableRafikiAuth?: boolean | undefined; enableRafikiBackend?: boolean | undefined; enableNginx?: boolean | undefined; enableRedis?: boolean | undefined; rafikiAuthImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; rafikiBackendImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; nginxImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; redisImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; ingressClassName?: string | undefined; dedicatedDeploymentHpaEnabledByDefault?: boolean | undefined; sharedDeploymentNetworkPolicyEnabled?: boolean | undefined; ingressControllerNamespace?: string | undefined; ingressControllerPodSelectorLabels?: Record<string, string> | undefined; allowedExternalEgressRules?: { cidr: string; ports?: { port: number; protocol: "TCP" | "UDP"; }[] | undefined; }[] | undefined; }, { stackName: string; companyName: string; secretsJson: string; deploymentType: "shared" | "dedicated"; action: "up" | "preview" | "destroy" | "outputs" | "refresh" | "rollback"; helmChartPath?: string | undefined; planTier?: "basic" | "standard" | "premium" | "enterprise" | undefined; cloudProvider?: "aws" | "gcp" | undefined; namespace?: string | undefined; workDir?: string | undefined; logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined; validateConfig?: boolean | undefined; enableRollback?: boolean | undefined; timeout?: number | undefined; cloudConfig?: { region: string; profile?: string | undefined; accessKeyId?: string | undefined; secretAccessKey?: string | undefined; } | { region: string; project: string; zone?: string | undefined; credentials?: string | z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined; } | undefined; autoSetupConfig?: boolean | undefined; kubecostEnabled?: boolean | undefined; billingAccountId?: string | undefined; defaultDomain?: string | undefined; authDomain?: string | undefined; openPaymentsDomain?: string | undefined; connectorDomain?: string | undefined; enableRafikiAuth?: boolean | undefined; enableRafikiBackend?: boolean | undefined; enableNginx?: boolean | undefined; enableRedis?: boolean | undefined; rafikiAuthImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; rafikiBackendImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; nginxImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; redisImage?: { repository?: string | undefined; tag?: string | undefined; pullPolicy?: string | undefined; } | undefined; ingressClassName?: string | undefined; dedicatedDeploymentHpaEnabledByDefault?: boolean | undefined; sharedDeploymentNetworkPolicyEnabled?: boolean | undefined; ingressControllerNamespace?: string | undefined; ingressControllerPodSelectorLabels?: Record<string, string> | undefined; allowedExternalEgressRules?: { cidr: string; ports?: { port: number; protocol: "TCP" | "UDP"; }[] | undefined; }[] | undefined; }>; export declare function validateDeploymentOptionsWithZod(options: DeploymentOptions): FieldValidationError[]; export declare function validateDeploymentConfigWithZod(config: DeploymentConfig): FieldValidationError[]; export declare function validateSecretsStructure(secretsJson: string): FieldValidationError[]; /** * @deprecated Base64 encoding is no longer needed for stringData secrets. * This function is kept for legacy compatibility only. * Encodes a single string value to Base64. */ export declare function encodeSecretValue(value: string): string; /** * @deprecated Base64 decoding is no longer needed for stringData secrets. * This function is kept for legacy compatibility only. * Decodes a single Base64 encoded string value. */ export declare function decodeSecretValue(encodedValue: string): string; /** * @deprecated Base64 detection is no longer needed for stringData secrets. * This function is kept for legacy compatibility only. * Checks if a string is already Base64 encoded. */ export declare function isBase64Encoded(str: string): boolean; export declare function validateAndProcessSecrets(secretsJson: string): { isValid: boolean; processedSecretsJson: string; errors: FieldValidationError[]; processingReport?: { [key: string]: "processed" | "placeholder" | "skipped"; }; }; export declare function validateAndEncodeSecrets(secretsJson: string): { isValid: boolean; encodedSecretsJson: string; errors: FieldValidationError[]; encodingReport?: { [key: string]: "encoded" | "already_encoded" | "placeholder" | "skipped"; }; }; export declare function isValidDeploymentAction(action: string): action is z.infer<typeof DeploymentActionSchema>; export declare function isValidLogLevel(level: string): level is z.infer<typeof LogLevelSchema>; export declare function isValidDeploymentStatus(status: string): status is z.infer<typeof DeploymentStatusSchema>; export declare function isValidNamespace(namespace: string): namespace is z.infer<typeof NamespaceSchema>; export declare function isValidDeploymentType(deploymentType: string): deploymentType is z.infer<typeof DeploymentTypeSchema>; export declare function validateNamespaceConfiguration(namespace: string, deploymentType: "shared" | "dedicated"): FieldValidationError[]; //# sourceMappingURL=validation.d.ts.map