lib/IO/K8s/GatewayAPI.pm

filter: Statementstmt 70.0% 7 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 3 totaltotal 52.9% 9 / 17 CC 1 SCAR 4.1
CC
1
Cov
70%
upstream_version
2.0
crd_sources
2.0
BEGIN
1.0
CRAP 1.5
« lib/IO/K8s/ExternalSecrets.pm ↑ Summary lib/IO/K8s/Traefik.pm »
1 package IO::K8s::GatewayAPI;
2 # ABSTRACT: Gateway API CRD resource map provider for IO::K8s
3 4 our $VERSION = '1.112';
4 4 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 with 'IO::K8s::Role::ResourceMap';
6  
7 0 ▶sub upstream_version { 'v1.6.1' } # kubernetes-sigs/gateway-api (GA/Standard channel only)
Subroutine upstream_version: not called CC=1 SCAR=6.9
Pod undocumented
8  
9 # Upstream CRD manifests for the pinned upstream_version, consumed by
10 # maint/crd-drift-check.pl. Data only -- no fetching here. GA/Standard
11 # channel only (config/crd/standard), matching this provider's scope; the
12 # experimental channel is deliberately not tracked. `base` + each `files`
13 # entry is the raw manifest URL, cached under spec/crd/GatewayAPI/.
14 0 ▶sub crd_sources {
Subroutine crd_sources: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my $v = __PACKAGE__->upstream_version;
16 return {
17 0 status => 'ok',
18 base => "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/$v/config/crd/standard",
19 files => [
20 'gateway.networking.k8s.io_backendtlspolicies.yaml',
21 'gateway.networking.k8s.io_gatewayclasses.yaml',
22 'gateway.networking.k8s.io_gateways.yaml',
23 'gateway.networking.k8s.io_grpcroutes.yaml',
24 'gateway.networking.k8s.io_httproutes.yaml',
25 'gateway.networking.k8s.io_listenersets.yaml',
26 'gateway.networking.k8s.io_referencegrants.yaml',
27 'gateway.networking.k8s.io_tcproutes.yaml',
28 'gateway.networking.k8s.io_tlsroutes.yaml',
29 'gateway.networking.k8s.io_udproutes.yaml',
30 ],
31 };
32 }
33  
34 22 ▶sub resource_map {
Subroutine resource_map: called CC=1 SCAR=0.0
Pod undocumented
35 return {
36 # gateway.networking.k8s.io/v1 -- the storage version of every Kind
37 # except ReferenceGrant; short names resolve here (D7).
38 22 GatewayClass => 'GatewayAPI::V1::GatewayClass',
39 Gateway => 'GatewayAPI::V1::Gateway',
40 HTTPRoute => 'GatewayAPI::V1::HTTPRoute',
41 GRPCRoute => 'GatewayAPI::V1::GRPCRoute',
42 BackendTLSPolicy => 'GatewayAPI::V1::BackendTLSPolicy',
43 ListenerSet => 'GatewayAPI::V1::ListenerSet',
44 TLSRoute => 'GatewayAPI::V1::TLSRoute',
45 TCPRoute => 'GatewayAPI::V1::TCPRoute',
46 UDPRoute => 'GatewayAPI::V1::UDPRoute',
47 # ReferenceGrant is served at both v1 and v1beta1 as of v1.5.0; v1beta1
48 # remains the storage version as of v1.6.1, so it keeps the short name.
49 # The v1 class is reachable via its domain-qualified key below.
50 'gateway.networking.k8s.io/v1/ReferenceGrant' => 'GatewayAPI::V1::ReferenceGrant',
51  
52 # gateway.networking.k8s.io/v1beta1 -- Gateway, GatewayClass and
53 # HTTPRoute are also served here (served: true, storage: false in
54 # the upstream CRD manifest at v1.6.1): older, deprecated tracks of
55 # Kinds whose storage version is v1 (D7 -- every served version gets
56 # a class). Reachable only by their domain-qualified keys, since the
57 # short name resolves to each Kind's storage version above.
58 ReferenceGrant => 'GatewayAPI::V1beta1::ReferenceGrant',
59 'gateway.networking.k8s.io/v1beta1/Gateway' => 'GatewayAPI::V1beta1::Gateway',
60 'gateway.networking.k8s.io/v1beta1/GatewayClass' => 'GatewayAPI::V1beta1::GatewayClass',
61 'gateway.networking.k8s.io/v1beta1/HTTPRoute' => 'GatewayAPI::V1beta1::HTTPRoute',
62 };
63 }
64  
65 4 1;
66  
67 __END__
« lib/IO/K8s/ExternalSecrets.pm ↑ Summary lib/IO/K8s/Traefik.pm »