GetEnvProfile returns a cloud environment's capabilities envProfile
(te TestEnvVendor)
| 83 | |
| 84 | // GetEnvProfile returns a cloud environment's capabilities envProfile |
| 85 | func GetEnvProfile(te TestEnvVendor) EnvProfile { |
| 86 | profileMap := map[TestEnvVendor]EnvProfile{ |
| 87 | KIND: envProfile{ |
| 88 | isLeaderElectionEnabled: true, |
| 89 | usesNodeDiskSpace: true, |
| 90 | }, |
| 91 | K3D: envProfile{ |
| 92 | isLeaderElectionEnabled: true, |
| 93 | usesNodeDiskSpace: true, |
| 94 | }, |
| 95 | AKS: envProfile{ |
| 96 | canMovePVCAcrossNodes: true, |
| 97 | isLeaderElectionEnabled: true, |
| 98 | canRunAppArmor: true, |
| 99 | }, |
| 100 | EKS: envProfile{ |
| 101 | isLeaderElectionEnabled: true, |
| 102 | }, |
| 103 | GKE: envProfile{}, |
| 104 | OCP: envProfile{ |
| 105 | isLeaderElectionEnabled: true, |
| 106 | }, |
| 107 | } |
| 108 | |
| 109 | profile, found := profileMap[te] |
| 110 | if !found { |
| 111 | return envProfile{} |
| 112 | } |
| 113 | |
| 114 | return profile |
| 115 | } |
| 116 | |
| 117 | type envProfile struct { |
| 118 | canMovePVCAcrossNodes bool |
no outgoing calls