Enable cache in openstack-exporter

Also remove the scrape_timeout override.
This is discouraged by the prometheus_scrape lib,
and should no longer be necessary if the exporter has a cache.

We also need to use a newer build of the oci-image
that has the cache feature.

Change-Id: Ibac014171a084798ec1731553bbd896497d232a0
This commit is contained in:
Samuel Allan 2024-10-11 15:25:17 +10:30
parent cd6ca21425
commit 213a659f8d
No known key found for this signature in database
GPG Key ID: 622F8E99C893BD61
3 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ resources:
openstack-exporter-image:
type: oci-image
description: OCI image for OpenStack openstack-exporter
upstream-source: ghcr.io/canonical/openstack-exporter:1.7.0
upstream-source: ghcr.io/canonical/openstack-exporter:1.7.0-3be9ddb
requires:
identity-ops:

View File

@ -90,6 +90,7 @@ class OSExporterPebbleHandler(sunbeam_chandlers.ServicePebbleHandler):
"command": (
"openstack-exporter"
" --os-client-config /etc/os-exporter/clouds.yaml"
" --cache --cache-ttl=5m"
# Using legacy mode as params are not
# supported by prometheus_scrape interface
" default"
@ -244,7 +245,6 @@ class OSExporterOperatorCharm(sunbeam_charm.OSBaseOperatorCharmK8S):
# this will become the internal exporter metrics when
# probe can be configured with params
"job_name": "openstack-cloud-metrics",
"scrape_timeout": "60s",
"static_configs": [
{
"targets": [

View File

@ -89,7 +89,7 @@ applications:
base: ubuntu@24.04
scale: 1
resources:
openstack-exporter-image: ghcr.io/canonical/openstack-exporter:1.6.0-7533071
openstack-exporter-image: ghcr.io/canonical/openstack-exporter:1.7.0-3be9ddb
horizon:
{% if horizon_k8s is defined and horizon_k8s is sameas true -%}
charm: ../../../horizon-k8s.charm