Skip to content

Commit e0b3876

Browse files
committed
Update image build dependencies and fix run-on-main workflow
1 parent fd618d5 commit e0b3876

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/run-on-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
# Tier 3: Build and publish images - only after all tests pass
4545
image-build-and-push:
4646
name: Build and Sign Image
47-
# needs: [linting, security-scan, tests, e2e-tests, codegen, operator-ci]
47+
needs: [linting, security-scan, tests, e2e-tests, codegen, operator-ci]
4848
permissions:
4949
contents: write
5050
packages: write

cmd/thv-operator/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ import (
99
"context"
1010
"flag"
1111
"fmt"
12+
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
13+
// to ensure that exec-entrypoint and run can make use of them.
14+
"log/slog"
1215
"os"
1316
"strconv"
1417
"strings"
1518

16-
// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
17-
// to ensure that exec-entrypoint and run can make use of them.
19+
"github.com/go-logr/logr"
1820
"k8s.io/apimachinery/pkg/runtime"
1921
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
2022
clientgoscheme "k8s.io/client-go/kubernetes/scheme"
@@ -24,7 +26,6 @@ import (
2426
"sigs.k8s.io/controller-runtime/pkg/client"
2527
"sigs.k8s.io/controller-runtime/pkg/healthz"
2628
"sigs.k8s.io/controller-runtime/pkg/log"
27-
"sigs.k8s.io/controller-runtime/pkg/log/zap"
2829
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" // Import for metricsserver
2930
"sigs.k8s.io/controller-runtime/pkg/webhook" // Import for webhook
3031

@@ -71,7 +72,8 @@ func main() {
7172

7273
// Initialize the controller-runtime logger. Without this call, controller-runtime
7374
// uses a no-op logger by default and ALL operator log output is silently discarded.
74-
ctrl.SetLogger(zap.New())
75+
// Bridge to slog for consistency with the rest of the ToolHive codebase.
76+
ctrl.SetLogger(logr.FromSlogHandler(slog.Default().Handler()))
7577

7678
options := ctrl.Options{
7779
Scheme: scheme,

0 commit comments

Comments
 (0)