File cert-manager.spec of Package cert-manager
#
# spec file for package cert-manager
#
# Copyright (c) 2020 SUSE LLC, Nuernberg, Germany.
#
# 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: cert-manager
Version: 1.19.1+git.0.a22e21ea3
Release: 0
Summary: Add-on for automatic provisioning of TLS certificates in Kubernetes
License: Apache-2.0
Group: System/Management
URL: https://cert-manager.io
Source0: %{name}-%{version}.tar.gz
Source1: vendor-acmesolver.tar.gz
Source2: vendor-cainjector.tar.gz
Source3: vendor-controller.tar.gz
Source4: vendor-startupapicheck.tar.gz
Source5: vendor-webhook.tar.gz
BuildRequires: golang-packaging
BuildRequires: golang(API) = 1.25
%description
cert-manager is a Kubernetes add-on to automate the management and issuance of
TLS certificates from various issuing sources.
It will ensure certificates are valid and up to date periodically, and attempt
to renew certificates at an appropriate time before expiry.
%package acmesolver
Summary: The acmesolver for %{name}
Group: System/management
%description acmesolver
HTTP server used to solve ACME challenges.
%package controller
Summary: The controller for %{name}
Group: System/Management
%description controller
The controller is the main component of cert-manager.
%package cainjector
Summary: The CA injector for %{name}
Group: System/Management
%description cainjector
The CA injector is responsible for injecting the CA bundle into the webhook’s
ValidatingWebhookConfiguration and MutatingWebhookConfiguration resources
in order to allow the Kubernetes API server to trust the webhook API server.
%package startupapicheck
Summary: The startupapicheck for %{name}
Group: System/Management
%description startupapicheck
Automatically provision and manage TLS certificates in Kubernetes
%package webhook
Summary: The webhook for %{name}
Group: System/Management
%description webhook
The webhook server provides dynamic admission control over cert-manager resources includes
ValidatingAdmissionWebhook, MutatingAdmissionWebhook, and CustomResourceConversionWebhook.
%prep
%setup -q -a1
# this really is not a single project but multiple go.mod
tar xzf %{SOURCE1} -C ./cmd/acmesolver
tar xzf %{SOURCE2} -C ./cmd/cainjector
tar xzf %{SOURCE3} -C ./cmd/controller
tar xzf %{SOURCE4} -C ./cmd/startupapicheck
tar xzf %{SOURCE5} -C ./cmd/webhook
%build
REL=%{version}
VERSION=$(echo $REL | sed 's/+git.*//')
GITCOMMIT=$(echo $REL | sed 's/.*+git.//')
%goprep %{goipath}
# debugedit cannot copy with dwarf5 at the moment
# see https://sourceware.org/bugzilla/show_bug.cgi?id=33204
export GOEXPERIMENT=nodwarf5
for f in acmesolver controller cainjector startupapicheck webhook ; do
pushd cmd/$f
go build -mod vendor
popd
done
%install
mkdir -p %{buildroot}%{_bindir}
for f in acmesolver controller cainjector startupapicheck webhook ; do
mv cmd/${f}/${f}-binary %{buildroot}%{_bindir}/%{name}-${f}
done
%files
%defattr(-,root,root)
%license LICENSE
%files acmesolver
%dir %{_bindir}
%{_bindir}/%{name}-acmesolver
%license LICENSE
%files controller
%dir %{_bindir}
%{_bindir}/%{name}-controller
%license LICENSE
%files cainjector
%dir %{_bindir}
%{_bindir}/%{name}-cainjector
%license LICENSE
%files startupapicheck
%dir %{_bindir}
%{_bindir}/%{name}-startupapicheck
%license LICENSE
%files webhook
%dir %{_bindir}
%{_bindir}/%{name}-webhook
%license LICENSE
%changelog