diff --git a/main.go b/main.go index d0d3b159..89cbb5c4 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "github.com/rancher/aks-operator/controller" aksv1 "github.com/rancher/aks-operator/pkg/generated/controllers/aks.cattle.io" + "github.com/rancher/aks-operator/pkg/version" core3 "github.com/rancher/wrangler/v3/pkg/generated/controllers/core" "github.com/rancher/wrangler/v3/pkg/kubeconfig" "github.com/rancher/wrangler/v3/pkg/signals" @@ -36,6 +37,7 @@ func main() { logrus.SetLevel(logrus.DebugLevel) logrus.Debugf("Loglevel set to [%v]", logrus.DebugLevel) } + logrus.Infof("Starting aks-operator (version: %s, commit: %s)", version.Version, version.GitCommit) // This will load the kubeconfig file in a style the same as kubectl cfg, err := kubeconfig.GetNonInteractiveClientConfig(kubeconfigFile).ClientConfig() diff --git a/pkg/version/version.go b/pkg/version/version.go new file mode 100644 index 00000000..5a40ac92 --- /dev/null +++ b/pkg/version/version.go @@ -0,0 +1,6 @@ +package version + +var ( + GitCommit string + Version string +)