Documentation
¶
Index ¶
Constants ¶
View Source
const ( // CloudProviderConfigLocationVarName is an environment variable name. This file is available on azure cluster. CloudProviderConfigLocationVarName = "AZURE_CLOUD_PROVIDER_LOCATION" // ClientIDVarName is an environment variable which stores the client id provided through user assigned identity ClientIDVarName = "AZURE_CLIENT_ID" // SubscriptionIDVarName is the name of the APPGW_SUBSCRIPTION_ID SubscriptionIDVarName = "APPGW_SUBSCRIPTION_ID" // ResourceGroupNameVarName is the name of the APPGW_RESOURCE_GROUP ResourceGroupNameVarName = "APPGW_RESOURCE_GROUP" // AppGwNameVarName is the name of the APPGW_NAME AppGwNameVarName = "APPGW_NAME" // AppGwSubnetNameVarName is the name of the APPGW_SUBNET_NAME AppGwSubnetNameVarName = "APPGW_SUBNET_NAME" // AppGwSubnetPrefixVarName is the name of the APPGW_SUBNET_PREFIX AppGwSubnetPrefixVarName = "APPGW_SUBNET_PREFIX" // AppGwResourceIDVarName is the name of the APPGW_RESOURCE_ID AppGwResourceIDVarName = "APPGW_RESOURCE_ID" // AppGwSubnetIDVarName is the name of the APPGW_SUBNET_ID AppGwSubnetIDVarName = "APPGW_SUBNET_ID" // AppGwSkuVarName is the sku of the AGW AppGwSkuVarName = "APPGW_SKU_NAME" // AuthLocationVarName is the name of the AZURE_AUTH_LOCATION AuthLocationVarName = "AZURE_AUTH_LOCATION" // WatchNamespaceVarName is the name of the KUBERNETES_WATCHNAMESPACE WatchNamespaceVarName = "KUBERNETES_WATCHNAMESPACE" // UsePrivateIPVarName is the name of the USE_PRIVATE_IP UsePrivateIPVarName = "USE_PRIVATE_IP" // VerbosityLevelVarName sets the level of klog verbosity should the CLI argument be blank VerbosityLevelVarName = "APPGW_VERBOSITY_LEVEL" // EnableBrownfieldDeploymentVarName is a feature flag enabling observation of {Managed,Prohibited}Target CRDs EnableBrownfieldDeploymentVarName = "APPGW_ENABLE_SHARED_APPGW" // EnableIstioIntegrationVarName is a feature flag enabling observation of Istio specific CRDs EnableIstioIntegrationVarName = "APPGW_ENABLE_ISTIO_INTEGRATION" // EnableSaveConfigToFileVarName is a feature flag, which enables saving the App Gwy config to disk. EnableSaveConfigToFileVarName = "APPGW_ENABLE_SAVE_CONFIG_TO_FILE" // EnablePanicOnPutErrorVarName is a feature flag. EnablePanicOnPutErrorVarName = "APPGW_ENABLE_PANIC_ON_PUT_ERROR" // EnableDeployAppGatewayVarName is a feature flag. EnableDeployAppGatewayVarName = "APPGW_ENABLE_DEPLOY" // HTTPServicePortVarName is an environment variable name. HTTPServicePortVarName = "HTTP_SERVICE_PORT" // AGICPodNameVarName is an environment variable name. AGICPodNameVarName = "AGIC_POD_NAME" // AGICPodNamespaceVarName is an environment variable name. AGICPodNamespaceVarName = "AGIC_POD_NAMESPACE" // UseManagedIdentityForPodVarName is an environment variable name. UseManagedIdentityForPodVarName = "USE_MANAGED_IDENTITY_FOR_POD" // AttachWAFPolicyToListenerVarName is an environment variable name. AttachWAFPolicyToListenerVarName = "ATTACH_WAF_POLICY_TO_LISTENER" // HostedOnUnderlayVarName is an environment variable name. HostedOnUnderlayVarName = "HOSTED_ON_UNDERLAY" // ReconcilePeriodSecondsVarName is an environment variable to control reconcile period for the AGIC. ReconcilePeriodSecondsVarName = "RECONCILE_PERIOD_SECONDS" // IngressClassVarName is an environment variable IngressClassVarName = "INGRESS_CLASS" // IngressClassResourceEnabledVarName is an environment variable to enable V1 Ingress class. IngressClassResourceEnabledVarName = "INGRESS_CLASS_RESOURCE_ENABLED" // IngressClassResourceNameVarName is an environment variable which specifies the name of the ingress class object to watch. IngressClassResourceNameVarName = "INGRESS_CLASS_RESOURCE_NAME" // IngressClassResourceDefaultVarName is an environment variable to enable AGIC as default ingress. IngressClassResourceDefaultVarName = "INGRESS_CLASS_RESOURCE_DEFAULT" // IngressClassControllerNameVarName is an environment variable to specify controller class. IngressClassControllerNameVarName = "INGRESS_CLASS_RESOURCE_CONTROLLER" // MultiClusterModeVarName is an environment variable to control whether AGIC monitors Ingresses or MutliClusterIngresses MultiClusterModeVarName = "MULTI_CLUSTER_MODE" // AddonModeVarName is an environment variable to inform if the controller is running as an addon. AddonModeVarName = "ADDON_MODE" )
View Source
const ( //DefaultIngressClassController defines the default app gateway ingress value DefaultIngressClassController = "azure/application-gateway" //DefaultIngressClassResourceName defines the default app gateway ingress class object name DefaultIngressClassResourceName = "azure-application-gateway" )
Variables ¶
This section is empty.
Functions ¶
func GetEnvironmentVariable ¶
func GetEnvironmentVariable(environmentVariable, defaultValue string, validator *regexp.Regexp) string
GetEnvironmentVariable is an augmentation of os.Getenv, providing it with a default value.
func ValidateEnv ¶
func ValidateEnv(env EnvVariables) error
ValidateEnv validates environment variables.
Types ¶
type EnvVariables ¶
type EnvVariables struct { CloudProviderConfigLocation string ClientID string SubscriptionID string ResourceGroupName string AppGwName string AppGwSubnetName string AppGwSubnetPrefix string AppGwResourceID string AppGwSubnetID string AppGwSkuName string AuthLocation string IngressClass string IngressClassControllerName string IngressClassResourceEnabled bool IngressClassResourceName string IngressClassResourceDefault bool WatchNamespace string UsePrivateIP bool VerbosityLevel string AGICPodName string AGICPodNamespace string EnableBrownfieldDeployment bool EnableIstioIntegration bool EnableSaveConfigToFile bool EnablePanicOnPutError bool EnableDeployAppGateway bool UseManagedIdentityForPod bool HTTPServicePort string AttachWAFPolicyToListener bool HostedOnUnderlay bool ReconcilePeriodSeconds string MultiClusterMode bool AddonMode bool }
EnvVariables is a struct storing values for environment variables.
func GetEnv ¶
func GetEnv() EnvVariables
GetEnv returns values for defined environment variables for Ingress Controller.
func GetFakeEnv ¶
func GetFakeEnv() EnvVariables
GetFakeEnv returns fake values for defined environment variables for Ingress Controller.
func (*EnvVariables) Consolidate ¶
func (env *EnvVariables) Consolidate(cpConfig *azure.CloudProviderConfig)
Consolidate sets defaults and missing values using cpConfig
Click to show internal directories.
Click to hide internal directories.