Răsfoiți Sursa

Merge pull request #2713 from thomasvn/thomasn/guardduty

Update CloudCost service categorization for AWS
Sean Holcomb 2 ani în urmă
părinte
comite
e125883ef0
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      pkg/cloud/aws/athenaquerier.go

+ 4 - 0
pkg/cloud/aws/athenaquerier.go

@@ -208,6 +208,10 @@ func SelectAWSCategory(providerID, usageType, service string) string {
 	// The node and volume conditions are mutually exclusive.
 	// Provider ID has prefix "i-"
 	if strings.HasPrefix(providerID, "i-") {
+		// GuardDuty has a ProviderID prefix of "i-", but should not be categorized as compute
+		if strings.ToUpper(service) == "AMAZONGUARDDUTY" {
+			return opencost.OtherCategory
+		}
 		return opencost.ComputeCategory
 	}
 	// Provider ID has prefix "vol-"