File kubectl-duplicate.spec of Package kubectl-duplicate
#
# spec file for package kubectl-duplicate
#
# 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: kubectl-duplicate
Version: 0.7.0
Release: 0
Summary: Kubectl plugin to duplicate resources in a Kubernetes cluster
License: Apache-2.0
URL: https://github.com/Telemaco019/duplik8s
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: fdupes
BuildRequires: golang(API) >= 1.24.4
Provides: duplika8s = %{version}
%description
duplik8s allows you to easily duplicate Kubernetes Pods with overridden
commands and configurations. This is useful for testing, debugging, and
development purposes. Think of duplik8s as kubectl debug --copy-to on steroids:
- Support multiple resources: Duplicate not just Pods, but also Deployments and
StatefulSets.
- Easy Tracking: All duplicated resources are tagged with a duplik8s label for
easy identification and cleanup.
- Persistent Storage Handling: Smoothly duplicate Pods mounting persistent
volumes without issues.
- Probes cleanup: Disable liveness and readiness probes to keep the cloned Pod
idle and avoid restarts.
- User-Friendly Syntax: straightforward syntax that simplifies the selection
and duplication of resources.
%prep
%autosetup -a 1 -p 1
%build
go build \
-mod=vendor \
-buildmode=pie \
-ldflags="-X main.Version=v%{version}" \
-o bin/%{name} ./kubectl-duplicate/kubectl-duplicate.go
%install
install -D -m 0755 bin/%{name} %{buildroot}/%{_bindir}/%{name}
install -D -m 0755 bin/%{name} %{buildroot}/%{_bindir}/kubectl-duplik8s
%fdupes %{buildroot}/%{_bindir}/
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%{_bindir}/kubectl-duplik8s
%changelog