Git Product home page Git Product logo

ded's Introduction

ded

Grumpy Ded

Helm dependency deduplication post-renderer

Installation

pip install ded

Usage

This program collects all pre-rendered manifests from Helm and post-renders only those unique amongst them.

The uniqueness is determined based on the default or supplied YAML keys. The keys must exist in all of the supplied documents.

Invoke as --post-renderer during helm install/upgrade.

ded determines uniquiness based on values of the kind and metadata.name fields of each manifests. You can specify non-default keys by which the pre-rendered manifests from helm must be deduplicated:

  ded --key metadata.namespace

IMPORTANT: The keys used to determine uniquiness must be present in every manifest or ded will exit with code 1 and helm install or helm upgrade will consequently fail.

Examples

The example below will filter all manifests based on values of kind and metadata.name fields.

helm install release-name your-chart/ --post-renderer ded

So, if there are 2 manifests in your Helm chart release with the same values on these fields, then only one of them will be left.

Manifest A:

apiVersion: v1
kind: ConfigMap
metadata:
  name: foo-cm
data:
  onedata: test

Manifest B:

apiVersion: v1
kind: ConfigMap
metadata:
  name: foo-cm
data:
  twodata: test-test

In the example above only the first occuring manifest will make it to the output of the post-renderer.

Or invoke with a different set of keys:

helm install release-name your-chart/ --post-renderer ded --key metadata.name

More keys:

helm install release-name your-chart/ --post-renderer ded -k metadata.name --k data.onedata

Why ded?

  1. Because it's a shorthand for deduplication
  2. Because "ded" means grandpa in Russian. And I was grumpy as hell when I was trying to deduplicate manifests generated by Helm.
  3. Because dealing with subcharts and dependencies in Helm makes you a little dead inside.

Helm is ❤️

ded's People

Contributors

vduseev avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.