diff --git a/main.go b/main.go index 7bab325d..a2a385ee 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/v2/pkg/generated/controllers/core" "github.com/rancher/wrangler/v2/pkg/kubeconfig" "github.com/rancher/wrangler/v2/pkg/signals" @@ -30,6 +31,8 @@ func main() { // set up signals so we handle the first shutdown signal gracefully ctx := signals.SetupSignalContext() + 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() if err != nil { 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 +)