Skip to content

Commit

Permalink
Merge pull request #8919 from sbueringer/pr-tilt-fixes
Browse files Browse the repository at this point in the history
🐛 tilt: set CR logger in tilt-prepare, fix allowed contexts
  • Loading branch information
k8s-ci-robot committed Jun 26, 2023
2 parents 4920e6e + aa18c06 commit a1ec56a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,8 @@ kubectl_cmd = "kubectl"
default_build_engine = "docker"
kubernetes_version = "v1.27.3"

if str(local("command -v " + kubectl_cmd + " || true", quiet = True)) == "":
fail("Required command '" + kubectl_cmd + "' not found in PATH")

load("ext://uibutton", "cmd_button", "location", "text_input")

# detect if docker images should be built using podman
if "Podman Engine" in str(local("docker version || podman version", quiet = True)):
default_build_engine = "podman"

# set defaults
version_settings(True, ">=0.30.8")

Expand All @@ -36,6 +29,13 @@ os.putenv("CAPI_KIND_CLUSTER_NAME", settings.get("kind_cluster_name"))

allow_k8s_contexts(settings.get("allowed_contexts"))

if str(local("command -v " + kubectl_cmd + " || true", quiet = True)) == "":
fail("Required command '" + kubectl_cmd + "' not found in PATH")

# detect if docker images should be built using podman
if "Podman Engine" in str(local("docker version || podman version", quiet = True)):
default_build_engine = "podman"

os_name = str(local("go env GOOS")).rstrip("\n")
os_arch = str(local("go env GOARCH")).rstrip("\n")

Expand Down
3 changes: 3 additions & 0 deletions hack/tools/tilt-prepare/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ func main() {
// This makes it easier to see what clusterctl is doing and to debug it.
logf.SetLogger(logf.NewLogger(logf.WithThreshold(pointer.Int(5))))

// Set controller-runtime logger as well.
ctrl.SetLogger(klog.Background())

klog.Infof("[main] started\n")
start := time.Now()

Expand Down

0 comments on commit a1ec56a

Please sign in to comment.