mount certs to each workers
This commit is contained in:
@@ -104,6 +104,8 @@ var memcached = os.Getenv("SHUFFLE_MEMCACHED")
|
|||||||
var tenzirUrl = os.Getenv("SHUFFLE_TENZIR_URL")
|
var tenzirUrl = os.Getenv("SHUFFLE_TENZIR_URL")
|
||||||
var apiKey = os.Getenv("AUTH_FOR_ORBORUS")
|
var apiKey = os.Getenv("AUTH_FOR_ORBORUS")
|
||||||
|
|
||||||
|
var certPath = os.Getenv("SHUFFLE_CERT_DIR")
|
||||||
|
|
||||||
var executionIds = []string{}
|
var executionIds = []string{}
|
||||||
var namespacemade = false // For K8s
|
var namespacemade = false // For K8s
|
||||||
|
|
||||||
@@ -1151,6 +1153,18 @@ func deployWorker(image string, identifier string, env []string, executionReques
|
|||||||
Resources: container.Resources{},
|
Resources: container.Resources{},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_, err := os.ReadDir(certPath)
|
||||||
|
|
||||||
|
if certPath != "" && err == nil {
|
||||||
|
certVol := mount.Mount{
|
||||||
|
Type: mount.TypeBind,
|
||||||
|
Source: certPath,
|
||||||
|
Target: "/certs",
|
||||||
|
}
|
||||||
|
|
||||||
|
hostConfig.Mounts = append(hostConfig.Mounts, certVol)
|
||||||
|
}
|
||||||
|
|
||||||
if len(os.Getenv("DOCKER_HOST")) == 0 {
|
if len(os.Getenv("DOCKER_HOST")) == 0 {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`}
|
hostConfig.Binds = []string{`\\.\pipe\docker_engine:\\.\pipe\docker_engine`}
|
||||||
|
|||||||
Reference in New Issue
Block a user