fix: use dockerhub on override variable
This commit is contained in:
@@ -69,6 +69,10 @@ IS_KUBERNETES=false
|
|||||||
SHUFFLE_BASE_IMAGE_REPOSITORY=frikky
|
SHUFFLE_BASE_IMAGE_REPOSITORY=frikky
|
||||||
#SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-1.4.0"
|
#SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-1.4.0"
|
||||||
|
|
||||||
|
# For environments using their own docker registry
|
||||||
|
# where they don't want to update http, subflow and shuffle tools again
|
||||||
|
SHUFFLE_USE_DOCKERHUB_FOR_AUTODEPLOY=true
|
||||||
|
|
||||||
# The eth0 interface inside a container corresponds
|
# The eth0 interface inside a container corresponds
|
||||||
# to the virtual Ethernet interface that connects
|
# to the virtual Ethernet interface that connects
|
||||||
# the container to the docker0
|
# the container to the docker0
|
||||||
|
|||||||
@@ -966,6 +966,10 @@ func deployK8sWorker(image string, identifier string, env []string) error {
|
|||||||
env = append(env, fmt.Sprintf("REGISTRY_URL=%s", os.Getenv("REGISTRY_URL")))
|
env = append(env, fmt.Sprintf("REGISTRY_URL=%s", os.Getenv("REGISTRY_URL")))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(os.Getenv("SHUFFLE_USE_DOCKERHUB_FOR_AUTODEPLOY")) > 0 {
|
||||||
|
env = append(env, fmt.Sprintf("SHUFFLE_USE_DOCKERHUB_FOR_AUTODEPLOY=%s", os.Getenv("SHUFFLE_USE_DOCKERHUB_FOR_AUTODEPLOY")))
|
||||||
|
}
|
||||||
|
|
||||||
clientset, _, err := shuffle.GetKubernetesClient()
|
clientset, _, err := shuffle.GetKubernetesClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] Error getting kubernetes client:", err)
|
log.Printf("[ERROR] Error getting kubernetes client:", err)
|
||||||
|
|||||||
@@ -429,16 +429,19 @@ func deployk8sApp(image string, identifier string, env []string) error {
|
|||||||
// that is equal to the image being deployed.
|
// that is equal to the image being deployed.
|
||||||
for _, value := range autoDeploy {
|
for _, value := range autoDeploy {
|
||||||
if value == image {
|
if value == image {
|
||||||
log.Printf("[DEBUG] Detected baseDeploy image. Resorting to not using the registry")
|
|
||||||
baseDeployMode = true
|
baseDeployMode = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
autoDeployOverride := os.Getenv("SHUFFLE_USE_DOCKERHUB_FOR_AUTODEPLOY") == "true"
|
||||||
|
|
||||||
localRegistry := ""
|
localRegistry := ""
|
||||||
|
|
||||||
// Checking if app is generated or not
|
// Checking if app is generated or not
|
||||||
if !baseDeployMode {
|
if !baseDeployMode && !autoDeployOverride {
|
||||||
localRegistry := os.Getenv("REGISTRY_URL")
|
localRegistry := os.Getenv("REGISTRY_URL")
|
||||||
|
} else {
|
||||||
|
log.Printf("[DEBUG] Detected baseDeploy image (%s) and dockerhub override. Resorting to using dockerhub instead of registry", image)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user