Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
| ... | ... |
@@ -11,11 +11,13 @@ type Secret struct {
|
| 11 | 11 |
SecretSize int64 |
| 12 | 12 |
} |
| 13 | 13 |
|
| 14 |
+// SecretSpec represents a secret specification from a secret in swarm |
|
| 14 | 15 |
type SecretSpec struct {
|
| 15 | 16 |
Annotations |
| 16 | 17 |
Data []byte |
| 17 | 18 |
} |
| 18 | 19 |
|
| 20 |
+// SecretReferenceFileTarget is a file target in a secret reference |
|
| 19 | 21 |
type SecretReferenceFileTarget struct {
|
| 20 | 22 |
Name string |
| 21 | 23 |
UID string |
| ... | ... |
@@ -23,6 +25,7 @@ type SecretReferenceFileTarget struct {
|
| 23 | 23 |
Mode os.FileMode |
| 24 | 24 |
} |
| 25 | 25 |
|
| 26 |
+// SecretReference is a reference to a secret in swarm |
|
| 26 | 27 |
type SecretReference struct {
|
| 27 | 28 |
SecretID string |
| 28 | 29 |
SecretName string |
| ... | ... |
@@ -223,7 +223,7 @@ func (c *containerAdapter) create(ctx context.Context) error {
|
| 223 | 223 |
return fmt.Errorf("unable to get container from task spec")
|
| 224 | 224 |
} |
| 225 | 225 |
secrets := make([]*containertypes.ContainerSecret, 0, len(container.Secrets)) |
| 226 |
- for _, s := range c.container.task.Spec.GetContainer().Secrets {
|
|
| 226 |
+ for _, s := range container.Secrets {
|
|
| 227 | 227 |
sec := c.secrets.Get(s.SecretID) |
| 228 | 228 |
if sec == nil {
|
| 229 | 229 |
logrus.Warnf("unable to get secret %s from provider", s.SecretID)
|