NAME
IO::K8s::List - Generic list container for Kubernetes API responses
VERSION
version 1.001
SYNOPSIS
use IO::K8s::List;
my $list = IO::K8s::List->new(
items => \@pods,
metadata => $list_meta,
);
# apiVersion and kind are derived from items
print $list->api_version; # v1
print $list->kind; # PodList
DESCRIPTION
Generic container for Kubernetes list responses. Instead of having separate PodList, ServiceList, DeploymentList classes, this single class handles all list types.
The apiVersion and kind are automatically derived from the items.
items
Array of Kubernetes API objects. Required.
metadata
List metadata (IO::K8s::Apimachinery::Pkg::Apis::Meta::V1::ListMeta). Contains pagination info like continue and resourceVersion.
item_class
Optional. The class of items in the list. If not provided, derived from the first item. Used for empty lists where the type can't be inferred.
api_version
Returns the Kubernetes API version, derived from items or item_class.
kind
Returns the Kubernetes kind (e.g., "PodList"), derived from items or item_class.
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/pplu/io-k8s-p5/issues.
IRC
Join #kubernetes on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHORS
Torsten Raudssus <torsten@raudssus.de>
Jose Luis Martinez <jlmartin@cpan.org> (original author, inactive)
COPYRIGHT AND LICENSE
This software is Copyright (c) 2018 by Jose Luis Martinez.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004