Socket
Socket
Sign inDemoInstall

github.com/belimawr/kubernetes-envvar

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/belimawr/kubernetes-envvar

kubernetes-envvar is a cli application to export the environment variables from Kubernetes' deployment.yamal. kubernetes-envvar reads and exports the environment variables in Kubernetes' deployment.yaml and them and runs a command in the "new" environment Usage: Arguments:


Version published

Readme

Source

Kubernetes-envvar

Build Status Coverage Status GoDoc Go Report Card

Small cli application to read environment variables from Kubernetes' deployment.yaml, export them and run a command in the "new" environment

This is a WORK IN PROGRESS!!!

Motivation

I've been using Kubernetes for a while now and using environment variables to configure my applications and each environment (staging, production, etc) has got its own deployment.yaml and when the number of environment variables grows past two it gets annoying to run an application locally pointing to a different environment (e.g. staging).

So I decided to write this wee tool to do the "monkey job" of reading the deployment.yaml and exporting the environment variables

Usage

$ ./kubernetes-envvar <type: d|t> <filepath> <command and args>

Arguments:

  • Type: It's either t or d depending on the structure of the yaml file.
  • Filepath: Is the path to the Kubernetes' deployment.yaml
  • Command: Is the command and it's args.

TODO

  • Remove ugly workaround helm templates
  • Parse/replace environment variables on the command and it's arguments
  • Parse deployment.yaml in a more generic way
  • Review the logging/debug messages
  • Return the return code of the command run

Licence

GPLv3

FAQs

Last updated on 25 Dec 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc