# # spec file for package slurm-exporter # # Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: slurm-exporter Version: 0.1.0 Release: 0 Summary: Implements a Prometheus exporter for Slurm metrics # FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses License: Apache-2.0 URL: https://github.com/SlinkyProject/slurm-exporter Source0: https://github.com/SlinkyProject/slurm-exporter/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: vendor.tar.gz BuildRequires: go BuildRequires: helm %description Slurm metrics are collected from Slurm through the Slurm REST API. The current deployment mechanism for this project is through the included Helm chart. The exporter may be built and deployed as a standalone binary if needed. %prep %autosetup -p1 -a1 %build export CGO_ENABLED=0 export GOOS=linux export GOARCH=%{_build_arch} go build -buildmode=pie -o bin/slurm-exporter cmd/main.go helm package helm/slurm-exporter --destination helm/slurm-exporter %install install -D bin/slurm-exporter %{buildroot}/%{_bindir}/slurm-exporter cd helm find slurm-exporter -type f -exec install -D -m 0644 {} %{buildroot}%{_datadir}/slurm-exporter-helm-charts/{} \; %files %doc README.md CHANGELOG.md %{_bindir}/slurm-exporter %{_datadir}/slurm-exporter-helm-charts %dir %{_datadir}/slurm-exporter-helm-charts %changelog