annotation

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_INGRESS_CLASS_NAME = "contour"

DEFAULT_INGRESS_CLASS_NAME is the Contour default.

Variables

This section is empty.

Functions

func ContourAnnotation added in v1.11.0

func ContourAnnotation(o metav1.Object, key string) string

ContourAnnotation checks the Object for the given annotation with the "projectcontour.io/" prefix.

func HTTPAllowed

func HTTPAllowed(i *networking_v1.Ingress) bool

HTTPAllowed returns true unless the kubernetes.io/ingress.allow-http annotation is present and set to false.

func IngressClass

func IngressClass(o metav1.Object) string

IngressClass returns the first matching ingress class for the following annotations: 1. projectcontour.io/ingress.class 2. kubernetes.io/ingress.class

func IsKnown

func IsKnown(key string) bool

IsKnown checks if an annotation is one Contour knows about.

func MatchesIngressClass

func MatchesIngressClass(o metav1.Object, ic string) bool

MatchesIngressClass checks that the passed object has an ingress class that matches either the passed ingress-class string, or DEFAULT_INGRESS_CLASS if it's empty.

func MaxConnections

func MaxConnections(o metav1.Object) uint32

MaxConnections returns the value of the first matching max-connections annotation for the following annotations: 1. projectcontour.io/max-connections

'0' is returned if the annotation is absent or unparsable.

func MaxPendingRequests

func MaxPendingRequests(o metav1.Object) uint32

MaxPendingRequests returns the value of the first matching max-pending-requests annotation for the following annotations: 1. projectcontour.io/max-pending-requests

'0' is returned if the annotation is absent or unparsable.

func MaxRequests

func MaxRequests(o metav1.Object) uint32

MaxRequests returns the value of the first matching max-requests annotation for the following annotations: 1. projectcontour.io/max-requests

'0' is returned if the annotation is absent or unparsable.

func MaxRetries

func MaxRetries(o metav1.Object) uint32

MaxRetries returns the value of the first matching max-retries annotation for the following annotations: 1. projectcontour.io/max-retries

'0' is returned if the annotation is absent or unparsable.

func MinTLSVersion added in v1.6.0

func MinTLSVersion(version string, defaultVal string) string

MinTLSVersion returns the TLS protocol version specified by an ingress annotation or default if non present.

func NumRetries

func NumRetries(i *networking_v1.Ingress) uint32

NumRetries returns the number of retries specified by the "projectcontour.io/num-retries" annotation.

func ParseUpstreamProtocols

func ParseUpstreamProtocols(m map[string]string) map[string]string

ParseUpstreamProtocols parses the annotations map for projectcontour.io/upstream-protocol.{protocol} annotations. 'protocol' identifies which protocol must be used in the upstream.

func PerTryTimeout

func PerTryTimeout(i *networking_v1.Ingress) (timeout.Setting, error)

PerTryTimeout returns the duration envoy will wait per retry cycle.

func TLSRequired

func TLSRequired(i *networking_v1.Ingress) bool

TLSRequired returns true if the ingress.kubernetes.io/force-ssl-redirect annotation is present and set to true.

func ValidForKind

func ValidForKind(kind string, key string) bool

ValidForKind checks if a particular annotation is valid for a given Kind.

func WebsocketRoutes

func WebsocketRoutes(i *networking_v1.Ingress) map[string]bool

WebsocketRoutes retrieves the details of routes that should have websockets enabled from the associated websocket-routes annotation.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL