Browse Source

Merge pull request #910 from kubecost/master

Master
Ajay Tripathy 4 years ago
parent
commit
6e7cdf0d6b
2 changed files with 5 additions and 2 deletions
  1. 4 1
      pkg/costmodel/promparsers.go
  2. 1 1
      pkg/env/costmodelenv.go

+ 4 - 1
pkg/costmodel/promparsers.go

@@ -48,7 +48,10 @@ func GetPVInfoLocal(cache clustercache.ClusterCache, defaultClusterID string) (m
 		ns := pvc.Namespace
 		pvcName := pvc.Name
 		volumeName := pvc.Spec.VolumeName
-		pvClass := *pvc.Spec.StorageClassName
+		pvClass := ""
+		if pvc.Spec.StorageClassName != nil {
+			pvClass = *pvc.Spec.StorageClassName
+		}
 		clusterID := defaultClusterID
 		key := fmt.Sprintf("%s,%s,%s", ns, pvcName, clusterID)
 		toReturn[key] = &PersistentVolumeClaimData{

+ 1 - 1
pkg/env/costmodelenv.go

@@ -76,7 +76,7 @@ const (
 // GetAWSAccessKeyID returns the environment variable value for AWSAccessKeyIDEnvVar which represents
 // the AWS access key for authentication
 func GetAppVersion() string {
-	return Get(AppVersionEnvVar, "1.85.1")
+	return Get(AppVersionEnvVar, "1.85.2")
 }
 
 // IsEmitNamespaceAnnotationsMetric returns true if cost-model is configured to emit the kube_namespace_annotations metric