Skip to content

Commit a1ec56a

Browse files
authored
Merge pull request #8919 from sbueringer/pr-tilt-fixes
🐛 tilt: set CR logger in tilt-prepare, fix allowed contexts
2 parents 4920e6e + aa18c06 commit a1ec56a

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

Tiltfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,8 @@ kubectl_cmd = "kubectl"
66
default_build_engine = "docker"
77
kubernetes_version = "v1.27.3"
88

9-
if str(local("command -v " + kubectl_cmd + " || true", quiet = True)) == "":
10-
fail("Required command '" + kubectl_cmd + "' not found in PATH")
11-
129
load("ext://uibutton", "cmd_button", "location", "text_input")
1310

14-
# detect if docker images should be built using podman
15-
if "Podman Engine" in str(local("docker version || podman version", quiet = True)):
16-
default_build_engine = "podman"
17-
1811
# set defaults
1912
version_settings(True, ">=0.30.8")
2013

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

3730
allow_k8s_contexts(settings.get("allowed_contexts"))
3831

32+
if str(local("command -v " + kubectl_cmd + " || true", quiet = True)) == "":
33+
fail("Required command '" + kubectl_cmd + "' not found in PATH")
34+
35+
# detect if docker images should be built using podman
36+
if "Podman Engine" in str(local("docker version || podman version", quiet = True)):
37+
default_build_engine = "podman"
38+
3939
os_name = str(local("go env GOOS")).rstrip("\n")
4040
os_arch = str(local("go env GOARCH")).rstrip("\n")
4141

hack/tools/tilt-prepare/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ func main() {
157157
// This makes it easier to see what clusterctl is doing and to debug it.
158158
logf.SetLogger(logf.NewLogger(logf.WithThreshold(pointer.Int(5))))
159159

160+
// Set controller-runtime logger as well.
161+
ctrl.SetLogger(klog.Background())
162+
160163
klog.Infof("[main] started\n")
161164
start := time.Now()
162165

0 commit comments

Comments
 (0)