# Functions
ConfigFromEnv returns the configuration based on the environment variables and validates the values
*/.
Converts a Kubernetes pod model to our model
*/.
No description provided by the author
GetRoutablePodList returns the routable pods list.
GetRouterSecretList returns the router secrets.
GetRoutes returns an array of routes defined within the provided pod
*/.
UpdatePodCacheForEvents updates the cache based on the pod events and returns if the changes warrant an nginx restart.
UpdateSecretCacheForEvents updates the cache based on the secret events and returns if the changes warrant an nginx restart.
# Constants
DefaultAPIKeyHeader is the default value for the header used to identify the API Key (X-ROUTING-API-KEY).
DefaultAPIKeySecret is the default value for the first portion of the DefaultAPIKeySecretLocation (routing).
DefaultAPIKeySecretDataField is the default value for the second portion of the DefaultAPIKeySecretDataField (api-key).
DefaultAPIKeySecretLocation is the default value for the EnvVarAPIKeySecretLocation (routing:api-key).
Default ClientMaxBodySize for nginx max client request size.
DefaultHostsAnnotation is the default value for EnvVarHostsAnnotation (routingHosts).
DefaultPathsAnnotation is the default value for the EnvVarHostsAnnotation (routingPaths).
DefaultPort is the default value for the EnvVarPort (80).
DefaultRoutableLabelSelector is the default value for EnvVarRoutableLabelSelector (routable=true).
EnvClientMaxBodySize Environment variable for max client request body size.
EnvVarAPIKeyHeader Environment variable name for providing the header name used to identify the API Key header.
EnvVarAPIKeySecretLocation Environment variable name for providing the location of the secret (name:field) to identify API Key secrets.
EnvVarHostsAnnotation Environment variable name for providing the name of the hosts annotation.
EnvVarPathsAnnotation Environment variable name for providing the the name of the paths annotation.
EnvVarPort Environment variable for providing the port nginx should listen on.
EnvVarRoutableLabelSelector Environment variable name for providing the label selector for identifying routable objects.
ErrMsgTmplInvalidAnnotationName is the error message template for an invalid annotation name.
ErrMsgTmplInvalidAPIKeySecretLocation is the error message template for invalid API Key Secret location environment variable values.
ErrMsgTmplInvalidLabelSelector is the error message template for an invalid label selector.
ErrMsgTmplInvalidPort is the error message template for an invalid port.
# Structs
Cache is the structure containing the router API Keys and the routable pods cache
*/.
Config is the structure containing the configuration
*/.
Incoming describes the information required to route an incoming request
*/.
Outgoing describes the information required to proxy to a backend
*/.
PodWithRoutes contains a pod and its routes
*/.
Route describes the incoming route matching details and the outgoing proxy backend details
*/.