Răsfoiți Sursa

check version of spot data

AjayTripathy 7 ani în urmă
părinte
comite
3fb8e7c4b5
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      cloud/awsprovider.go

+ 4 - 0
cloud/awsprovider.go

@@ -33,6 +33,7 @@ import (
 
 const awsAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID"
 const awsAccessKeySecretEnvVar = "AWS_SECRET_ACCESS_KEY"
+const supportedSpotFeedVersion = "1"
 
 // AWS represents an Amazon Provider
 type AWS struct {
@@ -790,6 +791,9 @@ func parseSpotData(bucket string, prefix string, projectID string, region string
 					Charge:      st[7],
 					Version:     st[8],
 				}
+				if spot.Version != supportedSpotFeedVersion {
+					klog.V(1).Infof("Possibly unsupported spot data feed version " + spot.Version)
+				}
 				spots[spot.InstanceID] = spot
 			}
 		}