Skip to content

Commit

Permalink
Fix log statement showing version
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Nov 18, 2024
1 parent a691755 commit 41dd286
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21 as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22 as builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module alexellis/registry-creds

go 1.20
go 1.22

require (
github.com/go-logr/logr v1.2.4
Expand Down
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package main

import (
"flag"
"fmt"
"os"

"k8s.io/apimachinery/pkg/runtime"
Expand Down Expand Up @@ -61,6 +62,8 @@ func main() {
z := zap.New(zap.UseDevMode(true)).V(2)
ctrl.SetLogger(z)

fmt.Printf("registry-creds - Copyright Alex Ellis, OpenFaaS Ltd 2024\n\n")

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
Metrics: server.Options{
Expand Down Expand Up @@ -119,7 +122,7 @@ func main() {
}

// +kubebuilder:scaffold:builder
setupLog.Info("starting manager with the version %s and commit %s", Release, SHA)
setupLog.Info("Starting manager", "release", Release, "sha", SHA)
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
Expand Down

0 comments on commit 41dd286

Please sign in to comment.