kubernetes/kubernetes.spec

152 lines
4 KiB
RPMSpec
Raw Normal View History

2019-10-06 22:22:55 +03:00
%define debug %nil
%define debug_package %nil
Name: kubernetes
2021-02-25 16:54:03 +09:00
Version: 1.20.4
2019-10-06 22:22:55 +03:00
Release: 1
Summary: Production-Grade Container Scheduling and Management
2021-02-25 15:39:23 +09:00
Group: Development/Other
2019-10-06 22:22:55 +03:00
License: ASL 2.0
URL: https://kubernetes.io
2021-02-17 01:33:04 +03:00
Source0: https://github.com/kubernetes/kubernetes/archive/v%{version}/%{name}-%{version}.tar.gz
2021-02-25 15:39:23 +09:00
Source1: https://raw.githubusercontent.com/kubernetes/release/master/packages/rpm/kubelet.service
Source2: https://raw.githubusercontent.com/kubernetes/release/master/packages/rpm/10-kubeadm-post-1.11.conf
Source3: https://raw.githubusercontent.com/kubernetes/release/master/packages/rpm/kubelet.env
Source10: %{name}.rpmlintrc
2021-02-17 01:33:04 +03:00
BuildRequires: go >= 1.15
BuildRequires: git-core
2021-02-25 15:42:29 +09:00
#BuildRequires: upx
2019-10-06 22:22:55 +03:00
%description
Kubernetes is an open source system for managing containerized
applications across multiple hosts; providing basic mechanisms
for deployment, maintenance, and scaling of applications.
2021-02-17 01:33:04 +03:00
#------------------------------------------------------------
2021-02-25 15:39:23 +09:00
%package -n kubectl
Summary: Container Cluster Manager - Kubernetes client tools
Group: Development/Other
2019-10-06 22:22:55 +03:00
2021-02-25 15:39:23 +09:00
%description -n kubectl
2019-10-06 22:22:55 +03:00
Command-line utility for interacting with a Kubernetes cluster
2021-02-25 15:39:23 +09:00
%files -n kubectl
2019-10-06 22:22:55 +03:00
%{_bindir}/kubectl
2021-02-17 01:33:04 +03:00
#------------------------------------------------------------
2019-10-06 22:22:55 +03:00
%package -n kubeadm
2021-02-25 15:39:23 +09:00
Summary: Command-line utility for administering a Kubernetes cluster
Group: Development/Other
Requires: kubelet >= 1.20.0
Requires: kubectl >= 1.20.0
Requires: cni-plugins >= 0.8.6
Requires: cri-tools >= 1.20.0
2019-10-06 22:22:55 +03:00
%description -n kubeadm
Command-line utility for deploying a Kubernetes cluster
%files -n kubeadm
%{_bindir}/kubeadm
2021-02-17 01:33:04 +03:00
#------------------------------------------------------------
2019-10-06 22:22:55 +03:00
2021-02-25 15:39:23 +09:00
%package -n kubelet
Summary: Container Cluster Manager - Kubernetes Node Agent
Group: Development/Other
Requires: conntrack-tools
Requires: ebtables
Requires: ethtool
Requires: iproute
Requires: iptables >= 1.4.21
Requires: cni-plugins >= 0.8.6
Requires: socat
Requires: util-linux
Requires: systemd
%description -n kubelet
2019-10-06 22:22:55 +03:00
The node agent of Kubernetes, the container cluster manager
2021-02-25 15:39:23 +09:00
%files -n kubelet
2019-10-06 22:22:55 +03:00
%{_bindir}/kubelet
2021-02-17 01:33:04 +03:00
%{_unitdir}/kubelet.service
%{_unitdir}/kubelet.service.d/10-kubeadm.conf
2019-10-06 22:22:55 +03:00
%{_sysconfdir}/kubernetes/manifests/
2021-02-17 01:33:04 +03:00
%{_sysconfdir}/sysconfig/kubelet
#------------------------------------------------------------
%package tools
2021-02-25 15:39:23 +09:00
Summary: Kubernetes tools
Group: Development/Other
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
%description tools
Kubernetes tools
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
%files tools
%{_bindir}/kube-*
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
#------------------------------------------------------------
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
%package docs
2021-02-25 15:39:23 +09:00
Summary: Documentation for Kubernetes
Group: Documentation
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
%description docs
Documentation for Kubernetes
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
%files docs
%doc docs/admin docs/user-guide docs/yaml README.md LICENSE
2019-10-06 22:22:55 +03:00
%{_mandir}/man1/*
2021-02-17 01:33:04 +03:00
#------------------------------------------------------------
2019-10-06 22:22:55 +03:00
%prep
%setup -q
%build
2021-02-17 01:33:04 +03:00
#create docs
hack/update-generated-docs.sh
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
make all GOLDFLAGS="-s -w"
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
#upx _output/bin/kubeadm
#upx _output/bin/kubelet
#upx _output/bin/kubectl
#upx _output/bin/*
2019-10-06 22:22:55 +03:00
%install
2021-02-17 01:33:04 +03:00
#make install
2019-10-06 22:22:55 +03:00
install -dm0755 %{buildroot}%{_bindir}
2021-02-17 01:33:04 +03:00
install -dm0755 %{buildroot}%{_unitdir}/kubelet.service.d/
2019-10-06 22:22:55 +03:00
install -dm0755 %{buildroot}%{_sysconfdir}/sysconfig
install -dm0755 %{buildroot}%{_sysconfdir}/kubernetes/manifests
2021-02-17 01:33:04 +03:00
install -dm0755 %{buildroot}%{_sysconfdir}/sysconfig/kubelet
install -dm0755 %{buildroot}%{_sysconfdir}/cni/net.d
2019-10-06 22:22:55 +03:00
install -dm0755 %{buildroot}%{_libexecdir}/modules-load.d
install -dm0755 %{buildroot}/usr/lib/sysctl.d
install -dm0755 %{buildroot}%{_mandir}/man1
# kubeadm
2021-02-17 01:33:04 +03:00
install -Dm0755 _output/bin/kubeadm %{buildroot}%{_bindir}/kubeadm
2019-10-06 22:22:55 +03:00
# kubelet
2021-02-17 01:33:04 +03:00
install -Dm0755 _output/bin/kubelet %{buildroot}%{_bindir}/kubelet
install -Dm0644 %{SOURCE1} %{buildroot}%{_unitdir}/kubelet.service
install -Dm0644 %{SOURCE2} %{buildroot}%{_unitdir}/kubelet.service.d/10-kubeadm.conf
install -Dm0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/kubelet
2019-10-06 22:22:55 +03:00
# kubectl
2021-02-17 01:33:04 +03:00
install -Dm0755 _output/bin/kubectl %{buildroot}%{_bindir}/kubectl
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
# other bins
install -Dm0755 _output/bin/kube-* %{buildroot}%{_bindir}
2019-10-06 22:22:55 +03:00
2021-02-17 01:33:04 +03:00
# docs
install -Dm0644 docs/man/man1/* %{buildroot}%{_mandir}/man1
2019-10-06 22:22:55 +03:00
%files
2021-02-17 01:33:04 +03:00
%doc README.md LICENSE LICENSES