Skip to content

Commit

Permalink
feat: debugger image configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
yetone committed Dec 20, 2022
1 parent e28305c commit ec113ce
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api-server/controllers/controllersv1/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"net/http"
"os"
"time"

"github.com/gin-gonic/gin"
Expand Down Expand Up @@ -279,9 +280,14 @@ func (t *WebTerminal) Safe(fn func() error) error {
}

func (t *WebTerminal) HandleDebug(ctx context.Context, cliset *kubernetes.Clientset, restConfig *rest.Config) error {
debuggerImage := "quay.io/bentoml/bento-debugger:0.0.6"
debuggerImage_ := os.Getenv("INTERNAL_IMAGES_DEBUGGER")
if debuggerImage_ != "" {
debuggerImage = debuggerImage_
}
o := DebugOptions{
Args: []string{"bash"},
Image: "quay.io/bentoml/bento-debugger:0.0.5",
Image: debuggerImage,
Interactive: true,
TTY: true,
Namespace: t.pod.Namespace,
Expand Down
2 changes: 2 additions & 0 deletions helm/yatai/templates/secret-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ stringData:
{{- end }}

TRANSMISSION_STRATEGY: {{ .Values.transmissionStrategy | quote }}

INTERNAL_IMAGES_DEBUGGER: {{ .Values.internalImages.debugger | quote }}
3 changes: 3 additions & 0 deletions helm/yatai/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ enableHostTimeZone: false

transmissionStrategy: proxy
doNotTrack: false

internalImages:
debugger: quay.io/bentoml/bento-debugger:0.0.6

0 comments on commit ec113ce

Please sign in to comment.