Skip to content

Commit

Permalink
Merge pull request moby#23707 from mrjana/vendor
Browse files Browse the repository at this point in the history
Vendoring swarmkit @3f135f206179e
  • Loading branch information
aaronlehmann authored Jun 18, 2016
2 parents 95074b5 + 64a567d commit b014d6a
Show file tree
Hide file tree
Showing 15 changed files with 602 additions and 326 deletions.
9 changes: 5 additions & 4 deletions daemon/cluster/convert/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package convert
import (
"fmt"
"strings"
"time"

"golang.org/x/crypto/bcrypt"

Expand All @@ -26,12 +27,12 @@ func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm {
HeartbeatTick: c.Spec.Raft.HeartbeatTick,
ElectionTick: c.Spec.Raft.ElectionTick,
},
Dispatcher: types.DispatcherConfig{
HeartbeatPeriod: c.Spec.Dispatcher.HeartbeatPeriod,
},
},
}

heartbeatPeriod, _ := ptypes.Duration(c.Spec.Dispatcher.HeartbeatPeriod)
swarm.Spec.Dispatcher.HeartbeatPeriod = uint64(heartbeatPeriod)

swarm.Spec.CAConfig.NodeCertExpiry, _ = ptypes.Duration(c.Spec.CAConfig.NodeCertExpiry)

// Meta
Expand Down Expand Up @@ -76,7 +77,7 @@ func SwarmSpecToGRPCandMerge(s types.Spec, existingSpec *swarmapi.ClusterSpec) (
ElectionTick: s.Raft.ElectionTick,
},
Dispatcher: swarmapi.DispatcherConfig{
HeartbeatPeriod: s.Dispatcher.HeartbeatPeriod,
HeartbeatPeriod: ptypes.DurationProto(time.Duration(s.Dispatcher.HeartbeatPeriod)),
},
CAConfig: swarmapi.CAConfig{
NodeCertExpiry: ptypes.DurationProto(s.CAConfig.NodeCertExpiry),
Expand Down
8 changes: 7 additions & 1 deletion daemon/cluster/executor/container/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ func newContainerAdapter(b executorpkg.Backend, task *api.Task) (*containerAdapt
}

func (c *containerAdapter) pullImage(ctx context.Context) error {
spec := c.container.spec()

// if the image needs to be pulled, the auth config will be retrieved and updated
encodedAuthConfig := c.container.spec().RegistryAuth
var encodedAuthConfig string
if spec.PullOptions != nil {
encodedAuthConfig = spec.PullOptions.RegistryAuth

}

authConfig := &types.AuthConfig{}
if encodedAuthConfig != "" {
Expand Down
2 changes: 1 addition & 1 deletion hack/vendor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ clone git github.com/docker/docker-credential-helpers v0.3.0
clone git github.com/docker/containerd 860f3a94940894ac0a106eff4bd1616a67407ee2

# cluster
clone git github.com/docker/swarmkit 310f1119bc81f22e60b5670d9d4731bc12d7be87
clone git github.com/docker/swarmkit 3f135f206179ea157aeef2d1d401eb795f618da8
clone git github.com/golang/mock bd3c8e81be01eef76d4b503f5e687d2d1354d2d9
clone git github.com/gogo/protobuf 43a2e0b1c32252bfbbdf81f7faa7a88fb3fa4028
clone git github.com/cloudflare/cfssl 92f037e39eb103fb30f9151be40d9ed267fc4ae2
Expand Down
Loading

0 comments on commit b014d6a

Please sign in to comment.