Skip to content

Create env variables, by importing files from a folder, mounted using servicebindings

License

Notifications You must be signed in to change notification settings

rhjensen79/files2env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files2Env

Table of Contents

About

Golang module, that imports all files in a folder, and assigns the names and value, as env variables.

Usecase is Kubernetes Service Bindings, where the secrets, are attached to the container, as files.

This allows you to easy extract the secrets, and map them as env variables, to be used in your code.

Installing

Run the following to install the package

go get github.com/rhjensen79/files2env@v0.7.7

Usage

The following example, shows how to import secrets, from a ./secrets folder

package main

import (
 "github.com/rhjensen79/files2env"
)

func main() {
 files2env.Import("./secrets")
}

Collaboration

If you find issues, then feel free to create and issue, or help with making the code better.

About

Create env variables, by importing files from a folder, mounted using servicebindings

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages