Code Monkey home page Code Monkey logo

helm-gsm's Introduction

helm-gsm

Based on helm-secrets, but I needed Google Secret Manager instead of sops, and I didn't want to install sops if I didn't need it.

Dependencies & Platforms

No dependencies, but only supports darwin_amd64 and linux_amd64 because that's all I needed. It would be trivial to compile for additional platforms if needed.

Installation

helm plugin install https://github.com/dronedeploy/helm-gsm.git --version v0.4.2

Usage

Takes a prepared yaml, grabs the plaintext secret from Google Secret Manager, and creates a decrypted file with b64 encoded plaintext secrets. By default it looks for secrets.yaml in the current directory and outputs secrets.yaml.dec in the current directory.

helm gsm
or
helm gsm -f path/to/secrets.yaml

Or alternatively use inline as a protocol handler - eg.

helm template -f gsm://path/to/secrets.yaml .

The secrets file needs to have a very specific format:

secrets:
  first_secret: gsm:my-project/super_secret/1
  second_secret: gsm:my-other-project/other_secret/3
  ...

The keys can be any valid Helm value key, and the encrypted string can be any value that GSM accepts, but the format for the reference value needs to be specific:

Secret reference format:
gsm:project_id/secret_name/version

From Google's API Documentation:
project_id: "The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited." 
secret_name: "Secret names can only contain English letters (A-Z), numbers (0-9), dashes (-), and underscores (_)"
version: Versions are a monotonically increasing integer starting at 1.

Regex:
^gsm:[a-z][a-z0-9-]{4,28}[a-z0-9]\/[a-zA-Z0-9_-]+\/[1-9]?[0-9]+$

Other Notes

It's recommended that you add *.dec to your .gitignore file.

helm-gsm's People

Contributors

adarinne avatar astropuffin avatar gdhagger avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.