Made sure SHUFFLE_BASE_IMAGE_REGISTRY is passed for k8s, and that registry/basepath/imagename:version now works
This commit is contained in:
@@ -404,6 +404,8 @@ func deployk8sApp(image string, identifier string, env []string) error {
|
||||
kubernetesNamespace = "default"
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Deploying k8s app with identifier %s to namespace %s", identifier, kubernetesNamespace)
|
||||
|
||||
deployport, err := strconv.Atoi(os.Getenv("SHUFFLE_APP_EXPOSED_PORT"))
|
||||
if err != nil {
|
||||
deployport = 80
|
||||
@@ -866,6 +868,11 @@ func deployApp(cli *dockerclient.Client, image string, identifier string, env []
|
||||
} else {
|
||||
// ** STARTREMOVE ***/
|
||||
exposedPort = 80
|
||||
deployport, err := strconv.Atoi(os.Getenv("SHUFFLE_APP_EXPOSED_PORT"))
|
||||
if err == nil {
|
||||
exposedPort = deployport
|
||||
}
|
||||
|
||||
err = findAppInfoKubernetes(image, appName, env)
|
||||
if err != nil {
|
||||
log.Printf("[ERROR] Failed finding and creating port for %s: %s", appName, err)
|
||||
@@ -1432,6 +1439,16 @@ func handleExecutionResult(workflowExecution shuffle.WorkflowExecution) {
|
||||
imageName = strings.ReplaceAll(imageName, " ", "-")
|
||||
}
|
||||
|
||||
// Kubernetes specific.
|
||||
// Should it be though?
|
||||
if isKubernetes == "true" {
|
||||
// Map it to:
|
||||
// <registry>/baseimagename/<appname>:<appversion>
|
||||
if len(localRegistry) > 0 && len(os.Getenv("SHUFFLE_BASE_IMAGE_REGISTRY")) > 0 {
|
||||
imageName = fmt.Sprintf("%s/%s/%s:%s", os.Getenv("SHUFFLE_BASE_IMAGE_REGISTRY"), baseimagename, parsedAppname, action.AppVersion)
|
||||
}
|
||||
}
|
||||
|
||||
askOtherWorkersToDownloadImage(imageName)
|
||||
|
||||
// Added UUID to identifier just in case
|
||||
|
||||
Reference in New Issue
Block a user