Skip to main content

Call child process with custom environment

Project description

envfrom

Kubernetes Secrets or ConfigMap are commonly used to run apps deployed in pods. But what about running this app locally with those same variables ? envfrom meet this need among others.

Installation

pip install envfrom

Usage

usage: envfrom [-h] {cli,dir,kube} ... child

Call child process with custom environment

positional arguments:
  {cli,dir,kube}  env source
    cli           Dict values: FOO=BAR BAR=FOO
    dir           Set environment according to files in a specified path
    kube          Mirror specified kubernetes ressource volume keys (decoded)
  child           child process

optional arguments:
  -h, --help      show this help message and exit

Example

Assuming that you already have the following secret created on your default namespace :

apiVersion: v1
kind: Secret
metadata:
  name: mysecret
type: Opaque
data:
  username: YWRtaW4=

Running :

env -i envfrom kube secrets mysecret env

Should output :

username=admin

Project details


Release history Release notifications

Download files

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

Files for envfrom, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size envfrom-0.0.1-py3-none-any.whl (5.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size envfrom-0.0.1.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page