func makeLabels(dbc db.Container, connections []db.Connection) map[string]string { labels := map[string]string{ docker.SchedulerLabelKey: docker.SchedulerLabelValue, } for _, lb := range dbc.Labels { // Add Stitch labels labels[docker.UserLabel(lb)] = docker.LabelTrueValue } return labels }
// AffinityStr is passed to Docker Swarm to implement the LabelRule. func (lr LabelRule) AffinityStr() string { return toAffinity(docker.UserLabel(lr.OtherLabel), !lr.Exclusive, docker.LabelTrueValue) }