mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-16 07:36:04 +00:00
Disable version check for devs (#522)
This commit is contained in:
parent
1ef3778051
commit
005f000ef6
@ -14,6 +14,8 @@ var (
|
|||||||
DaemonModePersistentVolumeSizeBufferBytes = int64(500 * 1000 * 1000) //500mb
|
DaemonModePersistentVolumeSizeBufferBytes = int64(500 * 1000 * 1000) //500mb
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const DEVENVVAR = "MIZU_DISABLE_TELEMTRY"
|
||||||
|
|
||||||
func GetMizuFolderPath() string {
|
func GetMizuFolderPath() string {
|
||||||
home, homeDirErr := os.UserHomeDir()
|
home, homeDirErr := os.UserHomeDir()
|
||||||
if homeDirErr != nil {
|
if homeDirErr != nil {
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
@ -39,6 +40,10 @@ func CheckVersionCompatibility(apiServerProvider *apiserver.Provider) (bool, err
|
|||||||
}
|
}
|
||||||
|
|
||||||
func CheckNewerVersion(versionChan chan string) {
|
func CheckNewerVersion(versionChan chan string) {
|
||||||
|
if _, present := os.LookupEnv(mizu.DEVENVVAR); present {
|
||||||
|
versionChan <- ""
|
||||||
|
return
|
||||||
|
}
|
||||||
logger.Log.Debugf("Checking for newer version...")
|
logger.Log.Debugf("Checking for newer version...")
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
client := github.NewClient(nil)
|
client := github.NewClient(nil)
|
||||||
|
@ -63,7 +63,7 @@ func ReportAPICalls(apiProvider *apiserver.Provider) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func shouldRunTelemetry() bool {
|
func shouldRunTelemetry() bool {
|
||||||
if _, present := os.LookupEnv("MIZU_DISABLE_TELEMTRY"); present {
|
if _, present := os.LookupEnv(mizu.DEVENVVAR); present {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if !config.Config.Telemetry {
|
if !config.Config.Telemetry {
|
||||||
|
Loading…
Reference in New Issue
Block a user