features

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// FeatureChannelExperimental is used for experimental features.
	FeatureChannelExperimental = "experimental"
	// FeatureChannelStandard is used for standard features.
	FeatureChannelStandard = "standard"
)

Variables

View Source
var (
	// GatewayPort8080Feature contains metadata for the GatewayPort8080 feature.
	GatewayPort8080Feature = Feature{
		Name:    SupportGatewayPort8080,
		Channel: FeatureChannelStandard,
	}
	// GatewayStaticAddressesFeature contains metadata for the GatewayStaticAddresses feature.
	GatewayStaticAddressesFeature = Feature{
		Name:    SupportGatewayStaticAddresses,
		Channel: FeatureChannelStandard,
	}
	// GatewayHTTPListenerIsolationFeature contains metadata for the GatewayHTTPListenerIsolation feature.
	GatewayHTTPListenerIsolationFeature = Feature{
		Name:    SupportGatewayHTTPListenerIsolation,
		Channel: FeatureChannelStandard,
	}
	// GatewayInfrastructurePropagationFeature contains metadata for the GatewayInfrastructurePropagation feature.
	GatewayInfrastructurePropagationFeature = Feature{
		Name:    SupportGatewayInfrastructurePropagation,
		Channel: FeatureChannelExperimental,
	}
)
View Source
var (
	// HTTPRouteDestinationPortMatchingFeature contains metadata for the HTTPRouteDestinationPortMatching feature.
	HTTPRouteDestinationPortMatchingFeature = Feature{
		Name:    SupportHTTPRouteDestinationPortMatching,
		Channel: FeatureChannelExperimental,
	}
	// HTTPRouteBackendRequestHeaderModificationFeature contains metadata for the HTTPRouteBackendRequestHeaderModification feature.
	HTTPRouteBackendRequestHeaderModificationFeature = Feature{
		Name:    SupportHTTPRouteBackendRequestHeaderModification,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteQueryParamMatchingFeature contains metadata for the HTTPRouteQueryParamMatching feature.
	HTTPRouteQueryParamMatchingFeature = Feature{
		Name:    SupportHTTPRouteQueryParamMatching,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteMethodMatchingFeature contains metadata for the HTTPRouteMethodMatching feature.
	HTTPRouteMethodMatchingFeature = Feature{
		Name:    SupportHTTPRouteMethodMatching,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteResponseHeaderModificationFeature contains metadata for the HTTPRouteResponseHeaderModification feature.
	HTTPRouteResponseHeaderModificationFeature = Feature{
		Name:    SupportHTTPRouteResponseHeaderModification,
		Channel: FeatureChannelStandard,
	}
	// HTTPRoutePortRedirectFeature contains metadata for the HTTPRoutePortRedirect feature.
	HTTPRoutePortRedirectFeature = Feature{
		Name:    SupportHTTPRoutePortRedirect,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteSchemeRedirectFeature contains metadata for the HTTPRouteSchemeRedirect feature.
	HTTPRouteSchemeRedirectFeature = Feature{
		Name:    SupportHTTPRouteSchemeRedirect,
		Channel: FeatureChannelStandard,
	}
	// HTTPRoutePathRedirectFeature contains metadata for the HTTPRoutePathRedirect feature.
	HTTPRoutePathRedirectFeature = Feature{
		Name:    SupportHTTPRoutePathRedirect,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteHostRewriteFeature contains metadata for the HTTPRouteHostRewrite feature.
	HTTPRouteHostRewriteFeature = Feature{
		Name:    SupportHTTPRouteHostRewrite,
		Channel: FeatureChannelStandard,
	}
	// HTTPRoutePathRewriteFeature contains metadata for the HTTPRoutePathRewrite feature.
	HTTPRoutePathRewriteFeature = Feature{
		Name:    SupportHTTPRoutePathRewrite,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteRequestMirrorFeature contains metadata for the HTTPRouteRequestMirror feature.
	HTTPRouteRequestMirrorFeature = Feature{
		Name:    SupportHTTPRouteRequestMirror,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteRequestMultipleMirrorsFeature contains metadata for the HTTPRouteRequestMultipleMirrors feature.
	HTTPRouteRequestMultipleMirrorsFeature = Feature{
		Name:    SupportHTTPRouteRequestMultipleMirrors,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteRequestTimeoutFeature contains metadata for the HTTPRouteRequestTimeout feature.
	HTTPRouteRequestTimeoutFeature = Feature{
		Name:    SupportHTTPRouteRequestTimeout,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteBackendTimeoutFeature contains metadata for the HTTPRouteBackendTimeout feature.
	HTTPRouteBackendTimeoutFeature = Feature{
		Name:    SupportHTTPRouteBackendTimeout,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteParentRefPortFeature contains metadata for the HTTPRouteParentRefPort feature.
	HTTPRouteParentRefPortFeature = Feature{
		Name:    SupportHTTPRouteParentRefPort,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteBackendProtocolH2CFeature contains metadata for the HTTPRouteBackendProtocolH2C feature.
	HTTPRouteBackendProtocolH2CFeature = Feature{
		Name:    SupportHTTPRouteBackendProtocolH2C,
		Channel: FeatureChannelStandard,
	}
	// HTTPRouteBackendProtocolWebSocketFeature contains metadata for the HTTPRouteBackendProtocolWebSocket feature.
	HTTPRouteBackendProtocolWebSocketFeature = Feature{
		Name:    SupportHTTPRouteBackendProtocolWebSocket,
		Channel: FeatureChannelStandard,
	}
)
View Source
var (
	// MeshClusterIPMatchingFeature contains metadata for the MeshClusterIPMatching feature.
	MeshClusterIPMatchingFeature = Feature{
		Name:    SupportMeshClusterIPMatching,
		Channel: FeatureChannelStandard,
	}
	// MeshConsumerRouteFeature contains metadata for the MeshConsumerRoute feature.
	MeshConsumerRouteFeature = Feature{
		Name:    SupportMeshConsumerRoute,
		Channel: FeatureChannelStandard,
	}
)
View Source
var (
	AllFeatures = sets.New[Feature]().
		Insert(GatewayCoreFeatures.UnsortedList()...).
		Insert(GatewayExtendedFeatures.UnsortedList()...).
		Insert(ReferenceGrantCoreFeatures.UnsortedList()...).
		Insert(HTTPRouteCoreFeatures.UnsortedList()...).
		Insert(HTTPRouteExtendedFeatures.UnsortedList()...).
		Insert(TLSRouteCoreFeatures.UnsortedList()...).
		Insert(MeshCoreFeatures.UnsortedList()...).
		Insert(MeshExtendedFeatures.UnsortedList()...).
		Insert(GRPCRouteCoreFeatures.UnsortedList()...)
)
View Source
var GRPCRouteCoreFeatures = sets.New(
	GRPCRouteFeature,
)

GRPCRouteCoreFeatures includes all the supported features for GRPCRoute at a Core level of support.

View Source
var GRPCRouteFeature = Feature{
	Name:    SupportGRPCRoute,
	Channel: FeatureChannelStandard,
}

GRPCRouteFeature contains metadata for the GRPCRoute feature.

View Source
var GatewayCoreFeatures = sets.New(
	GatewayFeature,
)

GatewayCoreFeatures are the features that are required to be conformant with the Gateway resource.

GatewayExtendedFeatures are extra generic features that implementations may choose to support as an opt-in. This does not include any Core Features.

View Source
var GatewayFeature = Feature{
	Name:    SupportGateway,
	Channel: FeatureChannelStandard,
}

GatewayFeature contains metadata for the Gateway feature.

View Source
var HTTPRouteCoreFeatures = sets.New(
	HTTPRouteFeature,
)

HTTPRouteCoreFeatures includes all SupportedFeatures needed to be conformant with the HTTPRoute resource.

HTTPRouteExtendedFeatures includes all extended features for HTTPRoute conformance and can be used to opt-in to run all HTTPRoute extended features tests. This does not include any Core Features.

View Source
var HTTPRouteFeature = Feature{
	Name:    SupportHTTPRoute,
	Channel: FeatureChannelStandard,
}

HTTPRouteFeature contains metadata for the HTTPRoute feature.

View Source
var MeshCoreFeatures = sets.New(
	MeshFeature,
)

MeshCoreFeatures includes all the supported features for the service mesh at a Core level of support.

MeshExtendedFeatures includes all the supported features for the service mesh at an Extended level of support.

View Source
var MeshFeature = Feature{
	Name:    SupportMesh,
	Channel: FeatureChannelStandard,
}

MeshFeature contains metadata for the Mesh feature.

View Source
var ReferenceGrantCoreFeatures = sets.New(
	ReferenceGrantFeature,
)

ReferenceGrantCoreFeatures includes all SupportedFeatures needed to be conformant with the ReferenceGrant resource.

View Source
var ReferenceGrantFeature = Feature{
	Name:    SupportReferenceGrant,
	Channel: FeatureChannelStandard,
}

ReferenceGrantFeature contains metadata for the ReferenceGrant feature.

View Source
var TLSRouteCoreFeatures = sets.New(
	TLSRouteFeature,
)

TLSCoreFeatures includes all the supported features for the TLSRoute API at a Core level of support.

View Source
var TLSRouteFeature = Feature{
	Name:    SupportTLSRoute,
	Channel: FeatureChannelExperimental,
}

TLSRouteFeature contains metadata for the TLSRoute feature.

View Source
var UDPRouteFeature = Feature{
	Name:    SupportUDPRoute,
	Channel: FeatureChannelExperimental,
}

UDPRouteFeature contains metadata for the UDPRoute feature.

UDPRouteCoreFeatures includes all SupportedFeatures needed to be conformant with the UDPRoute resource.

Functions

func SetsToNamesSet added in v1.2.0

func SetsToNamesSet(featuresSets ...sets.Set[Feature]) sets.Set[FeatureName]

SetsToNamesSet merges multiple sets of features into a single one and returns it.

Types

type Feature added in v1.2.0

type Feature struct {
	Name    FeatureName
	Channel FeatureChannel
}

Feature is a struct that represents a feature.

func GetFeature added in v1.2.0

func GetFeature(name FeatureName) Feature

GetFeature returns the feature with the given name.

type FeatureChannel added in v1.2.0

type FeatureChannel string

FeatureChannel is the type used to represent the channel a feature belongs to.

type FeatureName added in v1.2.0

type FeatureName string

FeatureName is the type used to represent the name of a feature.

const (
	// This option indicates that the Gateway can also use port 8080
	SupportGatewayPort8080 FeatureName = "GatewayPort8080"

	// SupportGatewayStaticAddresses option indicates that the Gateway is capable
	// of allocating pre-determined addresses, rather than dynamically having
	// addresses allocated for it.
	SupportGatewayStaticAddresses FeatureName = "GatewayStaticAddresses"

	// SupportGatewayHTTPListenerIsolation option indicates support for the isolation
	// of HTTP listeners.
	SupportGatewayHTTPListenerIsolation FeatureName = "GatewayHTTPListenerIsolation"

	// SupportGatewayInfrastructureAnnotations option indicates support for
	// spec.infrastructure.annotations and spec.infrastrucutre.labels
	SupportGatewayInfrastructurePropagation FeatureName = "GatewayInfrastructurePropagation"
)
const (
	// This option indicates support for Destination Port matching.
	SupportHTTPRouteDestinationPortMatching FeatureName = "HTTPRouteDestinationPortMatching"

	// This option indicates support for HTTPRoute backend request header modification
	SupportHTTPRouteBackendRequestHeaderModification FeatureName = "HTTPRouteBackendRequestHeaderModification"

	// This option indicates support for HTTPRoute query param matching (extended conformance).
	SupportHTTPRouteQueryParamMatching FeatureName = "HTTPRouteQueryParamMatching"

	// This option indicates support for HTTPRoute method matching (extended conformance).
	SupportHTTPRouteMethodMatching FeatureName = "HTTPRouteMethodMatching"

	// This option indicates support for HTTPRoute response header modification (extended conformance).
	SupportHTTPRouteResponseHeaderModification FeatureName = "HTTPRouteResponseHeaderModification"

	// This option indicates support for HTTPRoute port redirect (extended conformance).
	SupportHTTPRoutePortRedirect FeatureName = "HTTPRoutePortRedirect"

	// This option indicates support for HTTPRoute scheme redirect (extended conformance).
	SupportHTTPRouteSchemeRedirect FeatureName = "HTTPRouteSchemeRedirect"

	// This option indicates support for HTTPRoute path redirect (extended conformance).
	SupportHTTPRoutePathRedirect FeatureName = "HTTPRoutePathRedirect"

	// This option indicates support for HTTPRoute host rewrite (extended conformance)
	SupportHTTPRouteHostRewrite FeatureName = "HTTPRouteHostRewrite"

	// This option indicates support for HTTPRoute path rewrite (extended conformance)
	SupportHTTPRoutePathRewrite FeatureName = "HTTPRoutePathRewrite"

	// This option indicates support for HTTPRoute request mirror (extended conformance).
	SupportHTTPRouteRequestMirror FeatureName = "HTTPRouteRequestMirror"

	// This option indicates support for multiple RequestMirror filters within the same HTTPRoute rule (extended conformance).
	SupportHTTPRouteRequestMultipleMirrors FeatureName = "HTTPRouteRequestMultipleMirrors"

	// This option indicates support for HTTPRoute request timeouts (extended conformance).
	SupportHTTPRouteRequestTimeout FeatureName = "HTTPRouteRequestTimeout"

	// This option indicates support for HTTPRoute backendRequest timeouts (extended conformance).
	SupportHTTPRouteBackendTimeout FeatureName = "HTTPRouteBackendTimeout"

	// This option indicates support for HTTPRoute parentRef port (extended conformance).
	SupportHTTPRouteParentRefPort FeatureName = "HTTPRouteParentRefPort"

	// This option indicates support for HTTPRoute with a backendref with an appProtocol 'kubernetes.io/h2c' (extended conformance)
	SupportHTTPRouteBackendProtocolH2C FeatureName = "HTTPRouteBackendProtocolH2C"

	// This option indicates support for HTTPRoute with a backendref with an appProtoocol 'kubernetes.io/ws' (extended conformance)
	SupportHTTPRouteBackendProtocolWebSocket FeatureName = "HTTPRouteBackendProtocolWebSocket"
)
const (
	// This option indicates support for matching Service traffic specifically by Cluster IP rather than other mechanisms.
	SupportMeshClusterIPMatching FeatureName = "MeshClusterIPMatching"
	// This option indicates support for "consumer" routes, where a namespace creates a route for a service in another namespace.
	SupportMeshConsumerRoute FeatureName = "MeshConsumerRoute"
)
const (
	// This option indicates general support for GRPCRoute.
	SupportGRPCRoute FeatureName = "GRPCRoute"
)
const (
	// This option indicates support for Gateway.
	// Opting out of this is allowed only for GAMMA-only implementations
	SupportGateway FeatureName = "Gateway"
)
const (
	// This option indicates support for HTTPRoute
	SupportHTTPRoute FeatureName = "HTTPRoute"
)
const (
	// This option indicates general support for service mesh
	SupportMesh FeatureName = "Mesh"
)
const (
	// This option indicates support for ReferenceGrant.
	SupportReferenceGrant FeatureName = "ReferenceGrant"
)
const (
	// This option indicates support for TLSRoute
	SupportTLSRoute FeatureName = "TLSRoute"
)
const (
	// This option indicates support for UDPRoute
	SupportUDPRoute FeatureName = "UDPRoute"
)

Jump to

Keyboard shortcuts

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