Skip to content

Commit

Permalink
image-root annotation fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Surax98 <[email protected]>
  • Loading branch information
Surax98 committed Jun 5, 2024
1 parent 899f2b6 commit ab203ca
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions pkg/slurm/Create.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"io"
"net/http"
"os"
"strings"

"github.com/containerd/containerd/log"

Expand Down Expand Up @@ -80,14 +79,10 @@ func (h *SidecarHandler) SubmitHandler(w http.ResponseWriter, r *http.Request) {
}

image = container.Image
if strings.HasPrefix(container.Image, "/") {
if image_uri, ok := metadata.Annotations["slurm-job.vk.io/image-root"]; ok {
image = image_uri + container.Image
} else {
log.G(h.Ctx).Info("- image-uri annotation not specified for path in remote filesystem")
}
if image_uri, ok := metadata.Annotations["slurm-job.vk.io/image-root"]; ok {
image = image_uri + container.Image
} else {
image = container.Image
log.G(h.Ctx).Info("- image-uri annotation not specified for path in remote filesystem")
}

log.G(h.Ctx).Debug("-- Appending all commands together...")
Expand Down

0 comments on commit ab203ca

Please sign in to comment.