feat templater: Add 'pass' lookup function

This introduces support for looking up secret values in the 'pass' command line
tool (https://www.passwordstore.org/).

Values like passwords can be interpolated from pass and even more complex
structures like certificates for Kubernetes Secrets can be retrieved and base64-
encoded as necessary.

Fixes #2
This commit is contained in:
Vincent Ambo 2017-02-09 15:33:03 +01:00
parent 4713d565d3
commit 2f6e008121
3 changed files with 40 additions and 0 deletions

View file

@ -158,6 +158,7 @@ func templateFuncs() template.FuncMap {
b, _ := json.Marshal(data)
return string(b)
}
m["passLookup"] = GetFromPass
return m
}