| 1 | package Kubernetes::Comb::Static; | ||
| 2 | # ABSTRACT: A Comb whose manifests are .pk8s and YAML files | ||
| 3 | 1 | our $VERSION = '0.001'; | |
| 4 | |||
| 5 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | extends 'Kubernetes::Comb'; | |
| 7 | 1 | with 'Kubernetes::Comb::Role::Static'; | |
| 8 | |||
| 9 | 1 | ▶ | use Carp qw( croak ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | |||
| 13 | 1 | ▶ | sub manifest_files { |
|
Subroutine
manifest_files: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | 1 | my ( $self ) = @_; | |
| 15 | 1 | croak ref($self).' has no manifest files: override manifest_files'; | |
| 16 | } | ||
| 17 | |||
| 18 | |||
| 19 | 1 | 1; | |
| 20 | |||
| 21 | __END__ | ||
| 22 | |||
| 23 | =pod | ||
| 24 | |||
| 25 | =encoding UTF-8 | ||
| 26 | |||
| 27 | =head1 NAME | ||
| 28 | |||
| 29 | Kubernetes::Comb::Static - A Comb whose manifests are .pk8s and YAML files | ||
| 30 | |||
| 31 | =head1 VERSION | ||
| 32 | |||
| 33 | version 0.001 | ||
| 34 | |||
| 35 | =head1 SYNOPSIS | ||
| 36 | |||
| 37 | package MyApp::Comb::GeoIP; | ||
| 38 | use Moo; | ||
| 39 | extends 'Kubernetes::Comb::Static'; | ||
| 40 | |||
| 41 | use File::ShareDir qw( dist_dir ); | ||
| 42 | |||
| 43 | sub endpoints { { name => 'http', port => 8080 } } | ||
| 44 | sub manifest_dir { dist_dir('MyApp-Combs') } | ||
| 45 | sub manifest_files { 'geoip.yaml', 'geoip-cron.pk8s' } | ||
| 46 | |||
| 47 | =head1 DESCRIPTION | ||
| 48 | |||
| 49 | A L<Kubernetes::Comb> whose L<Kubernetes::Comb/manifests> come from files, by | ||
| 50 | L<Kubernetes::Comb::Role::Static>. A subclass names the files with | ||
| 51 | C<manifest_files> and where relative ones are with C<manifest_dir>; | ||
| 52 | everything else of the contract is the one of L<Kubernetes::Comb>. | ||
| 53 | |||
| 54 | For the stub of an existing Comb class -- which has to extend that class -- | ||
| 55 | compose L<Kubernetes::Comb::Role::Static> instead. | ||
| 56 | |||
| 57 | =head2 manifest_files | ||
| 58 | |||
| 59 | Dies: a subclass overrides it with its list of files, see | ||
| 60 | L<Kubernetes::Comb::Role::Static/manifest_files>. | ||
| 61 | |||
| 62 | =head1 SEE ALSO | ||
| 63 | |||
| 64 | =over | ||
| 65 | |||
| 66 | =item * L<Kubernetes::Comb::Role::Static> | ||
| 67 | |||
| 68 | =item * L<Kubernetes::Comb> | ||
| 69 | |||
| 70 | =back | ||
| 71 | |||
| 72 | =head1 SUPPORT | ||
| 73 | |||
| 74 | =head2 Issues | ||
| 75 | |||
| 76 | Please report bugs and feature requests on GitHub at | ||
| 77 | L<https://github.com/Getty/p5-kubernetes-comb/issues>. | ||
| 78 | |||
| 79 | =head2 IRC | ||
| 80 | |||
| 81 | Join C<#kubernetes> on C<irc.perl.org> or message Getty directly. | ||
| 82 | |||
| 83 | =head1 CONTRIBUTING | ||
| 84 | |||
| 85 | Contributions are welcome! Please fork the repository and submit a pull request. | ||
| 86 | |||
| 87 | =head1 AUTHOR | ||
| 88 | |||
| 89 | Torsten Raudssus <getty@cpan.org> | ||
| 90 | |||
| 91 | =head1 COPYRIGHT AND LICENSE | ||
| 92 | |||
| 93 | This software is copyright (c) 2026 by Torsten Raudssus <torsten@raudssus.de> L<https://raudssus.de/>. | ||
| 94 | |||
| 95 | This is free software; you can redistribute it and/or modify it under | ||
| 96 | the same terms as the Perl 5 programming language system itself. | ||
| 97 | |||
| 98 | =cut | ||