- return err instead of wrap for update secret
- add omitempty for data in secret spec
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
| ... | ... |
@@ -327,7 +327,7 @@ func (sr *swarmRouter) updateSecret(ctx context.Context, w http.ResponseWriter, |
| 327 | 327 |
|
| 328 | 328 |
id := vars["id"] |
| 329 | 329 |
if err := sr.backend.UpdateSecret(id, version, secret); err != nil {
|
| 330 |
- return errors.NewErrorWithStatusCode(err, http.StatusInternalServerError) |
|
| 330 |
+ return err |
|
| 331 | 331 |
} |
| 332 | 332 |
|
| 333 | 333 |
return nil |
| ... | ... |
@@ -14,7 +14,7 @@ type Secret struct {
|
| 14 | 14 |
// SecretSpec represents a secret specification from a secret in swarm |
| 15 | 15 |
type SecretSpec struct {
|
| 16 | 16 |
Annotations |
| 17 |
- Data []byte |
|
| 17 |
+ Data []byte `json:",omitempty"` |
|
| 18 | 18 |
} |
| 19 | 19 |
|
| 20 | 20 |
// SecretReferenceFileTarget is a file target in a secret reference |
| ... | ... |
@@ -585,7 +585,6 @@ func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
|
| 585 | 585 |
flags.BoolVar(&opts.healthcheck.noHealthcheck, flagNoHealthcheck, false, "Disable any container-specified HEALTHCHECK") |
| 586 | 586 |
|
| 587 | 587 |
flags.BoolVarP(&opts.tty, flagTTY, "t", false, "Allocate a pseudo-TTY") |
| 588 |
- flags.StringSliceVar(&opts.secrets, flagSecret, []string{}, "Specify secrets to expose to the service")
|
|
| 589 | 588 |
} |
| 590 | 589 |
|
| 591 | 590 |
const ( |
| ... | ... |
@@ -18,9 +18,9 @@ import ( |
| 18 | 18 |
"github.com/docker/docker/container" |
| 19 | 19 |
"github.com/docker/docker/daemon/links" |
| 20 | 20 |
"github.com/docker/docker/pkg/idtools" |
| 21 |
+ "github.com/docker/docker/pkg/mount" |
|
| 21 | 22 |
"github.com/docker/docker/pkg/stringid" |
| 22 | 23 |
"github.com/docker/docker/runconfig" |
| 23 |
- "github.com/docker/engine-api/types/mount" |
|
| 24 | 24 |
"github.com/docker/libnetwork" |
| 25 | 25 |
"github.com/opencontainers/runc/libcontainer/configs" |
| 26 | 26 |
"github.com/opencontainers/runc/libcontainer/devices" |