Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matthewhartstonge/b64secrets

Simple globbing util to transform Opaque k8s Secret yaml files
https://github.com/matthewhartstonge/b64secrets

base64 encoded-secrets go golang k8s kubernetes secret-files secrets yaml

Last synced: 5 days ago
JSON representation

Simple globbing util to transform Opaque k8s Secret yaml files

Awesome Lists containing this project

README

        

# b64secrets
> An extremely simple globbing util to transform k8s Secret definition file values to base64
> encoded secrets ready for upload via kubectl.

I love Infrastructure as Code (IaC). It drove me nuts that k8s secret values in
secret files had to have values in base64 encoding.

This little utility globs recursively with the pattern `./**/*.yml` writing the encoded secrets
to `./**/*.base64.yml` ready for uploading to a k8s cluster via applicable `kubectl` commands.

## Usage
in a given directory containing `*.yml` files, simply run:

```sh
$ b64secrets
INFO[0000] b64secrets is converting secrets.. method=main
INFO[0000] Created conformed secrets file conformedPath="super-secrets-development.base64.yml" method=createSecretsFile originalPath="config\\super-secrets-development.yml"
INFO[0000] Created conformed secrets file conformedPath="/secrets/within/a/folder/finds-love.base64.yml" method=createSecretsFile originalPath="secrets/within/a/folder/finds-love.yml"
INFO[0000] b64secrets file conversions completed! method=main
```