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 like envdir or .env.
Installation
pip install envfrom
Usage
usage: envfrom [-h] {cli,dir,dotenv,kube,vault} ... child
Call child process with custom environment
positional arguments:
{cli,dir,kube,vault} env source
cli Dict values: FOO=BAR BAR=FOO
dir Set environment according to files in a specified path
dotenv Set environment according to .env file
kube Mirror specified kubernetes ressource volume keys (decoded)
vault Fetch secrets from Vault paths
child child process
optional arguments:
-h, --help show this help message and exit
Kubernetes secrets 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
Metadata
Release files for envfrom 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| envfrom-0.2.1.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| envfrom-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / envfrom-0.2.1.tar.gz
| Download URL | envfrom-0.2.1.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0377580ec209bf6af4263e04db7676099448afb5640987e43512c94659f26c80
|
|
BLAKE2b-256 checksum How to use checksums |
e68a1ec754e97c615925ad643cb5c71cb1b5bb9a4c17718054d700035638ed3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
|
Release files / envfrom-0.2.1-py3-none-any.whl
| Download URL | envfrom-0.2.1-py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9eeecf4696c8bbab10c7e305367b2b6fba07624a57c5a47fbfac14705886fe8c
|
|
BLAKE2b-256 checksum How to use checksums |
96fcc580c379efe1007aacd205dc6d44e4017124e0dd644004730542f91e27a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7
|