File slurm-operator.spec of Package slurm-operator
#
# spec file for package slurm-operator
#
# 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-operator
Version: 0.1.0
Release: 0
Summary: Provides a framework that runs Slurm in Kubernetes
License: Apache-2.0
URL: https://github.com/SlinkyProject/slurm-operator
Source0: https://github.com/SlinkyProject/slurm-operator/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: go
BuildRequires: helm
BuildRequires: kubernetes-controller-manager
%description
This project deploys Slurm on Kubernetes. These pods coexist with other running
workloads on Kubernetes. This project provides controls over the Slurm cluster
configuration and deployment, along with configurable autoscaling policy for
Slurm compute nodes.
%prep
%autosetup -p1 -a1
%build
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=%{_build_arch}
go build -buildmode=pie -a -o slurm-manager cmd/manager/main.go
go build -buildmode=pie -a -o slurm-webhook cmd/webhook/main.go
%install
install -D slurm-manager %{buildroot}%{_bindir}/slurm-manager
install -D slurm-webhook %{buildroot}%{_bindir}/slurm-webhook
%files
%doc CHANGELOG.md README.md
%{_bindir}/manager
%{_bindir}/webhook
%changelog