mirror of
https://abf.rosa.ru/djam/kubernetes.git
synced 2025-02-23 13:42:55 +00:00
150 lines
4.2 KiB
RPMSpec
150 lines
4.2 KiB
RPMSpec
%define debug %nil
|
|
%define debug_package %nil
|
|
|
|
Name: kubernetes
|
|
Version: 1.20.2
|
|
Release: 2
|
|
Summary: Production-Grade Container Scheduling and Management
|
|
License: ASL 2.0
|
|
URL: https://kubernetes.io
|
|
Source0: https://github.com/kubernetes/kubernetes/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
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
|
|
Source1000: %{name}.rpmlintrc
|
|
Group: Development/Other
|
|
BuildRequires: go >= 1.15
|
|
BuildRequires: git-core
|
|
BuildRequires: upx
|
|
|
|
%description
|
|
Kubernetes is an open source system for managing containerized
|
|
applications across multiple hosts; providing basic mechanisms
|
|
for deployment, maintenance, and scaling of applications.
|
|
|
|
#------------------------------------------------------------
|
|
|
|
%package -n kubectl
|
|
Summary: Container Cluster Manager - Kubernetes client tools
|
|
|
|
%description -n kubectl
|
|
Command-line utility for interacting with a Kubernetes cluster
|
|
|
|
%files -n kubectl
|
|
%{_bindir}/kubectl
|
|
|
|
#------------------------------------------------------------
|
|
|
|
%package -n kubeadm
|
|
Summary: Command-line utility for administering a Kubernetes cluster
|
|
Requires: kubelet >= 1.20.0
|
|
Requires: kubectl >= 1.20.0
|
|
Requires: cni-plugins >= 0.8.6
|
|
Requires: cri-tools >= 1.20.0
|
|
|
|
%description -n kubeadm
|
|
Command-line utility for deploying a Kubernetes cluster
|
|
|
|
%files -n kubeadm
|
|
%{_bindir}/kubeadm
|
|
|
|
#------------------------------------------------------------
|
|
|
|
%package -n kubelet
|
|
Summary: Container Cluster Manager - Kubernetes Node Agent
|
|
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
|
|
The node agent of Kubernetes, the container cluster manager
|
|
|
|
%files -n kubelet
|
|
%{_bindir}/kubelet
|
|
%{_unitdir}/kubelet.service
|
|
%{_unitdir}/kubelet.service.d/10-kubeadm.conf
|
|
%{_sysconfdir}/kubernetes/manifests/
|
|
%{_sysconfdir}/sysconfig/kubelet
|
|
|
|
#------------------------------------------------------------
|
|
|
|
%package tools
|
|
Summary: Kubernetes tools
|
|
|
|
%description tools
|
|
Kubernetes tools
|
|
|
|
%files tools
|
|
%{_bindir}/kube-*
|
|
|
|
#------------------------------------------------------------
|
|
|
|
%package docs
|
|
Summary: Documentation for Kubernetes
|
|
|
|
%description docs
|
|
Documentation for Kubernetes
|
|
|
|
%files docs
|
|
%doc docs/admin docs/user-guide docs/yaml README.md LICENSE
|
|
%{_mandir}/man1/*
|
|
|
|
#------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -q
|
|
|
|
%build
|
|
#create docs
|
|
hack/update-generated-docs.sh
|
|
|
|
make all GOLDFLAGS="-s -w"
|
|
|
|
#upx _output/bin/kubeadm
|
|
#upx _output/bin/kubelet
|
|
#upx _output/bin/kubectl
|
|
#upx _output/bin/*
|
|
|
|
%install
|
|
|
|
#make install
|
|
install -dm0755 %{buildroot}%{_bindir}
|
|
install -dm0755 %{buildroot}%{_unitdir}/kubelet.service.d/
|
|
install -dm0755 %{buildroot}%{_sysconfdir}/sysconfig
|
|
install -dm0755 %{buildroot}%{_sysconfdir}/kubernetes/manifests
|
|
install -dm0755 %{buildroot}%{_sysconfdir}/sysconfig/kubelet
|
|
install -dm0755 %{buildroot}%{_sysconfdir}/cni/net.d
|
|
install -dm0755 %{buildroot}%{_libexecdir}/modules-load.d
|
|
install -dm0755 %{buildroot}/usr/lib/sysctl.d
|
|
install -dm0755 %{buildroot}%{_mandir}/man1
|
|
|
|
install -d %{buildroot}%{_sysconfdir}/bash_completion.d
|
|
|
|
# kubeadm
|
|
install -Dm0755 _output/bin/kubeadm %{buildroot}%{_bindir}/kubeadm
|
|
_output/bin/kubeadm completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/kubeadm
|
|
|
|
# kubelet
|
|
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
|
|
|
|
# kubectl
|
|
install -Dm0755 _output/bin/kubectl %{buildroot}%{_bindir}/kubectl
|
|
_output/bin/kubectl completion bash > %{buildroot}%{_sysconfdir}/bash_completion.d/kubectl
|
|
|
|
# other bins
|
|
install -Dm0755 _output/bin/kube-* %{buildroot}%{_bindir}
|
|
|
|
# docs
|
|
install -Dm0644 docs/man/man1/* %{buildroot}%{_mandir}/man1
|
|
|
|
%files
|
|
%doc README.md LICENSE LICENSES
|