Skip to content

Conversion tool to assist creating Kubernetes Secrets YAML files by providing dotenv.

License

Notifications You must be signed in to change notification settings

ClockworkNet/envtokube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badge: Supported by Clockwork

envtokube

Conversion tool to assist creating Kubernetes Secrets YAML files by providing dotenv.

How it Works & Usage

envtokube [--namespace=<name>] <input> [output]

  • --namespace= is optional, and will default to the output filename (without file extension)
  • An .env file 'input' is required, as the source of secrets to encode for the YAML output file
  • If 'output' (a YAML file) is not provided, the input filename will be used, with a .yml extension

envtokube sample.env

  • Will convert a sample.env to sample.yml
  • It will auto-set the metadata.name to be 'sample'
  • It will auto-set the metadata.namespace to be 'default'

envtokube sample.env out.yml

  • Will convert sample.env to out.yml
  • It will auto-set the metadata.name to be 'out'
  • It will auto-set the metadata.namespace to be 'default'

envtokube --namespace=hello-world sample.env out.yml

  • Will convert sample.env to out.yml
  • It will auto-set the metadata.name to be 'out'
  • It will set the metadata.namespace to be 'hello-world'

ToDo

  • Reverse, to "decrypt" to an dotenv
  • Inherit namespace, if you're overwriting an existing file
  • Providing a warning if you're overwriting an existing file

Additional Resources

Based on: kube-secrets a helpful utility for dealing with K8s Secretes, huge thanks!

License

About

Conversion tool to assist creating Kubernetes Secrets YAML files by providing dotenv.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages