lib/IO/K8s/AgentSandbox.pm

filter: Statementstmt 80.0% 8 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 3 totaltotal 64.7% 11 / 17 CC 1 SCAR 2.2
CC
1
Cov
80%
crd_sources
2.0
BEGIN
1.0
upstream_version
1.0
CRAP 1.2
« lib/IO/K8s/Role/MiddlewareTCPBuilder.pm ↑ Summary lib/IO/K8s/PrometheusOperator.pm »
1 package IO::K8s::AgentSandbox;
2 # ABSTRACT: AgentSandbox CRD resource map provider for IO::K8s
3 8 our $VERSION = '1.112';
4 8 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 with 'IO::K8s::Role::ResourceMap';
6  
7 1 ▶sub upstream_version { 'v1.0.0' } # kubernetes-sigs/agent-sandbox
Subroutine upstream_version: called CC=1 SCAR=0.0
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. The canonical
11 # CRD bases live under k8s/crds; `base` + each `files` entry is the raw
12 # manifest URL, cached under spec/crd/AgentSandbox/.
13 0 ▶sub crd_sources {
Subroutine crd_sources: not called CC=1 SCAR=6.9
Pod undocumented
14 0 my $v = __PACKAGE__->upstream_version;
15 return {
16 0 status => 'ok',
17 base => "https://raw.githubusercontent.com/kubernetes-sigs/agent-sandbox/$v/k8s/crds",
18 files => [
19 'agents.x-k8s.io_sandboxes.yaml',
20 'extensions.agents.x-k8s.io_sandboxclaims.yaml',
21 'extensions.agents.x-k8s.io_sandboxtemplates.yaml',
22 'extensions.agents.x-k8s.io_sandboxwarmpools.yaml',
23 ],
24 };
25 }
26  
27 27 ▶sub resource_map {
Subroutine resource_map: called CC=1 SCAR=0.0
Pod undocumented
28 return {
29 # agents.x-k8s.io/v1beta1 (storage version)
30 27 Sandbox => 'AgentSandbox::V1beta1::Sandbox',
31 # extensions.agents.x-k8s.io/v1beta1 (storage version)
32 SandboxClaim => 'AgentSandbox::V1beta1::SandboxClaim',
33 SandboxTemplate => 'AgentSandbox::V1beta1::SandboxTemplate',
34 SandboxWarmPool => 'AgentSandbox::V1beta1::SandboxWarmPool',
35 # v1alpha1 was served through the v0.5.x line and was REMOVED upstream
36 # at v1.0.0; these classes are kept here as back-compat for clusters
37 # still on agent-sandbox v0.5.x. The short names above stay on v1beta1
38 # (now the only upstream-served version) and the older track is
39 # reachable through these domain-qualified keys only (k58, k88). The
40 # matching v1beta1 qualified keys need no literal entry here:
41 # IO::K8s::add() derives them from each mapped class's own
42 # api_version().
43 'agents.x-k8s.io/v1alpha1/Sandbox' => 'AgentSandbox::V1alpha1::Sandbox',
44 'extensions.agents.x-k8s.io/v1alpha1/SandboxClaim' => 'AgentSandbox::V1alpha1::SandboxClaim',
45 'extensions.agents.x-k8s.io/v1alpha1/SandboxTemplate' => 'AgentSandbox::V1alpha1::SandboxTemplate',
46 'extensions.agents.x-k8s.io/v1alpha1/SandboxWarmPool' => 'AgentSandbox::V1alpha1::SandboxWarmPool',
47 };
48 }
49  
50 8 1;
51  
52 __END__
« lib/IO/K8s/Role/MiddlewareTCPBuilder.pm ↑ Summary lib/IO/K8s/PrometheusOperator.pm »