Made orborus use latest shuffle-shared to get SHUFFLE_INTERNAL_HTTP_PROXY utilized. This is still missing for the SDK
This commit is contained in:
@@ -9,7 +9,7 @@ require (
|
||||
github.com/mackerelio/go-osstat v0.2.3
|
||||
github.com/satori/go.uuid v1.2.0
|
||||
github.com/shirou/gopsutil v3.21.11+incompatible
|
||||
github.com/shuffle/shuffle-shared v0.4.62
|
||||
github.com/shuffle/shuffle-shared v0.4.86
|
||||
k8s.io/api v0.28.1
|
||||
k8s.io/apimachinery v0.28.1
|
||||
k8s.io/client-go v0.28.1
|
||||
|
||||
@@ -272,6 +272,8 @@ github.com/shuffle/shuffle-shared v0.4.59 h1:5Sv8aorgQJFZr3cCKltfycdXzp9v5zlF2l3
|
||||
github.com/shuffle/shuffle-shared v0.4.59/go.mod h1:X613gbo0dT3fnYvXDRwjQZyLC+T49T2nSQOrCV5QMlI=
|
||||
github.com/shuffle/shuffle-shared v0.4.62 h1:L76zWCD/7gIBuhr3feWZwzT4I8VCiLRd8ZAub/3EiO0=
|
||||
github.com/shuffle/shuffle-shared v0.4.62/go.mod h1:X613gbo0dT3fnYvXDRwjQZyLC+T49T2nSQOrCV5QMlI=
|
||||
github.com/shuffle/shuffle-shared v0.4.86 h1:QrFx3j+maUgeU/dP48WMx+NBcWdwe3Ov2yKlLUUZRHw=
|
||||
github.com/shuffle/shuffle-shared v0.4.86/go.mod h1:X613gbo0dT3fnYvXDRwjQZyLC+T49T2nSQOrCV5QMlI=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0=
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
|
||||
@@ -556,6 +556,23 @@ func deployServiceWorkers(image string) {
|
||||
}
|
||||
}
|
||||
|
||||
// Look for SHUFFLE_VOLUME_BINDS
|
||||
if len(os.Getenv("SHUFFLE_VOLUME_BINDS")) > 0 {
|
||||
serviceSpec.TaskTemplate.ContainerSpec.Env = append(serviceSpec.TaskTemplate.ContainerSpec.Env, fmt.Sprintf("SHUFFLE_VOLUME_BINDS=%s", os.Getenv("SHUFFLE_VOLUME_BINDS")))
|
||||
}
|
||||
|
||||
overrideHttpProxy := os.Getenv("SHUFFLE_INTERNAL_HTTP_PROXY")
|
||||
overrideHttpsProxy := os.Getenv("SHUFFLE_INTERNAL_HTTPS_PROXY")
|
||||
if len(overrideHttpProxy) > 0 {
|
||||
log.Printf("[DEBUG] Added internal proxy: %s", overrideHttpProxy)
|
||||
serviceSpec.TaskTemplate.ContainerSpec.Env = append(serviceSpec.TaskTemplate.ContainerSpec.Env, fmt.Sprintf("SHUFFLE_INTERNAL_HTTP_PROXY=%s", overrideHttpProxy))
|
||||
}
|
||||
|
||||
if len(overrideHttpsProxy) > 0 {
|
||||
log.Printf("[DEBUG] Added internal proxy: %s", overrideHttpsProxy)
|
||||
serviceSpec.TaskTemplate.ContainerSpec.Env = append(serviceSpec.TaskTemplate.ContainerSpec.Env, fmt.Sprintf("SHUFFLE_INTERNAL_HTTPS_PROXY=%s", overrideHttpsProxy))
|
||||
}
|
||||
|
||||
serviceOptions := types.ServiceCreateOptions{}
|
||||
_, err = dockercli.ServiceCreate(
|
||||
ctx,
|
||||
@@ -1574,6 +1591,25 @@ func main() {
|
||||
env = append(env, fmt.Sprintf("SHUFFLE_DEBUG_MEMORY=%s", os.Getenv("SHUFFLE_DEBUG_MEMORY")))
|
||||
}
|
||||
|
||||
// Look for volume binds
|
||||
if len(os.Getenv("SHUFFLE_VOLUME_BINDS")) > 0 {
|
||||
log.Printf("[DEBUG] Added volume binds: %s", os.Getenv("SHUFFLE_VOLUME_BINDS"))
|
||||
env = append(env, fmt.Sprintf("SHUFFLE_VOLUME_BINDS=%s", os.Getenv("SHUFFLE_VOLUME_BINDS")))
|
||||
}
|
||||
|
||||
// Setting up internal proxy config for Shuffle -> shuffle comms
|
||||
overrideHttpProxy := os.Getenv("SHUFFLE_INTERNAL_HTTP_PROXY")
|
||||
overrideHttpsProxy := os.Getenv("SHUFFLE_INTERNAL_HTTPS_PROXY")
|
||||
if len(overrideHttpProxy) > 0 {
|
||||
log.Printf("[DEBUG] Added internal proxy: %s", overrideHttpProxy)
|
||||
env = append(env, fmt.Sprintf("HTTP_PROXY=%s", overrideHttpProxy))
|
||||
}
|
||||
|
||||
if len(overrideHttpsProxy) > 0 {
|
||||
log.Printf("[DEBUG] Added internal proxy: %s", overrideHttpsProxy)
|
||||
env = append(env, fmt.Sprintf("HTTPS_PROXY=%s", overrideHttpsProxy))
|
||||
}
|
||||
|
||||
err = deployWorker(workerImage, containerName, env, execution)
|
||||
zombiecounter += 1
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user