Documentation ¶
Index ¶
- Constants
- func ExtractClientCertificate(anns map[string]string) string
- func ExtractConfigurationName(anns map[string]string) string
- func ExtractHTTPSRedirectStatusCode(anns map[string]string) string
- func ExtractHostAliases(anns map[string]string) ([]string, bool)
- func ExtractHostHeader(anns map[string]string) string
- func ExtractKongPluginsFromAnnotations(anns map[string]string) []string
- func ExtractMethods(anns map[string]string) []string
- func ExtractPath(anns map[string]string) string
- func ExtractPreserveHost(anns map[string]string) string
- func ExtractProtocolName(anns map[string]string) string
- func ExtractProtocolNames(anns map[string]string) []string
- func ExtractRegexPriority(anns map[string]string) string
- func ExtractRequestBuffering(anns map[string]string) (string, bool)
- func ExtractResponseBuffering(anns map[string]string) (string, bool)
- func ExtractSNIs(anns map[string]string) ([]string, bool)
- func ExtractStripPath(anns map[string]string) string
- func HasForceSSLRedirectAnnotation(anns map[string]string) bool
- func HasServiceUpstreamAnnotation(anns map[string]string) bool
- func IngressClassValidatorFunc(ingressClass string) func(obj metav1.Object, handling ClassMatching) bool
- func IngressClassValidatorFuncFromObjectMeta(ingressClass string) func(obj *metav1.ObjectMeta, handling ClassMatching) bool
- func IngressClassValidatorFuncFromV1Ingress(ingressClass string) func(ingress *networkingv1.Ingress, handling ClassMatching) bool
- type ClassMatching
Constants ¶
const ( IngressClassKey = "kubernetes.io/ingress.class" KnativeIngressClassKey = "networking.knative.dev/ingress.class" AnnotationPrefix = "konghq.com" ConfigurationKey = "/override" PluginsKey = "/plugins" ProtocolKey = "/protocol" ProtocolsKey = "/protocols" ClientCertKey = "/client-cert" StripPathKey = "/strip-path" PathKey = "/path" HTTPSRedirectCodeKey = "/https-redirect-status-code" PreserveHostKey = "/preserve-host" RegexPriorityKey = "/regex-priority" HostHeaderKey = "/host-header" MethodsKey = "/methods" SNIsKey = "/snis" RequestBuffering = "/request-buffering" ResponseBuffering = "/response-buffering" HostAliasesKey = "/host-aliases" // DefaultIngressClass defines the default class used // by Kong's ingress controller. DefaultIngressClass = "kong" )
Variables ¶
This section is empty.
Functions ¶
func ExtractClientCertificate ¶
ExtractClientCertificate extracts the secret name containing the client-certificate to use.
func ExtractConfigurationName ¶
ExtractConfigurationName extracts the name of the KongIngress object that holds information about the configuration to use in Routes, Services and Upstreams
func ExtractHTTPSRedirectStatusCode ¶
ExtractHTTPSRedirectStatusCode extracts the https redirect status code annotation value.
func ExtractHostAliases ¶
ExtractHostAliases extracts the host-aliases annotation value.
func ExtractHostHeader ¶
ExtractHostHeader extracts the host-header annotation value.
func ExtractKongPluginsFromAnnotations ¶
ExtractKongPluginsFromAnnotations extracts information about Kong Plugins configured using konghq.com/plugins annotation. This returns a list of KongPlugin resource names that should be applied.
func ExtractMethods ¶
ExtractMethods extracts the methods annotation value.
func ExtractPath ¶
ExtractPath extracts the path annotations containing the HTTP path.
func ExtractPreserveHost ¶
ExtractPreserveHost extracts the preserve-host annotation value.
func ExtractProtocolName ¶
ExtractProtocolName extracts the protocol supplied in the annotation
func ExtractProtocolNames ¶
ExtractProtocolNames extracts the protocols supplied in the annotation
func ExtractRegexPriority ¶
ExtractRegexPriority extracts the regex-priority annotation value.
func ExtractRequestBuffering ¶
ExtractRequestBuffering extracts the boolean annotation indicating whether or not a route should buffer requests.
func ExtractResponseBuffering ¶
ExtractResponseBuffering extracts the boolean annotation indicating whether or not a route should buffer responses.
func ExtractSNIs ¶
ExtractSNIs extracts the route SNI match criteria annotation value.
func ExtractStripPath ¶
ExtractStripPath extracts the strip-path annotations containing the the boolean string "true" or "false".
func HasForceSSLRedirectAnnotation ¶
HasForceSSLRedirectAnnotation returns true if the annotation ingress.kubernetes.io/force-ssl-redirect is set to "true" in anns.
func HasServiceUpstreamAnnotation ¶
HasServiceUpstreamAnnotation returns true if the annotation ingress.kubernetes.io/service-upstream is set to "true" in anns.
func IngressClassValidatorFunc ¶
func IngressClassValidatorFunc( ingressClass string) func(obj metav1.Object, handling ClassMatching) bool
IngressClassValidatorFunc returns a function which can validate if an Object belongs to an the ingressClass or not.
func IngressClassValidatorFuncFromObjectMeta ¶
func IngressClassValidatorFuncFromObjectMeta( ingressClass string) func(obj *metav1.ObjectMeta, handling ClassMatching) bool
IngressClassValidatorFuncFromObjectMeta returns a function which can validate if an ObjectMeta belongs to an the ingressClass or not.
func IngressClassValidatorFuncFromV1Ingress ¶
func IngressClassValidatorFuncFromV1Ingress( ingressClass string) func(ingress *networkingv1.Ingress, handling ClassMatching) bool
Types ¶
type ClassMatching ¶
type ClassMatching int
const ( IgnoreClassMatch ClassMatching = iota ExactOrEmptyClassMatch ClassMatching = iota ExactClassMatch ClassMatching = iota )