NAME

IO::K8s::Role::ResourceMap - Role for packages that provide a Kubernetes resource map

VERSION

version 1.001

SYNOPSIS

package IO::K8s::Cilium;
use Moo;
with 'IO::K8s::Role::ResourceMap';

sub resource_map {
    return {
        CiliumNetworkPolicy => '+IO::K8s::Cilium::V2::CiliumNetworkPolicy',
        NetworkPolicy       => '+IO::K8s::Cilium::V2::NetworkPolicy',
    };
}

1;

DESCRIPTION

This role marks packages that provide a Kubernetes resource map, mapping short kind names to class paths. Packages consuming this role can be passed to "add" in IO::K8s or the "with" in IO::K8s constructor parameter to merge their resources into an IO::K8s instance.

The resource_map method must return a hashref mapping kind names (like CiliumNetworkPolicy) to class paths. Class paths without a + prefix are relative to IO::K8s::. Class paths with a + prefix are used as-is.

NAME

IO::K8s::Role::ResourceMap - Role for packages that provide a Kubernetes resource map

REQUIRED METHODS

resource_map

Must return a HashRef mapping kind names to class paths.

SEE ALSO

IO::K8s, "add" in IO::K8s

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