| 1 | package IO::K8s::PrometheusOperator; | ||
| 2 | # ABSTRACT: Prometheus Operator CRD resource map provider for IO::K8s | ||
| 3 | 5 | our $VERSION = '1.112'; | |
| 4 | 5 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 5 | with 'IO::K8s::Role::ResourceMap'; | |
| 6 | |||
| 7 | 1 | ▶ | sub upstream_version { 'v0.93.1' } # prometheus-operator/prometheus-operator |
|
Subroutine
upstream_version: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 8 | |||
| 9 | # Upstream CRD manifests for the pinned upstream_version, consumed by | ||
| 10 | # maint/crd-drift-check.pl. Data only -- no fetching happens here. `base` | ||
| 11 | # + each `files` entry is the raw manifest URL; the checker caches each | ||
| 12 | # under spec/crd/PrometheusOperator/ (path separators flattened to '_'). | ||
| 13 | 0 | ▶ | sub crd_sources { |
|
Subroutine
crd_sources: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 14 | 0 | my $v = __PACKAGE__->upstream_version; | |
| 15 | return { | ||
| 16 | 0 | status => 'ok', | |
| 17 | base => "https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/$v/example/prometheus-operator-crd", | ||
| 18 | files => [ | ||
| 19 | 'monitoring.coreos.com_alertmanagers.yaml', | ||
| 20 | 'monitoring.coreos.com_podmonitors.yaml', | ||
| 21 | 'monitoring.coreos.com_probes.yaml', | ||
| 22 | 'monitoring.coreos.com_prometheuses.yaml', | ||
| 23 | 'monitoring.coreos.com_prometheusrules.yaml', | ||
| 24 | 'monitoring.coreos.com_scrapeconfigs.yaml', | ||
| 25 | 'monitoring.coreos.com_servicemonitors.yaml', | ||
| 26 | ], | ||
| 27 | }; | ||
| 28 | } | ||
| 29 | |||
| 30 | 12 | ▶ | sub resource_map { |
|
Subroutine
resource_map: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 31 | return { | ||
| 32 | # monitoring.coreos.com/v1 | ||
| 33 | 12 | Alertmanager => 'PrometheusOperator::V1::Alertmanager', | |
| 34 | Prometheus => 'PrometheusOperator::V1::Prometheus', | ||
| 35 | ServiceMonitor => 'PrometheusOperator::V1::ServiceMonitor', | ||
| 36 | PodMonitor => 'PrometheusOperator::V1::PodMonitor', | ||
| 37 | Probe => 'PrometheusOperator::V1::Probe', | ||
| 38 | PrometheusRule => 'PrometheusOperator::V1::PrometheusRule', | ||
| 39 | # monitoring.coreos.com/v1alpha1 | ||
| 40 | ScrapeConfig => 'PrometheusOperator::V1alpha1::ScrapeConfig', | ||
| 41 | }; | ||
| 42 | } | ||
| 43 | |||
| 44 | 5 | 1; | |
| 45 | |||
| 46 | __END__ | ||