more review updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
e077f701db
commit
eff36b7d66
2 changed files with 4 additions and 1 deletions
|
@ -11,11 +11,13 @@ type Secret struct {
|
||||||
SecretSize int64
|
SecretSize int64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SecretSpec represents a secret specification from a secret in swarm
|
||||||
type SecretSpec struct {
|
type SecretSpec struct {
|
||||||
Annotations
|
Annotations
|
||||||
Data []byte
|
Data []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SecretReferenceFileTarget is a file target in a secret reference
|
||||||
type SecretReferenceFileTarget struct {
|
type SecretReferenceFileTarget struct {
|
||||||
Name string
|
Name string
|
||||||
UID string
|
UID string
|
||||||
|
@ -23,6 +25,7 @@ type SecretReferenceFileTarget struct {
|
||||||
Mode os.FileMode
|
Mode os.FileMode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SecretReference is a reference to a secret in swarm
|
||||||
type SecretReference struct {
|
type SecretReference struct {
|
||||||
SecretID string
|
SecretID string
|
||||||
SecretName string
|
SecretName string
|
||||||
|
|
|
@ -223,7 +223,7 @@ func (c *containerAdapter) create(ctx context.Context) error {
|
||||||
return fmt.Errorf("unable to get container from task spec")
|
return fmt.Errorf("unable to get container from task spec")
|
||||||
}
|
}
|
||||||
secrets := make([]*containertypes.ContainerSecret, 0, len(container.Secrets))
|
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)
|
sec := c.secrets.Get(s.SecretID)
|
||||||
if sec == nil {
|
if sec == nil {
|
||||||
logrus.Warnf("unable to get secret %s from provider", s.SecretID)
|
logrus.Warnf("unable to get secret %s from provider", s.SecretID)
|
||||||
|
|
Loading…
Reference in a new issue