Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

[WIP] Add support for secrets #671

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcsirot
Copy link
Contributor

@jcsirot jcsirot commented Oct 4, 2019

- What I did
Ensure that secrets defined in the Compose file are correctly handled by Docker App and the CNAB bundle.

- How I did it
TBD

- How to verify it
TBD

- Description for the changelog
TBD

- A picture of a cute animal (not mandatory but encouraged)
hérisson

Signed-off-by: Jean-Christophe Sirot <[email protected]>
@jcsirot jcsirot force-pushed the handle-secrets-secure-params branch from 52ddb49 to c8d3cb0 Compare October 4, 2019 13:17
@@ -108,6 +108,20 @@ func ToCNAB(app *types.App, invocationImageName string) (*bundle.Bundle, error)
Definition: name,
}
}
for name, secret := range app.Secrets() {
writeOnly := new(bool)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the following code is simpler:

writeOnly := true
definitions[internal.SecretsParameterPrefix+name] = &definition.Schema{
	Type:      "string",
	WriteOnly: &writeOnly,
}


// New creates a new empty secret map
func New() Secrets {
return make(map[string]Secret)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: You can also use the defined type return make(Secrets)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants