Merge pull request #241 from sethpollack/secret

add env sources to secrets
This commit is contained in:
Jeff Regan
2018-08-09 13:05:21 -07:00
committed by GitHub
4 changed files with 120 additions and 17 deletions

View File

@@ -115,12 +115,20 @@ type SecretArgs struct {
// keys: "tls.key" and "tls.crt"
Type string `json:"type,omitempty" yaml:"type,omitempty"`
// Map of keys to commands to generate the values
Commands map[string]string `json:",commands,omitempty" yaml:",inline,omitempty"`
// CommandSources for secret.
CommandSources `json:",inline,omitempty" yaml:",inline,omitempty"`
}
// DataSources contains some generic sources for configmap or secret.
// Only one field can be set.
// CommandSources contains some generic sources for secrets.
type CommandSources struct {
// Map of keys to commands to generate the values
Commands map[string]string `json:"commands,omitempty" yaml:"commands,omitempty"`
// EnvCommand to output lines of key=val pairs to create a secret.
// i.e. a Docker .env file or a .ini file.
EnvCommand string `json:"envCommand,omitempty" yaml:"envCommand,omitempty"`
}
// DataSources contains some generic sources for configmaps.
type DataSources struct {
// LiteralSources is a list of literal sources.
// Each literal source should be a key and literal value,