aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2024-04-17 12:35:23 +0000
committerGerrit Code Review <review@openstack.org>2024-04-17 12:35:23 +0000
commit253379f699b0dd4c9c26eb0136b1bcabb57e0e82 (patch)
tree0be7520199aa74cf0fdd1dc56333a3164cb084a3
parent081590b63b6f2c4935d89915509f8240219c0361 (diff)
parent986293e9d45b4bb5d18ce9cc942790b248549221 (diff)
downloadkolla-253379f699b0dd4c9c26eb0136b1bcabb57e0e82.tar.gz
kolla-253379f699b0dd4c9c26eb0136b1bcabb57e0e82.zip
Merge "prometheus: use inovex/prometheus-libvirt-exporter"
-rw-r--r--docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j234
-rw-r--r--kolla/common/sources.py11
-rw-r--r--releasenotes/notes/prometheus-libvirt-exporter-inovex-acddd497258fe562.yaml8
3 files changed, 23 insertions, 30 deletions
diff --git a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2 b/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2
index 88089c7b7..390241b9f 100644
--- a/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2
+++ b/docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2
@@ -5,41 +5,15 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %}
-{{ macros.enable_extra_repos(['crb']) }}
-
{% block prometheus_libvirt_exporter_header %}{% endblock %}
-{% if base_package_type == 'rpm' %}
- {% set prometheus_libvirt_exporter_packages = [
- 'git',
- 'go',
- 'libvirt-devel',
- ] %}
-{% elif base_package_type == 'deb' %}
- {% set prometheus_libvirt_exporter_packages = [
- 'build-essential',
- 'git',
- 'golang-go',
- 'libvirt-dev',
- 'pkg-config',
- ] %}
-{% endif %}
-
{{ macros.install_packages(prometheus_libvirt_exporter_packages | customizable("packages")) }}
-{% block prometheus_libvirt_exporter_version %}
-ARG prometheus_libvirt_exporter_version=2.3.3
-ARG prometheus_libvirt_exporter_path=github.com/Tinkoff/libvirt-exporter
-{% endblock %}
-
{% block prometheus_libvirt_exporter_install %}
-ENV GOPATH=/build
-RUN go mod init libvirt-exporter \
- && cd ${GOPATH} \
- && go get -v ${prometheus_libvirt_exporter_path}@${prometheus_libvirt_exporter_version} \
- && go build ${prometheus_libvirt_exporter_path} \
- && mv /build/libvirt-exporter /opt \
- && rm -rf /build
+ADD prometheus-libvirt-exporter-archive /prometheus-libvirt-exporter-source
+
+RUN ln -s /prometheus-libvirt-exporter-source/* prometheus-libvirt-exporter \
+ && cp /prometheus-libvirt-exporter/prometheus-libvirt-exporter /opt/libvirt-exporter
{% endblock %}
diff --git a/kolla/common/sources.py b/kolla/common/sources.py
index 686bca110..987703d02 100644
--- a/kolla/common/sources.py
+++ b/kolla/common/sources.py
@@ -309,6 +309,17 @@ SOURCES = {
'releases/download/v${version}/'
'elasticsearch_exporter'
'-${version}.linux-${debian_arch}.tar.gz')},
+ 'prometheus-libvirt-exporter': {
+ 'version': '1.6.0',
+ 'type': 'url',
+ 'sha256': {
+ 'amd64': '57f1e71ac5bd87f18a40b9089e9fb513dec44ced58328b3065879b279f967596', # noqa: E501
+ 'arm64': '8f474fbb515caf19fda92c839eece761738138c7c676d12d10aa0b8c29b3ef9d'}, # noqa: E501
+ 'location': ('https://github.com/'
+ 'inovex/prometheus-libvirt-exporter/'
+ 'releases/download/v${version}/'
+ 'prometheus-libvirt-exporter'
+ '-${version}.linux-${debian_arch}.tar.gz')},
'prometheus-memcached-exporter': {
'version': '0.14.2',
'type': 'url',
diff --git a/releasenotes/notes/prometheus-libvirt-exporter-inovex-acddd497258fe562.yaml b/releasenotes/notes/prometheus-libvirt-exporter-inovex-acddd497258fe562.yaml
new file mode 100644
index 000000000..b98e7b80a
--- /dev/null
+++ b/releasenotes/notes/prometheus-libvirt-exporter-inovex-acddd497258fe562.yaml
@@ -0,0 +1,8 @@
+---
+features:
+ - |
+ Replace Tinkoff/libvirt-exporter with inovex/prometheus-libvirt-exporter.
+ The Tinkoff/libvirt-exporter repository is archived. Latest
+ release in December 2022. The inovex/prometheus-libvirt-exporter repository is an
+ active fork of zhangjianweibj/prometheus-libvirt-exporter that will become
+ `a Prometheus community exporter in the future <https: //github.com/prometheus-community/community/issues/50>`_.