From c14c51b8241225576d728220c77a2f9f40f4e076 Mon Sep 17 00:00:00 2001 From: mayank Date: Wed, 15 Sep 2021 18:02:42 +0530 Subject: [PATCH] chore(analytic): send install event on nfs-provisioner start Signed-off-by: mayank --- provisioner/controller.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/provisioner/controller.go b/provisioner/controller.go index 9bc7363..b3c4c20 100644 --- a/provisioner/controller.go +++ b/provisioner/controller.go @@ -25,6 +25,8 @@ import ( "k8s.io/klog/v2" mKube "github.com/openebs/dynamic-nfs-provisioner/pkg/kubernetes/client" + menv "github.com/openebs/maya/pkg/env/v1alpha1" + analytics "github.com/openebs/maya/pkg/usage" pvController "sigs.k8s.io/sig-storage-lib-external-provisioner/v7/controller" ) @@ -76,6 +78,11 @@ func Start(ctx context.Context) error { //Run the provisioner till a shutdown signal is received. go pc.Run(ctx) + if menv.Truthy(menv.OpenEBSEnableAnalytics) { + analytics.New().Build().InstallBuilder(true).Send() + go analytics.PingCheck() + } + <-ctx.Done() klog.V(4).Info("Provisioner stopped")