Skip Menu |
 

This queue is for tickets about the Net-Kubernetes CPAN distribution.

Report information
The Basics
Id: 124334
Status: new
Priority: 0/
Queue: Net-Kubernetes

People
Owner: Nobody in particular
Requestors: guillelbz [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Re: Using Net::Kubernetes
Date: Tue, 6 Feb 2018 10:33:33 +0100
To: bug-Net-Kubernetes [...] rt.cpan.org
From: Guillermo <guillelbz [...] gmail.com>
Download (untitled) / with headers
text/plain 2.2k
This is the Endpoint YAML file definition, which works perfectly in kubernetes: -------------------------------------------------------------------- kind: Endpoints apiVersion: v1 metadata: namespace: default name: glusterfs-machines subsets: - addresses: - ip: 192.168.215.6 ports: - port: 24007 --------------------------------------------------------------------- This is the Perl error stack: #################################################### Attribute (subsets) does not pass the type constraint because: Validation failed for 'ArrayRef[HashRef]' with value undef at /usr/local/lib/x86_64-linux-gnu/perl/5.22.1/Moose/Object.pm line 24 Moose::Object::new('Net::Kubernetes::Resource::Endpoint', 'kind', 'Endpoint', 'url', 'http://127.0.0.1:8080', 'metadata', 'HASH(0x41ba7b8)', 'apiVersion', 'v1', 'subsets', undef, 'base_path', '/api/v1/namespaces/default/endpoints/etcd-client', 'api_version', 'v1') called at /usr/local/share/perl/5.22.1/Net/Kubernetes/Role/ResourceFactory.pm line 29 Net::Kubernetes::Role::ResourceFactory::create_resource_object('Net::Kubernetes=HASH(0x337c360)', 'HASH(0x41ba8f0)', 'Endpoint') called at /usr/local/share/perl/5.22.1/Net/Kubernetes/Role/ResourceLister.pm line 190 Net::Kubernetes::Role::ResourceLister::list_endpoints('Net::Kubernetes=HASH(0x337c360)') called at testKube.pl line 84 #################################################### Un saludo, Guillermo López. 2018-02-05 19:44 GMT+01:00 Guillermo <guillelbz@gmail.com>: Show quoted text
> Hello, > > Are there any example about the usage of list_endpoints() ? > > The following code works perefectly, except the call to list_endpoints(): > > > > ########################################################## > my $kube = Net::Kubernetes->new(url=>'http://127.0.0.1:8080'); > > my $pod_list = $kube->list_pods(); > print Dumper $pod_list; > > my $svc_list = $kube->list_services(); > print Dumper $svc_list; > > my $ep_list = $kube->list_endpoints(); > print Dumper $ep_list; > ########################################################## > > Do I need to do something explicit with the class "Net::Kubernetes::Role::ResourceLister" > ? > > I am using: > OS: Ubuntu 16.04 > Net::Kubernetes v1.03 > Perl 5.22 > > > Best regards, > > Guillermo López. >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.