in pkg/environment/environment.go [211:252]
func GetEnv() EnvVariables {
usePrivateIP, _ := strconv.ParseBool(os.Getenv(UsePrivateIPVarName))
multiClusterMode, _ := strconv.ParseBool(os.Getenv(MultiClusterModeVarName))
env := EnvVariables{
CloudProviderConfigLocation: os.Getenv(CloudProviderConfigLocationVarName),
ClientID: os.Getenv(ClientIDVarName),
SubscriptionID: os.Getenv(SubscriptionIDVarName),
ResourceGroupName: os.Getenv(ResourceGroupNameVarName),
AppGwName: os.Getenv(AppGwNameVarName),
AppGwSubnetName: os.Getenv(AppGwSubnetNameVarName),
AppGwSubnetPrefix: os.Getenv(AppGwSubnetPrefixVarName),
AppGwResourceID: os.Getenv(AppGwResourceIDVarName),
AppGwSubnetID: os.Getenv(AppGwSubnetIDVarName),
AppGwSkuName: GetEnvironmentVariable(AppGwSkuVarName, "Standard_v2", skuValidator),
AuthLocation: os.Getenv(AuthLocationVarName),
IngressClass: os.Getenv(IngressClassVarName),
IngressClassResourceEnabled: GetEnvironmentVariable(IngressClassResourceEnabledVarName, "false", boolValidator) == "true",
IngressClassResourceName: os.Getenv(IngressClassResourceNameVarName),
IngressClassResourceDefault: GetEnvironmentVariable(IngressClassResourceDefaultVarName, "false", boolValidator) == "true",
IngressClassControllerName: os.Getenv(IngressClassControllerNameVarName),
WatchNamespace: os.Getenv(WatchNamespaceVarName),
UsePrivateIP: usePrivateIP,
VerbosityLevel: os.Getenv(VerbosityLevelVarName),
AGICPodName: os.Getenv(AGICPodNameVarName),
AGICPodNamespace: os.Getenv(AGICPodNamespaceVarName),
EnableBrownfieldDeployment: GetEnvironmentVariable(EnableBrownfieldDeploymentVarName, "false", boolValidator) == "true",
EnableIstioIntegration: GetEnvironmentVariable(EnableIstioIntegrationVarName, "false", boolValidator) == "true",
EnableSaveConfigToFile: GetEnvironmentVariable(EnableSaveConfigToFileVarName, "false", boolValidator) == "true",
EnablePanicOnPutError: GetEnvironmentVariable(EnablePanicOnPutErrorVarName, "false", boolValidator) == "true",
EnableDeployAppGateway: GetEnvironmentVariable(EnableDeployAppGatewayVarName, "false", boolValidator) == "true",
UseManagedIdentityForPod: GetEnvironmentVariable(UseManagedIdentityForPodVarName, "false", boolValidator) == "true",
HTTPServicePort: GetEnvironmentVariable(HTTPServicePortVarName, "8123", portNumberValidator),
AttachWAFPolicyToListener: GetEnvironmentVariable(AttachWAFPolicyToListenerVarName, "false", boolValidator) == "true",
HostedOnUnderlay: GetEnvironmentVariable(HostedOnUnderlayVarName, "false", boolValidator) == "true",
ReconcilePeriodSeconds: os.Getenv(ReconcilePeriodSecondsVarName),
MultiClusterMode: multiClusterMode,
AddonMode: GetEnvironmentVariable(AddonModeVarName, "false", boolValidator) == "true",
}
return env
}