Skip to content

Commit

Permalink
chore(analytic): send install event on nfs-provisioner start
Browse files Browse the repository at this point in the history
Signed-off-by: mayank <[email protected]>
  • Loading branch information
mayank authored and kmova committed Sep 15, 2021
1 parent 23d4176 commit c14c51b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions provisioner/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit c14c51b

Please sign in to comment.