1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

more review updates

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2016-11-03 22:42:30 -04:00
parent e077f701db
commit eff36b7d66
2 changed files with 4 additions and 1 deletions

View file

@ -11,11 +11,13 @@ type Secret struct {
SecretSize int64
}
// SecretSpec represents a secret specification from a secret in swarm
type SecretSpec struct {
Annotations
Data []byte
}
// SecretReferenceFileTarget is a file target in a secret reference
type SecretReferenceFileTarget struct {
Name string
UID string
@ -23,6 +25,7 @@ type SecretReferenceFileTarget struct {
Mode os.FileMode
}
// SecretReference is a reference to a secret in swarm
type SecretReference struct {
SecretID string
SecretName string

View file

@ -223,7 +223,7 @@ func (c *containerAdapter) create(ctx context.Context) error {
return fmt.Errorf("unable to get container from task spec")
}
secrets := make([]*containertypes.ContainerSecret, 0, len(container.Secrets))
for _, s := range c.container.task.Spec.GetContainer().Secrets {
for _, s := range container.Secrets {
sec := c.secrets.Get(s.SecretID)
if sec == nil {
logrus.Warnf("unable to get secret %s from provider", s.SecretID)