Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllFeatures = sets.New[SupportedFeature](). Insert(StandardExtendedFeatures.UnsortedList()...). Insert(ExperimentalExtendedFeatures.UnsortedList()...). Insert(HTTPExtendedFeatures.UnsortedList()...). Insert(TLSCoreFeatures.UnsortedList()...). Insert(MeshCoreFeatures.UnsortedList()...)
AllFeatures contains all the supported features and can be used to run all conformance tests with `all-features` flag.
NOTE: as new feature sets are added they should be inserted into this set.
var ExperimentalExtendedFeatures = sets.New( SupportRouteDestinationPortMatching, )
ExperimentalExtendedFeatures are extra generic features that are currently only available in our experimental release channel, and at an extended support level.
TODO: we need clarity for standard vs experimental features. See: https://github.com/kubernetes-sigs/gateway-api/issues/1891
var HTTPCoreFeatures = sets.New( SupportHTTPRoute, )
HTTPCoreFeatures includes all SupportedFeatures needed to be conformant with the HTTPRoute.
var HTTPExtendedFeatures = sets.New( SupportHTTPRouteQueryParamMatching, SupportHTTPRouteMethodMatching, SupportHTTPResponseHeaderModification, SupportHTTPRoutePortRedirect, SupportHTTPRouteSchemeRedirect, SupportHTTPRoutePathRedirect, SupportHTTPRouteHostRewrite, SupportHTTPRoutePathRewrite, SupportHTTPRouteRequestMirror, ).Insert(HTTPCoreFeatures.UnsortedList()...)
HTTPExtendedFeatures includes all the supported features for HTTPRoute conformance and can be used to opt-in to run all HTTPRoute tests, including extended features.
var MeshCoreFeatures = sets.New( SupportMesh, )
MeshCoreFeatures includes all the supported features for the service mesh at a Core level of support.
var StandardCoreFeatures = sets.New( SupportReferenceGrant, SupportGateway, )
StandardCoreFeatures are the features that are required to be conformant with the Core API features (e.g. GatewayClass, Gateway, e.t.c.).
TODO: we need clarity for standard vs experimental features. See: https://github.com/kubernetes-sigs/gateway-api/issues/1891
var StandardExtendedFeatures = sets.New( SupportGatewayClassObservedGenerationBump, ).Insert(StandardCoreFeatures.UnsortedList()...)
StandardExtendedFeatures are extra generic features that implementations may choose to support as an opt-in.
TODO: we need clarity for standard vs experimental features. See: https://github.com/kubernetes-sigs/gateway-api/issues/1891
var TLSCoreFeatures = sets.New( SupportTLSRoute, )
TLSCoreFeatures includes all the supported features for the TLSRoute API at a Core level of support.
Functions ¶
This section is empty.
Types ¶
type ConformanceTest ¶
type ConformanceTest struct { ShortName string Description string Features []SupportedFeature Manifests []string Slow bool Parallel bool Test func(*testing.T, *ConformanceTestSuite) }
ConformanceTest is used to define each individual conformance test.
func (*ConformanceTest) Run ¶
func (test *ConformanceTest) Run(t *testing.T, suite *ConformanceTestSuite)
Run runs an individual tests, applying and cleaning up the required manifests before calling the Test function.
type ConformanceTestSuite ¶
type ConformanceTestSuite struct { Client client.Client Clientset *clientset.Clientset RESTClient *rest.RESTClient RestConfig *rest.Config RoundTripper roundtripper.RoundTripper GatewayClassName string ControllerName string Debug bool Cleanup bool BaseManifests string MeshManifests string Applier kubernetes.Applier SupportedFeatures sets.Set[SupportedFeature] TimeoutConfig config.TimeoutConfig SkipTests sets.Set[string] FS embed.FS }
ConformanceTestSuite defines the test suite used to run Gateway API conformance tests.
func (*ConformanceTestSuite) Run ¶
func (suite *ConformanceTestSuite) Run(t *testing.T, tests []ConformanceTest)
Run runs the provided set of conformance tests.
func (*ConformanceTestSuite) Setup ¶
func (suite *ConformanceTestSuite) Setup(t *testing.T)
Setup ensures the base resources required for conformance tests are installed in the cluster. It also ensures that all relevant resources are ready.
type Options ¶
type Options struct { Client client.Client Clientset *clientset.Clientset RESTClient *rest.RESTClient RestConfig *rest.Config GatewayClassName string Debug bool RoundTripper roundtripper.RoundTripper BaseManifests string MeshManifests string NamespaceLabels map[string]string // CleanupBaseResources indicates whether or not the base test // resources such as Gateways should be cleaned up after the run. CleanupBaseResources bool SupportedFeatures sets.Set[SupportedFeature] ExemptFeatures sets.Set[SupportedFeature] EnableAllSupportedFeatures bool TimeoutConfig config.TimeoutConfig // SkipTests contains all the tests not to be run and can be used to opt out // of specific tests SkipTests []string FS *embed.FS }
Options can be used to initialize a ConformanceTestSuite.
type SupportedFeature ¶
type SupportedFeature string
SupportedFeature allows opting in to additional conformance tests at an individual feature granularity.
const ( // This option indicates support for ReferenceGrant (core conformance). // Opting out of this requires an implementation to have clearly implemented // and documented equivalent safeguards. SupportReferenceGrant SupportedFeature = "ReferenceGrant" // This option indicates support for Gateway (core conformance). // Opting out of this is allowed only for GAMMA-only implementations SupportGateway SupportedFeature = "Gateway" )
const ( // This option indicates support for HTTPRoute query param matching (extended conformance). SupportHTTPRouteQueryParamMatching SupportedFeature = "HTTPRouteQueryParamMatching" // This option indicates support for HTTPRoute method matching (extended conformance). SupportHTTPRouteMethodMatching SupportedFeature = "HTTPRouteMethodMatching" // This option indicates support for HTTPRoute response header modification (extended conformance). SupportHTTPResponseHeaderModification SupportedFeature = "HTTPResponseHeaderModification" // This option indicates support for HTTPRoute port redirect (extended conformance). SupportHTTPRoutePortRedirect SupportedFeature = "HTTPRoutePortRedirect" // This option indicates support for HTTPRoute scheme redirect (extended conformance). SupportHTTPRouteSchemeRedirect SupportedFeature = "HTTPRouteSchemeRedirect" // This option indicates support for HTTPRoute path redirect (experimental conformance). SupportHTTPRoutePathRedirect SupportedFeature = "HTTPRoutePathRedirect" // This option indicates support for HTTPRoute host rewrite (experimental conformance) SupportHTTPRouteHostRewrite SupportedFeature = "HTTPRouteHostRewrite" // This option indicates support for HTTPRoute path rewrite (experimental conformance) SupportHTTPRoutePathRewrite SupportedFeature = "HTTPRoutePathRewrite" // This option indicates support for HTTPRoute request mirror (extended conformance). SupportHTTPRouteRequestMirror SupportedFeature = "HTTPRouteRequestMirror" )
const ( // This option indicates GatewayClass will update the observedGeneration in // it's conditions when reconciling (extended conformance). // // NOTE: we intend to make this core and require implementations to do it // as we expect this is something every implementation should be able // to do and it's ideal behavior. // // See: https://github.com/kubernetes-sigs/gateway-api/issues/1780 SupportGatewayClassObservedGenerationBump SupportedFeature = "GatewayClassObservedGenerationBump" )
const ( // This option indicates support for HTTPRoute SupportHTTPRoute SupportedFeature = "HTTPRoute" )
const ( // This option indicates general support for service mesh SupportMesh SupportedFeature = "Mesh" )
const ( // This option indicates support for Destination Port matching. SupportRouteDestinationPortMatching SupportedFeature = "RouteDestinationPortMatching" )
const ( // This option indicates support for TLSRoute SupportTLSRoute SupportedFeature = "TLSRoute" )