Skip to content

Commit 8e37a8c

Browse files
committed
feat: show kubectl context by default on startup
Fixes #6861
1 parent 95531aa commit 8e37a8c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/skaffold/runner/runcontext/context.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/config"
2929
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/constants"
3030
kubectx "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/kubernetes/context"
31+
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/output"
3132
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/output/log"
3233
"github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/latest"
3334
schemaUtil "github.com/GoogleContainerTools/skaffold/v2/pkg/skaffold/schema/util"
@@ -403,7 +404,7 @@ func GetRunContext(ctx context.Context, opts config.SkaffoldOptions, configs []s
403404
return nil, fmt.Errorf("getting current cluster context: %w", err)
404405
}
405406
kubeContext := kubeConfig.CurrentContext
406-
log.Entry(context.TODO()).Infof("Using kubectl context: %s", kubeContext)
407+
output.Default.Fprintf(os.Stdout, "Using kubectl context: %s\n", kubeContext)
407408

408409
// TODO(dgageot): this should be the folder containing skaffold.yaml. Should also be moved elsewhere.
409410
cwd, err := os.Getwd()

0 commit comments

Comments
 (0)