@wheatstalk/cdk8s-self-cleanup
TypeScript icon, indicating that this package has built-in type declarations

0.0.623 • Public • Published

CDK8S Self Cleanup

This project provides a CDK8S construct that self-cleans old chart resources. When you add this construct to your chart, you can remove resources from your CDK8S app's charts and the construct will ensure that the old resources are removed from your K8s cluster.

This construct uses a stable hashing algorithm to version the chart and label resources so that it can identify old resources and create a job to delete them for you.

Usage

export class MyChart extends cdk8s.Chart {
  constructor(scope: Construct, id: string, props: cdk8s.ChartProps = { }) {
    super(scope, id, props);
    
    // TODO: Add your own resources here.

    // Add SelfCleanup to the end of your chart.
    new SelfCleanup(this, 'SelfCleanup');
  }
}

Dependencies (0)

    Dev Dependencies (23)

    Package Sidebar

    Install

    npm i @wheatstalk/cdk8s-self-cleanup

    Weekly Downloads

    1,190

    Version

    0.0.623

    License

    Apache-2.0

    Unpacked Size

    4.1 MB

    Total Files

    15

    Last publish

    Collaborators

    • misterjoshua