INNER CODE UNIT · Go
main
kubernetes-sigs/aws-ebs-csi-driver · hack/detect-potentially-invalid-limits/main.go:30
func main() {
familyTypes := make(map[string]map[string]bool)
for _, instanceType := range limits.KnownInstanceTypes() {
family, _, _ := strings.Cut(instanceType, ".")
_, attachmentType := limits.GetVolumeLimits(instanceType)
if familyTypes[family] == nil {
familyTypes[family] = make(map[string]bool)
}
familyTypes[family][attachmentType] = true
}
loggedWarning := false
for family, types := range familyTypes {
if len(types) > 1 {
if !loggedWarning {
// Log with red background and bold text to stand out in terminal