Ajay Tripathy 5 лет назад
Родитель
Сommit
f35e8aaea1
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      pkg/cloud/awsprovider.go

+ 14 - 0
pkg/cloud/awsprovider.go

@@ -1110,6 +1110,20 @@ func (aws *AWS) configureAWSAuth() error {
 			return err
 		}
 	}
+	if aws.ServiceAccountChecks == nil {
+		aws.ServiceAccountChecks = make(map[string]*ServiceAccountCheck)
+	}
+	if env.Get(env.AWSAccessKeyIDEnvVar, "") == "" || env.Get(env.AWSAccessKeySecretEnvVar, "") == "" {
+		aws.ServiceAccountChecks["hasKey"] = &ServiceAccountCheck{
+			Message: "ServiceKey exists",
+			Status:  false,
+		}
+	} else {
+		aws.ServiceAccountChecks["hasKey"] = &ServiceAccountCheck{
+			Message: "ServiceKey exists",
+			Status:  true,
+		}
+	}
 	return nil
 }