Merge branch '2.0.0' into main

This commit is contained in:
Frikky
2024-05-31 09:40:24 +02:00
committed by GitHub
15 changed files with 750 additions and 333 deletions
+4
View File
@@ -693,6 +693,10 @@ func deployWorker(image string, identifier string, env []string, executionReques
env = append(env, fmt.Sprintf("KUBERNETES_CONFIG=%s", config.String()))
// FIXME: When a service account is used, the account is also mounted in the pod
// The volume mount location is:
// /var/run/secrets/kubernetes.io/serviceaccount
// Look for if there is a default service account in use
if len(os.Getenv("KUBERNETES_SERVICE_ACCOUNT")) > 0 {
log.Printf("[DEBUG] Using Kubernetes service account %s", os.Getenv("KUBERNETES_SERVICE_ACCOUNT"))
+2 -1
View File
@@ -2456,12 +2456,13 @@ func downloadDockerImageBackend(client *http.Client, imageName string) error {
return nil
}
log.Printf("[DEBUG] Trying to download image %s from backend %s as it doesn't exist. All images: %#v", imageName, baseUrl, downloadedImages)
downloadedImages = append(downloadedImages, imageName)
data := fmt.Sprintf(`{"name": "%s"}`, imageName)
dockerImgUrl := fmt.Sprintf("%s/api/v1/get_docker_image", baseUrl)
log.Printf("[DEBUG] Trying to download image %s from backend %s as it doesn't exist. Data sent: %#v, All images: %#v", imageName, baseUrl, data, downloadedImages)
req, err := http.NewRequest(
"POST",