import { BaseObj } from './base'; import { Block } from './block'; export declare type RealmType = 'local' | 'gcp' | 'aws' | 'azure'; export interface Realm extends BaseObj { /** Path to the yaml directory(ies) relative to main vdev.yaml. If array, first take precedence and is the one used for the .out output result */ yamlDirs: string[]; name: string; /** The Kubernetes context name (this is required) */ context: string | null; type: RealmType; /** The Google project name */ project?: string; /** * The for type 'local' it's localhost:5000/, for 'gcr.io/${realm.project}/' for aws, has to be set. * */ registry: string; /** list of default defaultConfigurations (k8s yaml file names without extension) to be used if "kcreate, ..." has not services description */ defaultConfigurations?: string[]; [key: string]: any; } export declare type RealmByName = { [name: string]: Realm; }; export declare type RealmChange = { profileChanged?: boolean; contextChanged?: boolean; }; /** * Set/Change the current (k8s context and eventual google project). Only change what is needed. * @param {*} realm the realm object. * @return {profileChanged?: true, contextChanged?: true} return a change object with what has changed. */ export declare function setRealm(realm: Realm): Promise; /** * Get the current Realm. Return undefined if not found */ export declare function getCurrentRealm(check?: boolean): Promise; /** * Render realm yaml file. * @param realm * @param name name of the yaml file (without extension) * @return The yaml file path */ export declare function renderRealmFile(realm: Realm, name: string): Promise; export declare function formatAsTable(realms: RealmByName, currentRealm?: Realm | null): string; export declare type TemplateRendered = { name: string; path: string; }; /** * Templatize a set of yaml files * @param resourceNames either a single name, comma deliminated set of names, or an array. */ export declare function templatize(realm: Realm, resourceNames?: string | string[]): Promise; /** * Returns a list of k8s configuration file names for a given realm and optional configurations names delimited string or array. * - If configurationNames is an array, then, just return as is. * - If configurationNames is string (e.g., 'web-server, queue') then it will split on ',' and trim each item as returns. * - If no resourceNames then returns all of the resourceNames for the realm. */ export declare function getConfigurationNames(realm: Realm, configurationNames?: string | string[]): Promise; /** * Note: right now assume remote is on gke cloud (gcr.io/) * @param realm * @param serviceName */ export declare function getRemoteImageName(block: Block, realm: Realm): string; export declare function assertRealm(realm?: Realm): Realm; export declare function loadRealms(rootDir?: string): Promise;