Explorar el Código

Remove APP_VERSION env var, update usage to version.FriendlyVersion() on error reporting

Signed-off-by: Matt Bolt <mbolt35@gmail.com>
Matt Bolt hace 3 años
padre
commit
af1e4db428
Se han modificado 2 ficheros con 1 adiciones y 9 borrados
  1. 1 1
      pkg/costmodel/router.go
  2. 0 8
      pkg/env/costmodelenv.go

+ 1 - 1
pkg/costmodel/router.go

@@ -1482,7 +1482,7 @@ func Initialize(additionalConfigWatchers ...*watcher.ConfigMapWatcher) *Accesses
 
 	var err error
 	if errorReportingEnabled {
-		err = sentry.Init(sentry.ClientOptions{Release: env.GetAppVersion()})
+		err = sentry.Init(sentry.ClientOptions{Release: version.FriendlyVersion()})
 		if err != nil {
 			log.Infof("Failed to initialize sentry for error reporting")
 		} else {

+ 0 - 8
pkg/env/costmodelenv.go

@@ -10,8 +10,6 @@ import (
 )
 
 const (
-	AppVersionEnvVar = "APP_VERSION"
-
 	AWSAccessKeyIDEnvVar     = "AWS_ACCESS_KEY_ID"
 	AWSAccessKeySecretEnvVar = "AWS_SECRET_ACCESS_KEY"
 	AWSClusterIDEnvVar       = "AWS_CLUSTER_ID"
@@ -171,12 +169,6 @@ func GetMetricsConfigmapName() string {
 	return Get(MetricsConfigmapName, "metrics-config")
 }
 
-// GetAWSAccessKeyID returns the environment variable value for AWSAccessKeyIDEnvVar which represents
-// the AWS access key for authentication
-func GetAppVersion() string {
-	return Get(AppVersionEnvVar, "1.91.0-rc.0")
-}
-
 // IsEmitNamespaceAnnotationsMetric returns true if cost-model is configured to emit the kube_namespace_annotations metric
 // containing the namespace annotations
 func IsEmitNamespaceAnnotationsMetric() bool {