MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetEnvProfile

Function GetEnvProfile

tests/utils/cloudvendors/cloud_vendor.go:85–115  ·  view source on GitHub ↗

GetEnvProfile returns a cloud environment's capabilities envProfile

(te TestEnvVendor)

Source from the content-addressed store, hash-verified

83
84// GetEnvProfile returns a cloud environment's capabilities envProfile
85func 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
117type envProfile struct {
118 canMovePVCAcrossNodes bool

Callers 1

MustGetEnvProfileFunction · 0.92

Calls

no outgoing calls

Tested by 1

MustGetEnvProfileFunction · 0.74