Skip to main content

Helm dependency deduplication post-renderer

Project description

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 ❤️

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ded-0.1.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

ded-0.1.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file ded-0.1.2.tar.gz.

File metadata

  • Download URL: ded-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.2 CPython/3.7.2 Darwin/19.5.0

File hashes

Hashes for ded-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6db42d706911427e2210befc2a0edaf7eeeba169f7b7a373eb29dfacbe8e0854
MD5 0e5cdc20fc0356a843ae85aee60607c4
BLAKE2b-256 0b551f0d490a15526978a3851e1b2bafbf6140cdbae8c312cceca866a94a610e

See more details on using hashes here.

File details

Details for the file ded-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: ded-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.2 CPython/3.7.2 Darwin/19.5.0

File hashes

Hashes for ded-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1c9208703623e0bad71d046b3f83f49f7726a5062a4404cc2a12a63988113d2
MD5 211619272228926f7a5c6ee921fdf12b
BLAKE2b-256 8b35ddb1c0518f0e734e43e1188e728b35deaa8ac3e5d91e582aec6ed4097705

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page