Renamed marketplace functions (#1354)

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
Alex
2021-12-30 19:08:13 -07:00
committed by GitHub
parent b04ea490f8
commit ac64eedc14
3 changed files with 5 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ func getK8sSAToken() string {
return string(dat)
}
// Marketplace Mode Token
func getMPMode() string {
return env.Get(ConsoleMPMode, "")
// Get Marketplace deployment platform
func getMarketplace() string {
return env.Get(ConsoleMarketplace, "")
}

View File

@@ -21,7 +21,7 @@ const (
ConsoleSubnetLicense = "CONSOLE_SUBNET_LICENSE"
ConsoleOperatorSAToken = "CONSOLE_OPERATOR_SA_TOKEN"
MinIOSubnetLicense = "MINIO_SUBNET_LICENSE"
ConsoleMPMode = "CONSOLE_OPERATOR_MARKETPLACE"
ConsoleMarketplace = "CONSOLE_OPERATOR_MARKETPLACE"
// Constants for prometheus annotations
prometheusPath = "prometheus.io/path"

View File

@@ -54,7 +54,7 @@ func getSessionResponse(session *models.Principal) (*models.OperatorSessionRespo
// getListOfEnabledFeatures returns a list of features
func getListOfOperatorFeatures() []string {
features := []string{}
mpEnabled := getMPMode()
mpEnabled := getMarketplace()
if mpEnabled != "" {
features = append(features, fmt.Sprintf("mp-mode-%s", mpEnabled))