@apigeeks/fbl-k8s-plugin
Version:
fbl wrapper plugin for helm and kubectl cli utilities
46 lines (45 loc) • 1.8 kB
TypeScript
import { ActionSnapshot, IContext } from 'fbl';
import { IK8sCleanupOptions, IK8sObject } from '../interfaces';
export declare class K8sCleanupService {
private static defaultKinds;
private k8sKubectlService;
private k8sHelmService;
/**
* Clean cluster
* @param {IK8sCleanupOptions} options
* @param {IContext} context
* @param {ActionSnapshot} snapshot
* @return {Promise<void>}
*/
cleanup(options: IK8sCleanupOptions, context: IContext, snapshot: ActionSnapshot): Promise<void>;
/**
* Cleanup helm releases
* @param {IK8sCleanupOptions} options
* @param {IContext} context
* @param {ActionSnapshot} snapshot
* @param {string[]} registeredHelmReleases
* @param {string[]} deployedHelms
* @return {Promise<void>}
*/
protected cleanUpHelmReleases(options: IK8sCleanupOptions, context: IContext, snapshot: ActionSnapshot, registeredHelmReleases: string[], deployedHelms: string[]): Promise<void>;
/**
* @param {IK8sCleanupOptions} options
* @param {IContext} context
* @param {ActionSnapshot} snapshot
* @param {string} kind
* @param {IK8sObject[]} allHelmObjects
* @param {string[]} deployed
* @param {string[]} cluster
* @param {string[]} ignoredPatterns
* @return {Promise<void>}
*/
protected cleanupK8sObjects(options: IK8sCleanupOptions, context: IContext, snapshot: ActionSnapshot, kind: string, allHelmObjects: IK8sObject[], deployed: string[], cluster: string[], ignoredPatterns: string[]): Promise<void>;
/**
* Difference between all objects inside the cluster and ones that were deployed
*
* @param {string[]} inCluster
* @param {string[]} deployed
* @return {string[]}
*/
private findOrphans;
}