Configmanager - Package used for retrieving application settings from various sources

Config Manager

Package used for retrieving application settings from various sources.

Currently supported variable and secrets implementations - AWS SecretsManager and AWS ParameterStore.

The Intended use is within containers to generate required application config that can later be sourced and then read by application at start up time so that e.g. K8s secrets don't need to be used for true "secrets" or jsut to avoid overly large configmaps

Must reference an existing token in a path like format.

GenVars will then write them to a file in this format:

export VAR=VALUE
export VAR2=VALUE2
...

Installation

Major platform binaries here

curl -L https://github.com/dnitsch/configmanager/releases/download/v0.3.0/configmanager-`uname -s` -o configmanager
chmod +x configmanager
sudo mv configmanager /usr/local/bin

TODO

  • Go API and GoDoc

  • Ideally should be split into numerous packages for reading vars and creating using the same token reversal

Usage

configmanager --tokens AWSSECRETS#/appxyz/service1-password --tokens AWSPARAMSTR#/appxyz/service1-password
source app.env
./startapp

By default the output path is app.env relative to the exec binary.

This can be overridden by passing in the --path param.

configmanager --token AWSSECRETS#/appxyz/service1-password --token AWSPARAMSTR#/appxyz/service12-settings --path /some/path/app.env
source /some/path/app.env
./startapp # psuedo script to start an application

The token is made up of 3 parts:

  • AWSSECRETS the strategy identifier to choose at runtime

  • # separator - used for

  • /path/to/parameter the actual path to the secret or parameter in the target system e.g. AWS SecretsManager or ParameterStore (it does assume a path like pattern might throw a runtime error if not found)

If contents of the AWSSECRETS#/appxyz/service1-password are a string then service1-password will be the key and converted to UPPERCASE e.g. SERVICE1_PASSWORD=som3V4lue

Help

  • More implementations should be easily added with a specific implementation under the strategy interface

  • maybe run as cron in the background to perform a periodic sync in case values change?

TODO: lots more documentation and UNITTESTS

Similar Resources

This repository provides various utilities to help you build your NFT collection!

Attention! A powerful computer may be required! About This repository provides various utilities to help you build your NFT collection: Generate image

Nov 4, 2022

Gosfdc module - a collection of packages containing the data structures from the various Salesforce APIs and Tools

Gosfdc module - a collection of packages containing the data structures from the various Salesforce APIs and Tools

Jan 21, 2022

Various Dungeons and Dragons Tools. Written in go as an aid to learning the language.

dnd_tools Various Dungeons and Dragons Tools. Written in go as an aid to learning the language. Some tools are generic, while others will target eithe

Jan 28, 2022

This is a demo of various bursavich.dev packages.

Demo This provides a demo of various bursavich.dev packages. See the frontend command for a unified usage example, from which the following sample met

Feb 10, 2022

An application that is developed to generate application by API specification

GO boilerplate is an application that is developed to generate application by API specification and Database schema with the collaboration with opn-generator.

Oct 14, 2021

A reverse-proxy cache for external images used on LinuxFr.org

External images on LinuxFr.org Our users can use images from external domains on LinuxFr.org. This component is a reverse-proxy / cache for these imag

May 14, 2021

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

one-file-pdf - A minimalist PDF generator in 2K lines and 1 file The main idea behind this project was: "How small can I make a PDF generator for it

Dec 11, 2022

Nomad Pack is a templating and packaging tool used with HashiCorp Nomad.

Nomad Pack is a templating and packaging tool used with HashiCorp Nomad.

Jan 4, 2023

Some examples of testing techniques and commonly used frameworks

golang-test-examples Some examples of testing techniques and commonly used frameworks Test frameworks Testify Ginkgo Convey godog (cucumber) Test exam

Oct 29, 2021
Comments
  • Allow for retrieval of specific property from a map like secret/config item

    Allow for retrieval of specific property from a map like secret/config item

    In some cases you want to store a map with a number of config/secret items in it but depending on the implementor you may only want a single value back

    Proposed structure

    AWSPARAMSTR#/nonprod/config/general|property1 or AWSPARAMSTR#/nonprod/config/general|prop1.prop2OfProp1

    Where the | delimeter would be used to dig into the item - this means that people can use . in the actual name of the token and then can also use a JSONPath type expression

    when invoking via the CLI the resulting value can be written into a speficied file in this format

    general|prop1.prop2OfProp1 ==> GENERAL__PROP1_PROP2OFPROP1 where | would become __ and any path separator would be _.

Work with remote images registries - retrieving information, images, signing content

skopeo skopeo is a command line utility that performs various operations on container images and image repositories. skopeo does not require the user

Jan 5, 2023
Simple Golang API to demonstrate file upload to fireabase storage and retrieving url of uploaded file.

go-firebase-storage -Work in progress ??️ Simple Golang API that uses Firebase as its backend to demonstrate various firebase services using Go such a

Oct 4, 2021
World-banks - Go Library for retrieving world banks.

World banks Go Library for retrieving world banks. Quick start To install: go get github.com/pepcep/world-banks Usage There are several ways of utili

Jan 11, 2022
Initiate Chainlink job runs from external sources.

External Initiator Initiate Chainlink job runs from external sources. Installation go install Configuration Environment variables Key Description Exam

Sep 12, 2022
The Bhojpur BSS is a software-as-a-service product used as an Business Support System based on Bhojpur.NET Platform for application delivery.

Bhojpur BSS - Business Support System The Bhojpur BSS is a software-as-a-service product used as an Business Support System based on Bhojpur.NET Platf

Sep 26, 2022
Radiant is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services.

Radiant is used for rapid development of enterprise application in Go, including RESTful APIs, web apps and backend services.

Mar 22, 2022
Easily create & extract archives, and compress & decompress files of various formats

archiver Introducing Archiver 3.1 - a cross-platform, multi-format archive utility and Go library. A powerful and flexible library meets an elegant CL

Jan 7, 2023
Fast conversions across various Go types with a simple API.

Go Package: conv Get: go get -u github.com/cstockton/go-conv Example: // Basic types if got, err := conv.Bool(`TRUE`); err == nil { fmt.Printf("conv.

Nov 29, 2022
Convert various benchmarking formats to benchfmt

benchfmt-convert This repo contains tools for converting various formats to benchfmt for use with benchstat. Most useful is github.com/prattmic/benchf

Sep 17, 2021
Track health of various dependencies - golang

Background This package helps setup health check based on status of external dependencies. The idea is to add all external dependencies like database,

Dec 17, 2021