Explorar o código

check version of spot data

AjayTripathy %!s(int64=7) %!d(string=hai) anos
pai
achega
3fb8e7c4b5
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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
 			}
 		}