resources

package
v2.11.13 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package resources holds simple functions for synthesizing child resources from a Route.

Index

Constants

View Source
const (

	// KfAppMatchHeader is an HTTP header supplied with the name of an app
	// so a route will direct all traffic directly to that app.
	KfAppMatchHeader = "X-Kf-App"

	// CfForwardedURLHeader contains the originally requested URL.
	// A route service may choose to forward the request to this URL or to another.
	// Route Services in CF are required to forward this header.
	CfForwardedURLHeader = "X-CF-Forwarded-Url"

	// CfProxySignatureHeader is an encrypted value that signals that the request has already gone through a route service.
	// Route Services in CF are required to forward this header.
	CfProxySignatureHeader = "X-CF-Proxy-Signature"

	// CfProxyMetadataHeader aids in the encryption and description of X-CF-Proxy-Signature.
	// Route Services in CF are required to forward this header.
	CfProxyMetadataHeader = "X-CF-Proxy-Metadata"

	// DomainAnnotation is the annotation key that holds the domain.
	DomainAnnotation = "kf.dev/domain"

	// KfExternalIngressGateway holds the gateway for Kf's external HTTP ingress.
	KfExternalIngressGateway = "kf/external-gateway"

	// KfInternalIngressGateway is used as a flag to specify the internal routing.
	// With ASM 1.7 all the internal east-west traffic can use side car proxy and we do not need any additional gateway.
	KfInternalIngressGateway = "kf/internal-gateway"
)

Variables

This section is empty.

Functions

func MakeVirtualService

func MakeVirtualService(
	routes []*v1alpha1.Route,
	bindings map[string]RouteBindingSlice,
	routeServiceBindings map[string][]v1alpha1.RouteServiceDestination,
	spaceDomain *v1alpha1.SpaceDomain,
	defaultsConfig *kfconfig.DefaultsConfig,
) (*kfistio.VirtualService, error)

MakeVirtualService creates a VirtualService from a Route object.

func MakeVirtualServiceName

func MakeVirtualServiceName(domain string) string

MakeVirtualServiceName creates the name of the VirtualService with the given domain.

Types

type RouteBindingSlice

type RouteBindingSlice []v1alpha1.RouteDestination

RouteBindingSlice is a sortable list of v1alpha1.RouteDestination.

func (RouteBindingSlice) Len

func (a RouteBindingSlice) Len() int

Len implements sort.Interface::Len

func (RouteBindingSlice) Less

func (a RouteBindingSlice) Less(i, j int) bool

Less implements sort.Interface::Less

func (RouteBindingSlice) Swap

func (a RouteBindingSlice) Swap(i, j int)

Swap implements sort.Interface::Swap

Jump to

Keyboard shortcuts

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