v1

package
v1.0.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1 is the v1 version of the API. +groupName=projectcontour.io

Index

Constants

This section is empty.

Variables

View Source
var (
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	AddToScheme   = SchemeBuilder.AddToScheme
)
View Source
var SchemeGroupVersion = schema.GroupVersion{Group: projectcontour.GroupName, Version: "v1"}

SchemeGroupVersion is the GroupVersion for the Contour API

Functions

func Kind

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind

func Resource

func Resource(resource string) schema.GroupResource

Resource gets an Contour GroupResource for a specified resource

Types

type Condition

type Condition struct {
	// Prefix defines a prefix match for a request.
	// +optional
	Prefix string `json:"prefix,omitempty"`

	// Header specifies the header condition to match.
	// +optional
	Header *HeaderCondition `json:"header,omitempty"`
}

Condition are policies that are applied on top of HTTPProxies. One of Prefix or Header must be provided.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPHealthCheckPolicy

type HTTPHealthCheckPolicy struct {
	// HTTP endpoint used to perform health checks on upstream service
	Path string `json:"path"`
	// The value of the host header in the HTTP health check request.
	// If left empty (default value), the name "contour-envoy-healthcheck"
	// will be used.
	Host string `json:"host,omitempty"`
	// The interval (seconds) between health checks
	// +optional
	IntervalSeconds int64 `json:"intervalSeconds"`
	// The time to wait (seconds) for a health check response
	// +optional
	TimeoutSeconds int64 `json:"timeoutSeconds"`
	// The number of unhealthy health checks required before a host is marked unhealthy
	// +optional
	UnhealthyThresholdCount uint32 `json:"unhealthyThresholdCount"`
	// The number of healthy health checks required before a host is marked healthy
	// +optional
	HealthyThresholdCount uint32 `json:"healthyThresholdCount"`
}

HTTPHealthCheckPolicy defines health checks on the upstream service.

func (*HTTPHealthCheckPolicy) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPHealthCheckPolicy.

func (*HTTPHealthCheckPolicy) DeepCopyInto

func (in *HTTPHealthCheckPolicy) DeepCopyInto(out *HTTPHealthCheckPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPProxy

type HTTPProxy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata"`

	Spec HTTPProxySpec `json:"spec"`
	// +optional
	Status Status `json:"status,omitempty"`
}

HTTPProxy is an Ingress CRD specification +k8s:openapi-gen=true +kubebuilder:printcolumn:name="FQDN",type="string",JSONPath=".spec.virtualhost.fqdn",description="Fully qualified domain name" +kubebuilder:printcolumn:name="TLS Secret",type="string",JSONPath=".spec.virtualhost.tls.secretName",description="Secret with TLS credentials" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.currentStatus",description="The current status of the HTTPProxy" +kubebuilder:printcolumn:name="Status Description",type="string",JSONPath=".status.description",description="Description of the current status" +kubebuilder:resource:scope=Namespaced,path=httpproxies,shortName=proxy;proxies,singular=httpproxy

func (*HTTPProxy) DeepCopy

func (in *HTTPProxy) DeepCopy() *HTTPProxy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPProxy.

func (*HTTPProxy) DeepCopyInto

func (in *HTTPProxy) DeepCopyInto(out *HTTPProxy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPProxy) DeepCopyObject

func (in *HTTPProxy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HTTPProxyList

type HTTPProxyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`
	Items           []HTTPProxy `json:"items"`
}

HTTPProxyList is a list of HTTPProxies.

func (*HTTPProxyList) DeepCopy

func (in *HTTPProxyList) DeepCopy() *HTTPProxyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPProxyList.

func (*HTTPProxyList) DeepCopyInto

func (in *HTTPProxyList) DeepCopyInto(out *HTTPProxyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPProxyList) DeepCopyObject

func (in *HTTPProxyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type HTTPProxySpec

type HTTPProxySpec struct {
	// Virtualhost appears at most once. If it is present, the object is considered
	// to be a "root".
	// +optional
	VirtualHost *VirtualHost `json:"virtualhost,omitempty"`
	// Routes are the ingress routes. If TCPProxy is present, Routes is ignored.
	//  +optional
	Routes []Route `json:"routes,omitempty"`
	// TCPProxy holds TCP proxy information.
	// +optional
	TCPProxy *TCPProxy `json:"tcpproxy,omitempty"`
	// Includes allow for specific routing configuration to be appended to another HTTPProxy in another namespace.
	// +optional
	Includes []Include `json:"includes,omitempty"`
}

HTTPProxySpec defines the spec of the CRD.

func (*HTTPProxySpec) DeepCopy

func (in *HTTPProxySpec) DeepCopy() *HTTPProxySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPProxySpec.

func (*HTTPProxySpec) DeepCopyInto

func (in *HTTPProxySpec) DeepCopyInto(out *HTTPProxySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeaderCondition

type HeaderCondition struct {

	// Name is the name of the header to match on. Name is required.
	// Header names are case insensitive.
	Name string `json:"name"`

	// Present is true if the Header is present in the request.
	// +optional
	Present bool `json:"present,omitempty"`

	// Contains is true if the Header containing this string is present
	// in the request.
	// +optional
	Contains string `json:"contains,omitempty"`

	// NotContains is true if the Header containing this string is not present
	// in the request.
	// +optional
	NotContains string `json:"notcontains,omitempty"`

	// Exact is true if the Header containing this string matches exactly
	// in the request.
	// +optional
	Exact string `json:"exact,omitempty"`

	// NotExact is true if the Header containing this string doesn't match exactly
	// in the request.
	// +optional
	NotExact string `json:"notexact,omitempty"`
}

HeaderCondition specifies the header condition to match. Name is required. Only one of Present or Contains must be provided.

func (*HeaderCondition) DeepCopy

func (in *HeaderCondition) DeepCopy() *HeaderCondition

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderCondition.

func (*HeaderCondition) DeepCopyInto

func (in *HeaderCondition) DeepCopyInto(out *HeaderCondition)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeaderValue

type HeaderValue struct {
	// Name represents a key of a header
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// Value represents the value of a header specified by a key
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Value string `json:"value"`
}

HeaderValue represents a header name/value pair

func (*HeaderValue) DeepCopy

func (in *HeaderValue) DeepCopy() *HeaderValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderValue.

func (*HeaderValue) DeepCopyInto

func (in *HeaderValue) DeepCopyInto(out *HeaderValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HeadersPolicy

type HeadersPolicy struct {
	// Set specifies a list of HTTP header values that will be set in the HTTP header
	// +optional
	Set []HeaderValue `json:"set,omitempty"`
	// Remove specifies a list of HTTP header names to remove
	// +optional
	Remove []string `json:"remove,omitempty"`
}

HeadersPolicy defines how headers are managed during forwarding

func (*HeadersPolicy) DeepCopy

func (in *HeadersPolicy) DeepCopy() *HeadersPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeadersPolicy.

func (*HeadersPolicy) DeepCopyInto

func (in *HeadersPolicy) DeepCopyInto(out *HeadersPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Include

type Include struct {
	// Name of the HTTPProxy
	Name string `json:"name"`
	// Namespace of the HTTPProxy to include. Defaults to the current namespace if not supplied.
	// +optional
	Namespace string `json:"namespace,omitempty"`
	// Conditions are a set of routing properties that is applied to an HTTPProxy in a namespace.
	// +optional
	Conditions []Condition `json:"conditions,omitempty"`
}

Include describes a set of policies that can be applied to an HTTPProxy in a namespace.

func (*Include) DeepCopy

func (in *Include) DeepCopy() *Include

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Include.

func (*Include) DeepCopyInto

func (in *Include) DeepCopyInto(out *Include)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LoadBalancerPolicy

type LoadBalancerPolicy struct {
	Strategy string `json:"strategy,omitempty"`
}

LoadBalancerPolicy defines the load balancing policy.

func (*LoadBalancerPolicy) DeepCopy

func (in *LoadBalancerPolicy) DeepCopy() *LoadBalancerPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerPolicy.

func (*LoadBalancerPolicy) DeepCopyInto

func (in *LoadBalancerPolicy) DeepCopyInto(out *LoadBalancerPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PathRewritePolicy

type PathRewritePolicy struct {
	// ReplacePrefix describes how the path prefix should be replaced.
	// +optional
	ReplacePrefix []ReplacePrefix `json:"replacePrefix,omitempty"`
}

PathRewritePolicy specifies how a request URL path should be rewritten. This rewriting takes place after a request is routed and has no subsequent effects on the proxy's routing decision. No HTTP headers or body content is rewritten.

Exactly one field in this struct may be specified.

func (*PathRewritePolicy) DeepCopy

func (in *PathRewritePolicy) DeepCopy() *PathRewritePolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PathRewritePolicy.

func (*PathRewritePolicy) DeepCopyInto

func (in *PathRewritePolicy) DeepCopyInto(out *PathRewritePolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ReplacePrefix

type ReplacePrefix struct {
	// Prefix specifies the URL path prefix to be replaced.
	//
	// If Prefix is specified, it must exactly match the Condition
	// prefix that is rendered by the chain of including HTTPProxies
	// and only that path prefix will be replaced by Replacement.
	// This allows HTTPProxies that are included through multiple
	// roots to only replace specific path prefixes, leaving others
	// unmodified.
	//
	// If Prefix is not specified, all routing prefixes rendered
	// by the include chain will be replaced.
	//
	// +optional
	// +kubebuilder:validation:MinLength=1
	Prefix string `json:"prefix,omitempty"`

	// Replacement is the string that the routing path prefix
	// will be replaced with. This must not be empty.
	//
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MinLength=1
	Replacement string `json:"replacement"`
}

ReplacePrefix describes a path prefix replacement.

func (*ReplacePrefix) DeepCopy

func (in *ReplacePrefix) DeepCopy() *ReplacePrefix

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplacePrefix.

func (*ReplacePrefix) DeepCopyInto

func (in *ReplacePrefix) DeepCopyInto(out *ReplacePrefix)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RetryPolicy

type RetryPolicy struct {
	// NumRetries is maximum allowed number of retries.
	// If not supplied, the number of retries is one.
	// +optional
	NumRetries uint32 `json:"count"`
	// PerTryTimeout specifies the timeout per retry attempt.
	// Ignored if NumRetries is not supplied.
	PerTryTimeout string `json:"perTryTimeout,omitempty"`
}

RetryPolicy defines the attributes associated with retrying policy.

func (*RetryPolicy) DeepCopy

func (in *RetryPolicy) DeepCopy() *RetryPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryPolicy.

func (*RetryPolicy) DeepCopyInto

func (in *RetryPolicy) DeepCopyInto(out *RetryPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Route

type Route struct {
	// Conditions are a set of routing properties that is applied to an HTTPProxy in a namespace.
	// +optional
	Conditions []Condition `json:"conditions,omitempty"`
	// Services are the services to proxy traffic.
	Services []Service `json:"services,omitempty"`
	// Enables websocket support for the route.
	// +optional
	EnableWebsockets bool `json:"enableWebsockets,omitempty"`
	// Allow this path to respond to insecure requests over HTTP which are normally
	// not permitted when a `virtualhost.tls` block is present.
	// +optional
	PermitInsecure bool `json:"permitInsecure,omitempty"`
	// The timeout policy for this route.
	// +optional
	TimeoutPolicy *TimeoutPolicy `json:"timeoutPolicy,omitempty"`
	// The retry policy for this route.
	// +optional
	RetryPolicy *RetryPolicy `json:"retryPolicy,omitempty"`
	// The health check policy for this route.
	// +optional
	HealthCheckPolicy *HTTPHealthCheckPolicy `json:"healthCheckPolicy,omitempty"`
	// The load balancing policy for this route.
	// +optional
	LoadBalancerPolicy *LoadBalancerPolicy `json:"loadBalancerPolicy,omitempty"`
	// The policy for rewriting the path of the request URL
	// after the request has been routed to a Service.
	//
	// +optional
	PathRewritePolicy *PathRewritePolicy `json:"pathRewritePolicy,omitempty"`
	// The policy for managing request headers during proxying
	// +optional
	RequestHeadersPolicy *HeadersPolicy `json:"requestHeadersPolicy,omitempty"`
	// The policy for managing response headers during proxying
	// +optional
	ResponseHeadersPolicy *HeadersPolicy `json:"responseHeadersPolicy,omitempty"`
}

Route contains the set of routes for a virtual host.

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Route) GetPrefixReplacements

func (r *Route) GetPrefixReplacements() []ReplacePrefix

type Service

type Service struct {
	// Name is the name of Kubernetes service to proxy traffic.
	// Names defined here will be used to look up corresponding endpoints which contain the ips to route.
	Name string `json:"name"`
	// Port (defined as Integer) to proxy traffic to since a service can have multiple defined.
	Port int `json:"port"`
	// Protocol may be used to specify (or override) the protocol used to reach this Service.
	// Values may be tls, h2, h2c.  It ommitted protocol-selection falls back on Service annotations.
	// +optional
	Protocol *string `json:"protocol,omitempty"`
	// Weight defines percentage of traffic to balance traffic
	// +optional
	Weight uint32 `json:"weight,omitempty"`
	// UpstreamValidation defines how to verify the backend service's certificate
	// +optional
	UpstreamValidation *UpstreamValidation `json:"validation,omitempty"`
	// If Mirror is true the Service will receive a read only mirror of the traffic for this route.
	Mirror bool `json:"mirror,omitempty"`
	// The policy for managing request headers during proxying
	// +optional
	RequestHeadersPolicy *HeadersPolicy `json:"requestHeadersPolicy,omitempty"`
	// The policy for managing response headers during proxying
	// +optional
	ResponseHeadersPolicy *HeadersPolicy `json:"responseHeadersPolicy,omitempty"`
}

Service defines an Kubernetes Service to proxy traffic.

func (*Service) DeepCopy

func (in *Service) DeepCopy() *Service

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Service.

func (*Service) DeepCopyInto

func (in *Service) DeepCopyInto(out *Service)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Status

type Status struct {
	// +optional
	CurrentStatus string `json:"currentStatus,omitempty"`
	// +optional
	Description string `json:"description,omitempty"`
}

Status reports the current state of the HTTPProxy.

func (*Status) DeepCopy

func (in *Status) DeepCopy() *Status

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.

func (*Status) DeepCopyInto

func (in *Status) DeepCopyInto(out *Status)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPProxy

type TCPProxy struct {
	// The load balancing policy for the backend services.
	// +optional
	LoadBalancerPolicy *LoadBalancerPolicy `json:"loadBalancerPolicy,omitempty"`
	// Services are the services to proxy traffic
	Services []Service `json:"services,omitempty"`

	// Include specifies that this tcpproxy should be delegated to another HTTPProxy.
	// +optional
	Include *TCPProxyInclude `json:"includes,omitempty"`
}

TCPProxy contains the set of services to proxy TCP connections.

func (*TCPProxy) DeepCopy

func (in *TCPProxy) DeepCopy() *TCPProxy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPProxy.

func (*TCPProxy) DeepCopyInto

func (in *TCPProxy) DeepCopyInto(out *TCPProxy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TCPProxyInclude

type TCPProxyInclude struct {
	// Name of the child HTTPProxy
	Name string `json:"name"`
	// Namespace of the HTTPProxy to include. Defaults to the current namespace if not supplied.
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

TCPProxyInclude describes a target HTTPProxy document which contains the TCPProxy details.

func (*TCPProxyInclude) DeepCopy

func (in *TCPProxyInclude) DeepCopy() *TCPProxyInclude

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TCPProxyInclude.

func (*TCPProxyInclude) DeepCopyInto

func (in *TCPProxyInclude) DeepCopyInto(out *TCPProxyInclude)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLS

type TLS struct {
	// required, the name of a secret in the current namespace
	SecretName string `json:"secretName,omitempty"`
	// Minimum TLS version this vhost should negotiate
	// +optional
	MinimumProtocolVersion string `json:"minimumProtocolVersion,omitempty"`
	// If Passthrough is set to true, the SecretName will be ignored
	// and the encrypted handshake will be passed through to the
	// backing cluster.
	// +optional
	Passthrough bool `json:"passthrough,omitempty"`
}

TLS describes tls properties. The CNI names that will be matched on are described in fqdn, the tls.secretName secret must contain a matching certificate unless tls.passthrough is set to true.

func (*TLS) DeepCopy

func (in *TLS) DeepCopy() *TLS

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS.

func (*TLS) DeepCopyInto

func (in *TLS) DeepCopyInto(out *TLS)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TimeoutPolicy

type TimeoutPolicy struct {

	// Timeout for receiving a response from the server after processing a request from client.
	// If not supplied the timeout duration is undefined.
	// +optional
	Response string `json:"response,omitempty"`

	// Timeout after which if there are no active requests for this route, the connection between
	// Envoy and the backend will be closed. If not specified, there is no per-route idle timeout.
	// +optional
	Idle string `json:"idle,omitempty"`
}

TimeoutPolicy defines the attributes associated with timeout.

func (*TimeoutPolicy) DeepCopy

func (in *TimeoutPolicy) DeepCopy() *TimeoutPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeoutPolicy.

func (*TimeoutPolicy) DeepCopyInto

func (in *TimeoutPolicy) DeepCopyInto(out *TimeoutPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UpstreamValidation

type UpstreamValidation struct {
	// Name of the Kubernetes secret be used to validate the certificate presented by the backend
	CACertificate string `json:"caSecret"`
	// Key which is expected to be present in the 'subjectAltName' of the presented certificate
	SubjectName string `json:"subjectName"`
}

UpstreamValidation defines how to verify the backend service's certificate

func (*UpstreamValidation) DeepCopy

func (in *UpstreamValidation) DeepCopy() *UpstreamValidation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamValidation.

func (*UpstreamValidation) DeepCopyInto

func (in *UpstreamValidation) DeepCopyInto(out *UpstreamValidation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VirtualHost

type VirtualHost struct {
	// The fully qualified domain name of the root of the ingress tree
	// all leaves of the DAG rooted at this object relate to the fqdn
	Fqdn string `json:"fqdn"`
	// If present describes tls properties. The CNI names that will be matched on
	// are described in fqdn, the tls.secretName secret must contain a
	// matching certificate
	// +optional
	TLS *TLS `json:"tls,omitempty"`
}

VirtualHost appears at most once. If it is present, the object is considered to be a "root".

func (*VirtualHost) DeepCopy

func (in *VirtualHost) DeepCopy() *VirtualHost

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualHost.

func (*VirtualHost) DeepCopyInto

func (in *VirtualHost) DeepCopyInto(out *VirtualHost)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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