Documentation ¶
Index ¶
- Constants
- Variables
- func BackendHostName(ing *networking.Ingress) (string, error)
- func BackendPathPrefix(ing *networking.Ingress) (string, error)
- func ConnectionDrainingTimeout(ing *networking.Ingress) (int32, error)
- func GetAppGwSslCertificate(ing *networking.Ingress) (string, error)
- func GetAppGwSslProfile(ing *networking.Ingress) (string, error)
- func GetAppGwTrustedRootCertificate(ing *networking.Ingress) (string, error)
- func GetHostNameExtensions(ing *networking.Ingress) ([]string, error)
- func GetRequestRoutingRulePriority(ing *networking.Ingress) (*int32, error)
- func HealthProbeHostName(ing *networking.Ingress) (string, error)
- func HealthProbeInterval(ing *networking.Ingress) (int32, error)
- func HealthProbePath(ing *networking.Ingress) (string, error)
- func HealthProbePort(ing *networking.Ingress) (int32, error)
- func HealthProbeStatusCodes(ing *networking.Ingress) ([]string, error)
- func HealthProbeTimeout(ing *networking.Ingress) (int32, error)
- func HealthProbeUnhealthyThreshold(ing *networking.Ingress) (int32, error)
- func IngressClass(ing *networking.Ingress) (string, error)
- func IsConnectionDraining(ing *networking.Ingress) (bool, error)
- func IsCookieBasedAffinity(ing *networking.Ingress) (bool, error)
- func IsCookieBasedAffinityDistinctName(ing *networking.Ingress) (bool, error)
- func IsSslRedirect(ing *networking.Ingress) (bool, error)
- func IstioGatewayIngressClass(gateway *v1alpha3.Gateway) (string, error)
- func OverrideFrontendPort(ing *networking.Ingress) (int32, error)
- func RequestTimeout(ing *networking.Ingress) (int32, error)
- func RewriteRuleSet(ing *networking.Ingress) (string, error)
- func RewriteRuleSetCustomResource(ing *networking.Ingress) (string, error)
- func UsePrivateIP(ing *networking.Ingress) (bool, error)
- func WAFPolicy(ing *networking.Ingress) (string, error)
- type ProtocolEnum
Constants ¶
const ( // ApplicationGatewayPrefix defines the prefix for all keys associated with Application Gateway Ingress controller. ApplicationGatewayPrefix = "appgw.ingress.kubernetes.io" // BackendPathPrefixKey defines the key for Path which should be used as a prefix for all HTTP requests. // Null means no path will be prefixed. Default value is null. BackendPathPrefixKey = ApplicationGatewayPrefix + "/backend-path-prefix" // BackendHostNameKey defines the key for Host which should be used as when making a connection to the backend. // Null means Host specified in the request to Application Gateway is used to connect to the backend. BackendHostNameKey = ApplicationGatewayPrefix + "/backend-hostname" // HealthProbeHostKey defines the key for Host which should be used as a target for health probe. HealthProbeHostKey = ApplicationGatewayPrefix + "/health-probe-hostname" // HealthProbePortKey defines the key for port that should be used as a target for health probe. HealthProbePortKey = ApplicationGatewayPrefix + "/health-probe-port" // HealthProbePathKey defines the key for URL path which should be used as a target for health probe. HealthProbePathKey = ApplicationGatewayPrefix + "/health-probe-path" // HealthProbeStatusCodesKey defines status codes returned by the probe to be interpreted as healty service HealthProbeStatusCodesKey = ApplicationGatewayPrefix + "/health-probe-status-codes" // HealthProbeIntervalKey defines the probe interval in seconds HealthProbeIntervalKey = ApplicationGatewayPrefix + "/health-probe-interval" // HealthProbeTimeoutKey defines the probe timeout in seconds HealthProbeTimeoutKey = ApplicationGatewayPrefix + "/health-probe-timeout" // HealthProbeUnhealthyThresholdKey defines threshold for marking backend server as unhealthy HealthProbeUnhealthyThresholdKey = ApplicationGatewayPrefix + "/health-probe-unhealthy-threshold" // CookieBasedAffinityKey defines the key to enable/disable cookie based affinity for client connection. CookieBasedAffinityKey = ApplicationGatewayPrefix + "/cookie-based-affinity" // CookieBasedAffinityDistinctNameKey defines the key to enable/disable distinct cookie names per backend for client connection. CookieBasedAffinityDistinctNameKey = ApplicationGatewayPrefix + "/cookie-based-affinity-distinct-name" // RequestTimeoutKey defines the request timeout to the backend. RequestTimeoutKey = ApplicationGatewayPrefix + "/request-timeout" // ConnectionDrainingKey defines the key to enable/disable connection draining. ConnectionDrainingKey = ApplicationGatewayPrefix + "/connection-draining" // ConnectionDrainingTimeoutKey defines the drain timeout for the backends. ConnectionDrainingTimeoutKey = ApplicationGatewayPrefix + "/connection-draining-timeout" // SslRedirectKey defines the key for defining with SSL redirect should be turned on for an HTTP endpoint. SslRedirectKey = ApplicationGatewayPrefix + "/ssl-redirect" // UsePrivateIPKey defines the key to determine whether to use private ip with the ingress. UsePrivateIPKey = ApplicationGatewayPrefix + "/use-private-ip" // OverrideFrontendPortKey defines the key to define a custom fronend port OverrideFrontendPortKey = ApplicationGatewayPrefix + "/override-frontend-port" // BackendProtocolKey defines the key to determine whether to use private ip with the ingress. BackendProtocolKey = ApplicationGatewayPrefix + "/backend-protocol" // HostNameExtensionKey defines the key to add multiple hostnames to ingress rules including wildcard hostnames // annotation will be appgw.ingress.kubernetes.io/hostname-extension : "hostname1, hostname2" // The extended hostnames will be appended to ingress host for a rule if specified HostNameExtensionKey = ApplicationGatewayPrefix + "/hostname-extension" // IngressClassKey defines the key of the annotation which needs to be set in order to specify // that this is an ingress resource meant for the application gateway ingress controller. IngressClassKey = "kubernetes.io/ingress.class" // IstioGatewayKey defines the key of the annotation which needs to be set in order to specify // that this is a gateway meant for the application gateway ingress controller. IstioGatewayKey = "appgw.ingress.istio.io/v1alpha3" // FirewallPolicy is the key part of a key/value Ingress annotation. // The value of this is an ID of a Firewall Policy. The Firewall Policy must be already defined in Azure. // The policy will be attached to all URL paths declared in the annotated Ingress resource. FirewallPolicy = ApplicationGatewayPrefix + "/waf-policy-for-path" // AppGwSslCertificate indicates the name of ssl certificate installed by AppGw AppGwSslCertificate = ApplicationGatewayPrefix + "/appgw-ssl-certificate" // AppGwSslProfile indicates the name of the ssl profile installed by AppGw AppGwSslProfile = ApplicationGatewayPrefix + "/appgw-ssl-profile" // AppGwTrustedRootCertificate indicates the names of trusted root certificates // Multiple root certificates separated by comma, e.g. "cert1,cert2" AppGwTrustedRootCertificate = ApplicationGatewayPrefix + "/appgw-trusted-root-certificate" // RewriteRuleSetKey indicates the name of the rule set to overwrite HTTP headers. RewriteRuleSetKey = ApplicationGatewayPrefix + "/rewrite-rule-set" // RewriteRuleSetCustomResourceKey indicates the name of the rule set CRD to use for header CRD and URL Config. RewriteRuleSetCustomResourceKey = ApplicationGatewayPrefix + "/rewrite-rule-set-custom-resource" // RequestRoutingRulePriority indicates the priority of the Request Routing Rules. RequestRoutingRulePriority = ApplicationGatewayPrefix + "/rule-priority" )
Variables ¶
var ProtocolEnumLookup = map[string]ProtocolEnum{ "http": HTTP, "https": HTTPS, }
ProtocolEnumLookup is a reverse map of the EventType enums; used for logging purposes
Functions ¶
func BackendHostName ¶
func BackendHostName(ing *networking.Ingress) (string, error)
BackendHostName override hostname
func BackendPathPrefix ¶
func BackendPathPrefix(ing *networking.Ingress) (string, error)
BackendPathPrefix override path
func ConnectionDrainingTimeout ¶
func ConnectionDrainingTimeout(ing *networking.Ingress) (int32, error)
ConnectionDrainingTimeout provides value for draining timeout for backends.
func GetAppGwSslCertificate ¶
func GetAppGwSslCertificate(ing *networking.Ingress) (string, error)
GetAppGwSslCertificate refer to appgw installed certificate
func GetAppGwSslProfile ¶
func GetAppGwSslProfile(ing *networking.Ingress) (string, error)
GetAppGwSslProfile refer to appgw installed certificate
func GetAppGwTrustedRootCertificate ¶
func GetAppGwTrustedRootCertificate(ing *networking.Ingress) (string, error)
GetAppGwTrustedRootCertificate refer to appgw installed root certificate
func GetHostNameExtensions ¶
func GetHostNameExtensions(ing *networking.Ingress) ([]string, error)
GetHostNameExtensions from a given ingress
func GetRequestRoutingRulePriority ¶
func GetRequestRoutingRulePriority(ing *networking.Ingress) (*int32, error)
GetRequestRoutingRulePriority gets the request routing rule priority
func HealthProbeHostName ¶
func HealthProbeHostName(ing *networking.Ingress) (string, error)
HealthProbeHostName probe hostname override
func HealthProbeInterval ¶
func HealthProbeInterval(ing *networking.Ingress) (int32, error)
HealthProbeInterval probe interval
func HealthProbePath ¶
func HealthProbePath(ing *networking.Ingress) (string, error)
HealthProbePath probe path override
func HealthProbePort ¶
func HealthProbePort(ing *networking.Ingress) (int32, error)
HealthProbePort probe port override
func HealthProbeStatusCodes ¶
func HealthProbeStatusCodes(ing *networking.Ingress) ([]string, error)
HealthProbeStatusCodes probe status codes
func HealthProbeTimeout ¶
func HealthProbeTimeout(ing *networking.Ingress) (int32, error)
HealthProbeTimeout probe timeout
func HealthProbeUnhealthyThreshold ¶
func HealthProbeUnhealthyThreshold(ing *networking.Ingress) (int32, error)
HealthProbeUnhealthyThreshold probe threshold
func IngressClass ¶
func IngressClass(ing *networking.Ingress) (string, error)
IngressClass returns ingress class annotation value if set
func IsConnectionDraining ¶
func IsConnectionDraining(ing *networking.Ingress) (bool, error)
IsConnectionDraining provides whether connection draining is enabled or not.
func IsCookieBasedAffinity ¶
func IsCookieBasedAffinity(ing *networking.Ingress) (bool, error)
IsCookieBasedAffinity provides value to enable/disable cookie based affinity for client connection.
func IsCookieBasedAffinityDistinctName ¶
func IsCookieBasedAffinityDistinctName(ing *networking.Ingress) (bool, error)
IsCookieBasedAffinityDistinctName provides value to enable/disable distinct cookie name based affinity for client connection.
func IsSslRedirect ¶
func IsSslRedirect(ing *networking.Ingress) (bool, error)
IsSslRedirect for HTTP end points.
func IstioGatewayIngressClass ¶
IngressClass returns istio ingress class annotation value if set
func OverrideFrontendPort ¶
func OverrideFrontendPort(ing *networking.Ingress) (int32, error)
OverrideFrontendPort determines whether to use a custom Frontend port
func RequestTimeout ¶
func RequestTimeout(ing *networking.Ingress) (int32, error)
RequestTimeout provides value for request timeout on the backend connection
func RewriteRuleSet ¶
func RewriteRuleSet(ing *networking.Ingress) (string, error)
RewriteRuleSet name
func RewriteRuleSetCustomResource ¶
func RewriteRuleSetCustomResource(ing *networking.Ingress) (string, error)
RewriteRuleSetCustomResource name
func UsePrivateIP ¶
func UsePrivateIP(ing *networking.Ingress) (bool, error)
UsePrivateIP determines whether to use private IP with the ingress
Types ¶
type ProtocolEnum ¶
type ProtocolEnum int
ProtocolEnum is the type for protocol
const ( // HTTP is enum for http protocol HTTP ProtocolEnum = iota + 1 // HTTPS is enum for https protocol HTTPS )
func BackendProtocol ¶
func BackendProtocol(ing *networking.Ingress) (ProtocolEnum, error)
BackendProtocol provides value for protocol to be used with the backend