Coder Social home page Coder Social logo

helm-ecr's Introduction

helm-ecr

Helm3 supported License MIT GitHub release

Helm plugin that allows installing Helm charts from Amazon ECR stored as OCI Artifacts.

โš ๏ธ Notice This is not an official plugin and does not use Helm's new experimental API. Main motivation for this plugin was to be able to install charts stored in ECR using existing tools like Flux Helm Operator until better options are available.

Plugin currently supports only Helm v3.

This plugin was motivated by helm-s3 plugin.

Install

Install latest version:

$ helm plugin install https://github.com/vetyy/helm-ecr.git

Install a specific release version:

$ helm plugin install https://github.com/vetyy/helm-ecr.git --version 0.1.2

To use the plugin, you do not need any special dependencies. The installer will download versioned release with prebuilt binary from github releases.

Overview

Plugin provides a new made up protocol registered as ecr://. There are no additional commands provided by the plugin and it integrates only with native Helm commands.

Because ECR repository basically stores only a single chart, but multiple versions, we must provide a chart with a name derived from repository url. We decided to use the last part of the repository url as chart name and all attached image tags will be the chart versions.

Given ecr://aws_account_id.dkr.ecr.region.amazonaws.com/namespace/NAME. The NAME will be the name of the chart. See usage below for more details.

Usage

Add Helm repo:

$ helm repo add my-ecr ecr://aws_account_id.dkr.ecr.region.amazonaws.com/namespace/app
"my-ecr" has been added to your repositories

Discover chart versions:

$ helm search repo my-ecr -l
NAME	                CHART        VERSION	APP VERSION	DESCRIPTION
my-ecr/app	        0.1.1
my-ecr/app	        0.1.0
my-ecr/app	        my-image-tag

Install chart:

$ helm install my-app my-ecr/app

Alternatively you can install chart without adding the Helm repo, but you must specify the version (image tag) as the last part of the chart name.

$ helm install my-app ecr://aws_project_id.dkr.ecr.region.amazonaws.com/namespace/app/0.1.0

Helm Operator

You can also use this plugin with Flux Helm Operator and their Kubernetes CRD HelmRelease.

---
apiVersion: helm.fluxcd.io/v1
kind: HelmRelease
metadata:
  labels:
    app: my-app
  name: my-app
spec:
  chart:
    name: app
    repository: ecr://aws_project_id.dkr.ecr.region.amazonaws.com/namespace/app
    version: 0.1.0
  values:
    some_key: some_value

Uninstall

$ helm plugin remove ecr

Development

On regular plugin installation, helm triggers post-install hook that downloads prebuilt versioned release of the plugin binary and installs it. To disable this behavior, you need to pass HELM_PLUGIN_NO_INSTALL_HOOK=true to the installer:

$ HELM_PLUGIN_NO_INSTALL_HOOK=true helm plugin install https://github.com/vetyy/helm-ecr.git
Development mode: not downloading versioned release.
Installed plugin: ecr

Next, you may want to ensure if you have all prerequisites to build the plugin from source:

cd ~/.helm/plugins/helm-ecr
make deps build

If you see no messages - build was successful. Try to run some helm commands that involve the plugin, or jump straight into plugin development.

License

MIT

helm-ecr's People

Contributors

vetyy avatar

Watchers

James Cloos 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.