NAME

Kubernetes::REST::V0Group - Base class for backwards-compatible v0 API group wrappers

VERSION

version 1.109

SYNOPSIS

# This API is deprecated - use the new API instead
my $api = Kubernetes::REST->new(...);

# Old way (deprecated):
my $pods = $api->Core->ListNamespacedPod(namespace => 'default');

# New way:
my $pods = $api->list('Pod', namespace => 'default');

DESCRIPTION

This module provides backwards compatibility for the old v0 API that used method names like ListNamespacedPod, ReadNamespacedPod, etc. It translates these calls to the new simplified API.

Every call through this layer emits a deprecation warning unless you set $ENV{HIDE_KUBERNETES_REST_V0_API_WARNING}.

See "UPGRADING FROM 0.02" in Kubernetes::REST for migration guide.

METHODS

This module uses AUTOLOAD to intercept method calls like ListNamespacedPod and translates them to the new API. The following actions are supported:

  • List -> list()

  • Read -> get(); a name ending in Status (ReadNamespacedPodStatus) reads the status subresource, get(..., subresource => 'status')

  • Create -> create()

  • Replace -> update(); a name ending in Status (ReplaceNamespacedPodStatus) replaces through the status subresource, update_status()

  • Delete -> delete()

  • Patch -> patch(); a name ending in Status (PatchNamespacedPodStatus) patches through the status subresource, patch_status()

  • Watch -> watch()

List, Read, Watch, Delete and Patch pass on only the parameters the new method takes - namespace, labelSelector and fieldSelector; name, namespace and subresource; on_event, timeout, resourceVersion, labelSelector, fieldSelector and namespace; name, namespace and propagationPolicy; name, namespace, patch and type - and ignore the others, which the new methods croak on.

The trailing Status is only a subresource suffix when the Kind before it is a real Kind. A Kind whose own name ends in Status - ComponentStatus is the only built-in one - is kept whole: ListComponentStatus and ReadComponentStatus resolve the ComponentStatus Kind itself, not a Status subresource of a Component.

SEE ALSO

Kubernetes::REST

SUPPORT

Issues

Please report bugs and feature requests on GitHub at https://github.com/pplu/kubernetes-rest/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 <getty@cpan.org>

  • Jose Luis Martinez Torres <jlmartin@cpan.org>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2019-2026 by Jose Luis Martinez Torres <jlmartin@cpan.org>.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004