forked from openstack/kolla
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from stackhpc/upstream/xena-2022-06-13
Synchronise xena with upstream
- Loading branch information
Showing
32 changed files
with
229 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
docker/prometheus/prometheus-libvirt-exporter/Dockerfile.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM {{ namespace }}/{{ infra_image_prefix }}prometheus-base:{{ tag }} | ||
{% block labels %} | ||
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}" | ||
{% endblock %} | ||
|
||
{% import "macros.j2" as macros with context %} | ||
|
||
{% 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.0 | ||
ARG prometheus_libvirt_exporter_path=github.com/AlexZzz/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 | ||
|
||
{% endblock %} | ||
|
||
{% block prometheus_libvirt_exporter_footer %}{% endblock %} | ||
{% block footer %}{% endblock %} | ||
|
||
USER root |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.