|
|
e1e0abc |
# Do not edit this spec file. (Re-)Generate using newrelease.sh
|
|
|
e1e0abc |
|
|
|
73fdd53 |
%global with_debug 0
|
|
|
48c1dde |
|
|
|
48c1dde |
%if 0%{?with_debug}
|
|
|
434a8df |
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
|
|
|
434a8df |
%global _dwz_low_mem_die_limit 0
|
|
|
434a8df |
%else
|
|
Timothy St. Clair |
dbc1b82 |
%global debug_package %{nil}
|
|
|
434a8df |
%endif
|
|
Timothy St. Clair |
dbc1b82 |
|
|
Timothy St. Clair |
dbc1b82 |
%global provider github
|
|
Timothy St. Clair |
dbc1b82 |
%global provider_tld com
|
|
|
e1e0abc |
%global owner kubernetes
|
|
Timothy St. Clair |
dbc1b82 |
%global repo kubernetes
|
|
|
acb57bd |
# https://github.com/kubernetes/kubernetes
|
|
Timothy St. Clair |
dbc1b82 |
|
|
|
e1e0abc |
%global provider_prefix %{provider}.%{provider_tld}/%{owner}/%{repo}
|
|
|
bc5ec32 |
%global import_path kubernetes.io/
|
|
|
564fa16 |
|
|
|
564fa16 |
# **** release metadata ****
|
|
|
e1e0abc |
# populated by envsubst in newrelease.sh
|
|
|
a83b00d |
%global gittag v1.29.4
|
|
|
a83b00d |
%global tar_ver 1.29.4
|
|
|
564fa16 |
%global k8s_name kubernetes
|
|
|
a83b00d |
%global k8s_ver 1.29.4
|
|
|
564fa16 |
# golang 'built with' version
|
|
|
a83b00d |
%global golangver 1.21.9
|
|
|
564fa16 |
|
|
|
564fa16 |
# last release version of these rpms prior to F40 restructure
|
|
|
564fa16 |
# should not change once restructure goes into rawhide
|
|
|
e1e0abc |
%global switchver 1.29.0
|
|
Timothy St. Clair |
dbc1b82 |
|
|
Timothy St. Clair |
dbc1b82 |
# Needed otherwise "version_ldflags=$(kube::version_ldflags)" doesn't work
|
|
Timothy St. Clair |
dbc1b82 |
%global _buildshell /bin/bash
|
|
Timothy St. Clair |
dbc1b82 |
%global _checkshell /bin/bash
|
|
|
beef130 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
564fa16 |
Name: %{k8s_name}
|
|
|
e1e0abc |
Version: %{k8s_ver}
|
|
|
df130e6 |
Release: %autorelease
|
|
|
403c5ad |
Summary: Open Source Production-Grade Container Scheduling And Management Platform
|
|
|
50ec4d6 |
License: Apache-2.0
|
|
|
71c7a2e |
URL: https://%{import_path}
|
|
|
b93c9e7 |
ExclusiveArch: x86_64 aarch64 ppc64le s390x %{arm}
|
|
|
e1e0abc |
Source0: https://%{provider_prefix}/archive/%{gittag}/%{repo}-%{tar_ver}.tar.gz
|
|
|
2aa44d2 |
|
|
|
b1db376 |
Source101: kube-proxy.service
|
|
|
b1db376 |
Source102: kube-apiserver.service
|
|
|
b1db376 |
Source103: kube-scheduler.service
|
|
|
b1db376 |
Source104: kube-controller-manager.service
|
|
|
b1db376 |
Source105: kubelet.service
|
|
|
b1db376 |
Source106: environ-apiserver
|
|
|
b1db376 |
Source107: environ-config
|
|
|
b1db376 |
Source108: environ-controller-manager
|
|
|
b1db376 |
Source109: environ-kubelet
|
|
|
b1db376 |
Source110: environ-kubelet.kubeconfig
|
|
|
b1db376 |
Source111: environ-proxy
|
|
|
b1db376 |
Source112: environ-scheduler
|
|
|
b1db376 |
Source113: kubernetes-accounting.conf
|
|
|
df130e6 |
Source114: 10-kubeadm.conf
|
|
|
b1db376 |
Source115: kubernetes.conf
|
|
|
e1e0abc |
Source116: %{repo}.sysusers
|
|
|
b1db376 |
|
|
|
0c27b56 |
Patch3: build-with-debug-info.patch
|
|
|
1a8dcf0 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
df130e6 |
# main package components - installs kubelet and necessary
|
|
|
df130e6 |
# configuration files. Recommends kubernetes-client and
|
|
|
df130e6 |
# kubernetes-kubeadm.
|
|
|
f709bab |
|
|
|
df130e6 |
# build requirements for kubelet
|
|
|
564fa16 |
BuildRequires: golang >= %{golangver}
|
|
|
cecd86b |
BuildRequires: go-rpm-macros
|
|
|
564fa16 |
BuildRequires: make
|
|
|
318c31c |
BuildRequires: go-md2man
|
|
|
f709bab |
BuildRequires: systemd
|
|
|
f709bab |
BuildRequires: rsync
|
|
|
564fa16 |
|
|
|
564fa16 |
# needed per fedora documentation - may drop as /run not used
|
|
|
564fa16 |
# and kube user no longer needed
|
|
|
81aca2e |
BuildRequires: systemd-rpm-macros
|
|
|
81aca2e |
%{?sysusers_requires_compat}
|
|
|
564fa16 |
|
|
|
564fa16 |
# additonal kubelet requirements
|
|
|
564fa16 |
Requires: (containerd or cri-o)
|
|
|
564fa16 |
Recommends: cri-o = %{version}-%{release}
|
|
|
564fa16 |
Requires: conntrack-tools
|
|
|
f709bab |
|
|
|
f709bab |
Requires(pre): shadow-utils
|
|
Timothy St. Clair |
dbc1b82 |
Requires: socat
|
|
|
e1e0abc |
Recommends: %{name}-client = %{version}-%{release}
|
|
|
df130e6 |
Recommends: %{name}-kubeadm = %{version}-%{release}
|
|
|
f709bab |
|
|
|
df130e6 |
# require same version for kubernetes-kubeadm if installed
|
|
|
df130e6 |
Conflicts: %{name}-kubeadm < %{version}-%{release}
|
|
|
df130e6 |
Conflicts: %{name}-kubeadm > %{version}-%{release}
|
|
Timothy St. Clair |
dbc1b82 |
|
|
|
564fa16 |
# require same version for kubernetes-client if installed
|
|
|
e1e0abc |
Conflicts: %{name}-client < %{version}-%{release}
|
|
|
e1e0abc |
Conflicts: %{name}-client > %{version}-%{release}
|
|
|
564fa16 |
|
|
|
564fa16 |
# provides and obsoletes kubernetes-node and kubernetes-kubeadm
|
|
|
564fa16 |
Provides: kubernetes-node = %{version}-%{release}
|
|
|
e1e0abc |
Obsoletes: kubernetes-node < %{switchver}
|
|
|
564fa16 |
|
|
|
564fa16 |
%description
|
|
|
564fa16 |
%{summary}
|
|
|
df130e6 |
Installs kubelet, the kubernetes agent on each machine in a
|
|
|
df130e6 |
cluster. The kubernetes-client sub-package,
|
|
|
564fa16 |
containing kubectl, is recommended but not strictly required.
|
|
|
564fa16 |
The kubernetes-client sub-package should be installed on
|
|
|
564fa16 |
control plane machines.
|
|
Timothy St. Clair |
dbc1b82 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
df130e6 |
%package kubeadm
|
|
|
df130e6 |
Summary: Kubernetes tool for standing up clusters
|
|
|
50ec4d6 |
Requires: %{name} = %{version}-%{release}
|
|
|
df130e6 |
|
|
|
df130e6 |
BuildRequires: golang >= %{golangver}
|
|
|
df130e6 |
BuildRequires: systemd
|
|
|
df130e6 |
Requires: containernetworking-plugins
|
|
|
df130e6 |
Requires: cri-tools
|
|
|
df130e6 |
|
|
|
df130e6 |
# require same version for kubernetes
|
|
|
df130e6 |
Conflicts: %{name} < %{version}-%{release}
|
|
|
df130e6 |
Conflicts: %{name} > %{version}-%{release}
|
|
|
df130e6 |
|
|
|
df130e6 |
%description kubeadm
|
|
|
df130e6 |
Kubernetes tool for standing up clusters. Not mandatory. If used,
|
|
|
df130e6 |
install on each machine in the cluster. Used to initialize each node,
|
|
|
df130e6 |
and to join new machines to an existing cluster.
|
|
|
df130e6 |
|
|
|
df130e6 |
##############################################
|
|
|
ec11eb3 |
%package client
|
|
|
ec11eb3 |
Summary: Kubernetes client tools
|
|
|
ec11eb3 |
|
|
|
564fa16 |
BuildRequires: golang >= %{golangver}
|
|
|
250da30 |
BuildRequires: make
|
|
|
ec11eb3 |
|
|
|
e1e0abc |
Conflicts: %{name} < %{version}-%{release}
|
|
|
e1e0abc |
Conflicts: %{name} > %{version}-%{release}
|
|
|
564fa16 |
|
|
|
ec11eb3 |
%description client
|
|
|
564fa16 |
Installs kubectl, the Kubernetes command line client.
|
|
|
ec11eb3 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
e1e0abc |
%package systemd
|
|
|
e1e0abc |
Summary: Systemd services for control plane and/or node
|
|
|
564fa16 |
|
|
|
564fa16 |
BuildRequires: golang >= %{golangver}
|
|
|
564fa16 |
BuildRequires: systemd
|
|
|
564fa16 |
BuildRequires: rsync
|
|
|
564fa16 |
BuildRequires: make
|
|
|
564fa16 |
BuildRequires: go-md2man
|
|
Timothy St. Clair |
dbc1b82 |
|
|
|
564fa16 |
Requires(pre): shadow-utils
|
|
|
e1e0abc |
Requires: %{name} = %{version}-%{release}
|
|
|
564fa16 |
|
|
|
564fa16 |
# obsoletes kubernetes-master in part
|
|
|
564fa16 |
Provides: kubernetes-master = %{version}-%{release}
|
|
|
e1e0abc |
Provides: kubernetes-legacy-systemd = %{version}-%{release}
|
|
|
e1e0abc |
Obsoletes: kubernetes-master < %{switchver}
|
|
|
e1e0abc |
|
|
|
e1e0abc |
%description systemd
|
|
|
e1e0abc |
Systemd services needed for manual installation of Kubernetes
|
|
|
e1e0abc |
on control plane or node machines. If kubeadm is used to bootstrap
|
|
|
e1e0abc |
Kubernetes then this rpm is not needed as kubeadm will install
|
|
|
e1e0abc |
these services as static pods in the cluster on nodes as needed.
|
|
|
e1e0abc |
If these systemd services are used, enable all services except
|
|
|
e1e0abc |
kube-proxy on each control plane. Enable kube-proxy on all machines
|
|
|
e1e0abc |
nodes that runs kubelet, including control plane machines with
|
|
|
e1e0abc |
kubelet.
|
|
|
564fa16 |
|
|
|
564fa16 |
##############################################
|
|
|
564fa16 |
##############################################
|
|
|
beef130 |
%prep
|
|
|
e1e0abc |
%setup -q -n %{repo}-%{tar_ver}
|
|
|
acb57bd |
|
|
|
c8b5dfd |
%if 0%{?with_debug}
|
|
|
564fa16 |
%patch3 -p1
|
|
|
c8b5dfd |
%endif
|
|
|
e0a0e4c |
|
|
|
3cd5654 |
# src/k8s.io/kubernetes/pkg/util/certificates
|
|
|
acb57bd |
# Patch the code to remove eliptic.P224 support
|
|
|
3cd5654 |
# For whatever reason:
|
|
|
3cd5654 |
# https://groups.google.com/forum/#!topic/Golang-nuts/Oq4rouLEvrU
|
|
|
acb57bd |
for dir in vendor/github.com/google/certificate-transparency/go/x509 pkg/util/certificates; do
|
|
Timothy St. Clair |
dbc1b82 |
if [ -d "${dir}" ]; then
|
|
Timothy St. Clair |
dbc1b82 |
pushd ${dir}
|
|
Timothy St. Clair |
dbc1b82 |
sed -i "/^[^=]*$/ s/oidNamedCurveP224/oidNamedCurveP256/g" *.go
|
|
Timothy St. Clair |
dbc1b82 |
sed -i "/^[^=]*$/ s/elliptic\.P224/elliptic.P256/g" *.go
|
|
Timothy St. Clair |
dbc1b82 |
popd
|
|
Timothy St. Clair |
dbc1b82 |
fi
|
|
|
acb57bd |
done
|
|
|
2b0d8bb |
|
|
|
acb57bd |
mkdir -p src/k8s.io/kubernetes
|
|
|
acb57bd |
mv $(ls | grep -v "^src$") src/k8s.io/kubernetes/.
|
|
|
acb57bd |
|
|
|
5b5dc87 |
# mv command above skips all dot files. Move .generated_files and all
|
|
|
5b5dc87 |
#.go* files
|
|
|
5b5dc87 |
mv .generated_files src/k8s.io/kubernetes/.
|
|
|
5b5dc87 |
mv .go* src/k8s.io/kubernetes/.
|
|
|
5b5dc87 |
|
|
Timothy St. Clair |
dbc1b82 |
###############
|
|
|
b0ef5e0 |
|
|
|
c85c837 |
%build
|
|
|
9061501 |
|
|
|
564fa16 |
# As of K8S 1.26.3/1.25.8/1.24.12 upstream now builds with an explicit
|
|
|
9061501 |
# version of go and will try to fetch that version if not present.
|
|
|
9061501 |
# FORCE_HOTS_GO=y overrides that specification by using the host's
|
|
|
564fa16 |
# version of go. This spec file continues to use build requires to
|
|
|
9061501 |
# require as a minimum the 'built with' go version from upstream.
|
|
|
564fa16 |
#
|
|
|
564fa16 |
# Packagers need to ensure that the go version on the build host contains
|
|
|
564fa16 |
# any security patches and other critical fixes that are part of the
|
|
|
564fa16 |
# "built with" version. Go maintainers typically release patch updates
|
|
|
564fa16 |
# for both supported versions of Go that contain the same security
|
|
|
564fa16 |
# updates.
|
|
|
9061501 |
export FORCE_HOST_GO=y
|
|
|
9061501 |
|
|
|
2b0d8bb |
pushd src/k8s.io/kubernetes/
|
|
|
d00582a |
source hack/lib/init.sh
|
|
|
d00582a |
kube::golang::setup_env
|
|
|
d00582a |
|
|
|
c85c837 |
export KUBE_GIT_TREE_STATE="clean"
|
|
|
df130e6 |
export KUBE_GIT_VERSION=v%{version}
|
|
|
2b0d8bb |
export KUBE_EXTRA_GOPATH=$(pwd)/Godeps/_workspace
|
|
|
2aa44d2 |
|
|
|
cecd86b |
# go internal linker does not provide build ids; use
|
|
|
cecd86b |
# KUBE_CGO_OVERRIDES to force external linker; consistent
|
|
|
cecd86b |
# with Fedora go standards
|
|
|
cecd86b |
export KUBE_CGO_OVERRIDES="kube-proxy kubeadm kube-apiserver kube-controller-manager kubelet kube-scheduler kubectl"
|
|
|
cecd86b |
|
|
|
cecd86b |
# Use settings from gobuild macro to populate GOFLAGS and
|
|
|
cecd86b |
# GOLDFLAGS - see Makefile (make help) for more information
|
|
|
cecd86b |
export GOFLAGS="-buildmode=pie -compiler=gc -tags=rpm_crashtraceback${BUILDTAGS:+,}${BUILDTAGS:-}"
|
|
|
cecd86b |
|
|
|
71bf7b1 |
export GOLDFLAGS="%{?currentgoldflags} -B 0x$(echo '%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}' | sha1sum | cut -d ' ' -f1) -compressdwarf=false -linkmode=external -extldflags '%{build_ldflags} %{?__golang_extldflags}'"
|
|
|
cecd86b |
|
|
|
73fdd53 |
# Build each binary separately to generate a unique build-id.
|
|
|
3cd5654 |
# Otherwise: Duplicate build-ids /builddir/build/BUILDROOT/.../usr/bin/kube-apiserver and /builddir/build/BUILDROOT/.../usr/bin/kubeadm
|
|
|
71bf7b1 |
make WHAT="cmd/kube-proxy"
|
|
|
71bf7b1 |
make WHAT="cmd/kube-apiserver"
|
|
|
71bf7b1 |
make WHAT="cmd/kube-controller-manager"
|
|
|
71bf7b1 |
make WHAT="cmd/kubelet"
|
|
|
71bf7b1 |
make WHAT="cmd/kubeadm"
|
|
|
71bf7b1 |
make WHAT="cmd/kube-scheduler"
|
|
|
71bf7b1 |
make WHAT="cmd/kubectl"
|
|
Eric Paris |
b196e11 |
|
|
|
d00582a |
# Gen docs
|
|
|
d00582a |
make WHAT="cmd/gendocs"
|
|
|
d00582a |
make WHAT="cmd/genkubedocs"
|
|
|
d00582a |
make WHAT="cmd/genman"
|
|
|
d00582a |
make WHAT="cmd/genyaml"
|
|
|
d00582a |
kube::util::gen-docs .
|
|
|
318c31c |
|
|
|
81aca2e |
###############
|
|
|
81aca2e |
|
|
|
beef130 |
%install
|
|
|
2b0d8bb |
pushd src/k8s.io/kubernetes/
|
|
|
d00582a |
source hack/lib/init.sh
|
|
|
c85c837 |
kube::golang::setup_env
|
|
Eric Paris |
b196e11 |
|
|
|
2c89a45 |
%ifarch ppc64le
|
|
|
fc55ab8 |
output_path="_output/local/go/bin"
|
|
|
2c89a45 |
%else
|
|
|
c78c989 |
output_path="${KUBE_OUTPUT_BINPATH}/$(kube::golang::host_platform)"
|
|
|
2c89a45 |
%endif
|
|
|
2aa44d2 |
|
|
|
3cd5654 |
echo "+++ INSTALLING binaries"
|
|
|
b1db376 |
install -m 755 -d %{buildroot}%{_bindir}
|
|
|
3cd5654 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kube-proxy
|
|
|
3cd5654 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kube-apiserver
|
|
|
3cd5654 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kube-controller-manager
|
|
|
3cd5654 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kubelet
|
|
Timothy St. Clair |
dbc1b82 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kubeadm
|
|
|
3cd5654 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kube-scheduler
|
|
|
3cd5654 |
install -p -m 755 -t %{buildroot}%{_bindir} ${output_path}/kubectl
|
|
|
3cd5654 |
|
|
|
b1db376 |
echo "+++ INSTALLING kubelet service config"
|
|
|
e1e0abc |
install -d -m 0755 %{buildroot}/%{_unitdir}/kubelet.service.d
|
|
|
e1e0abc |
install -p -m 0644 -t %{buildroot}/%{_unitdir}/kubelet.service.d %{SOURCE114}
|
|
Timothy St. Clair |
dbc1b82 |
|
|
|
010398c |
echo "+++ INSTALLING shell completion"
|
|
|
f0eebfb |
install -dm 0755 %{buildroot}/%{bash_completions_dir}
|
|
|
f0eebfb |
%{buildroot}%{_bindir}/kubectl completion bash > %{buildroot}/%{bash_completions_dir}/kubectl
|
|
|
f0eebfb |
install -dm 0755 %{buildroot}/%{fish_completions_dir}
|
|
|
f0eebfb |
%{buildroot}%{_bindir}/kubectl completion fish > %{buildroot}/%{fish_completions_dir}/kubectl.fish
|
|
|
f0eebfb |
install -dm 0755 %{buildroot}/%{zsh_completions_dir}
|
|
|
f0eebfb |
%{buildroot}%{_bindir}/kubectl completion zsh > %{buildroot}/%{zsh_completions_dir}/_kubectl
|
|
|
beef130 |
|
|
|
b1db376 |
echo "+++ INSTALLING config files"
|
|
|
b1db376 |
%define remove_environ_prefix() %(echo -n %1|sed 's/.*environ-//g')
|
|
|
e1e0abc |
install -d -m 0755 %{buildroot}%{_sysconfdir}/%{repo}
|
|
|
e1e0abc |
install -d -m 0700 %{buildroot}%{_sysconfdir}/%{repo}/manifests
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE106} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE106}}
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE107} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE107}}
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE108} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE108}}
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE109} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE109}}
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE110} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE110}}
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE111} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE111}}
|
|
|
e1e0abc |
install -m 644 -T %{SOURCE112} %{buildroot}%{_sysconfdir}/%{repo}/%{remove_environ_prefix %{SOURCE112}}
|
|
|
b1db376 |
|
|
|
b1db376 |
# place systemd/tmpfiles.d/kubernetes.conf to /usr/lib/tmpfiles.d/kubernetes.conf
|
|
|
b1db376 |
install -d -m 0755 %{buildroot}%{_tmpfilesdir}
|
|
|
b1db376 |
install -p -m 0644 -t %{buildroot}/%{_tmpfilesdir} %{SOURCE115}
|
|
|
beef130 |
|
|
|
0e1c83b |
echo "+++ INSTALLING sysusers.d"
|
|
|
e1e0abc |
install -D -m 0644 -vp %{SOURCE116} %{buildroot}%{_sysusersdir}/%{repo}.conf
|
|
|
0e1c83b |
|
|
|
b1db376 |
# enable CPU and Memory accounting
|
|
|
b1db376 |
install -d -m 0755 %{buildroot}/%{_sysconfdir}/systemd/system.conf.d
|
|
|
b1db376 |
install -p -m 0644 -t %{buildroot}/%{_sysconfdir}/systemd/system.conf.d %{SOURCE113}
|
|
|
b1db376 |
|
|
|
b1db376 |
echo "+++ INSTALLING service files"
|
|
|
beef130 |
install -d -m 0755 %{buildroot}%{_unitdir}
|
|
|
b1db376 |
install -m 0644 -t %{buildroot}%{_unitdir} %{SOURCE101}
|
|
|
b1db376 |
install -m 0644 -t %{buildroot}%{_unitdir} %{SOURCE102}
|
|
|
b1db376 |
install -m 0644 -t %{buildroot}%{_unitdir} %{SOURCE103}
|
|
|
b1db376 |
install -m 0644 -t %{buildroot}%{_unitdir} %{SOURCE104}
|
|
|
b1db376 |
install -m 0644 -t %{buildroot}%{_unitdir} %{SOURCE105}
|
|
|
beef130 |
|
|
|
b1db376 |
echo "+++ INSTALLING manpages"
|
|
Eric Paris |
6cf9084 |
install -d %{buildroot}%{_mandir}/man1
|
|
|
2aa44d2 |
# from k8s tarball copied docs/man/man1/*.1
|
|
|
d00582a |
install -p -m 644 docs/man/man1/*.1 %{buildroot}%{_mandir}/man1
|
|
Eric Paris |
6cf9084 |
|
|
|
b1db376 |
# install the place the kubelet defaults to put volumes and default folder structure
|
|
|
e3e6032 |
install -d %{buildroot}%{_sharedstatedir}/kubelet
|
|
|
0fced5c |
|
|
|
e21fd06 |
mkdir -p %{buildroot}/run
|
|
|
e1e0abc |
install -d -m 0755 %{buildroot}/run/%{repo}/
|
|
|
2b0d8bb |
popd
|
|
|
85cd3ef |
|
|
|
3e35a60 |
mv src/k8s.io/kubernetes/CHANGELOG/CHANGELOG-*.md .
|
|
|
2b0d8bb |
mv src/k8s.io/kubernetes/*.md .
|
|
|
2b0d8bb |
mv src/k8s.io/kubernetes/LICENSE .
|
|
|
10f7326 |
# CHANGELOG.md is symlink to CHANGELOG/README.md and not actual
|
|
|
10f7326 |
# change log. no need to include generated rpms
|
|
|
3e35a60 |
rm CHANGELOG.md
|
|
|
2b0d8bb |
|
|
|
e3e6032 |
%check
|
|
|
20438b2 |
if [ 1 != 1 ]; then
|
|
|
e3e6032 |
echo "******Testing the commands*****"
|
|
|
e3e6032 |
hack/test-cmd.sh
|
|
|
e3e6032 |
echo "******Benchmarking kube********"
|
|
|
e3e6032 |
hack/benchmark-go.sh
|
|
|
e3e6032 |
|
|
|
e3e6032 |
# In Fedora 20 and RHEL7 the go cover tools isn't available correctly
|
|
|
e3e6032 |
echo "******Testing the go code******"
|
|
|
e3e6032 |
hack/test-go.sh
|
|
|
e3e6032 |
echo "******Testing integration******"
|
|
|
48c1dde |
hack/test-integration.sh --use_go_build
|
|
|
20438b2 |
fi
|
|
|
e3e6032 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
beef130 |
%files
|
|
|
a83b00d |
%license LICENSE
|
|
|
2aa44d2 |
%doc *.md
|
|
|
f709bab |
|
|
|
564fa16 |
# kubelet
|
|
|
318c31c |
%{_mandir}/man1/kubelet.1*
|
|
|
f709bab |
%{_bindir}/kubelet
|
|
|
f709bab |
%{_unitdir}/kubelet.service
|
|
|
e1e0abc |
%{_sysusersdir}/%{repo}.conf
|
|
|
f709bab |
%dir %{_sharedstatedir}/kubelet
|
|
|
e1e0abc |
%dir %{_sysconfdir}/%{repo}
|
|
|
e1e0abc |
%dir %{_sysconfdir}/%{repo}/manifests
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/config
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/kubelet
|
|
|
e1e0abc |
# % config(noreplace) % {_sysconfdir}/% {repo}/proxy
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/kubelet.kubeconfig
|
|
|
43a251e |
%config(noreplace) %{_sysconfdir}/systemd/system.conf.d/kubernetes-accounting.conf
|
|
Eric Paris |
ee05804 |
%{_tmpfilesdir}/kubernetes.conf
|
|
|
e1e0abc |
%verify(not size mtime md5) %attr(755, kube,kube) %dir /run/%{repo}
|
|
|
beef130 |
|
|
|
df130e6 |
##############################################
|
|
|
df130e6 |
%files kubeadm
|
|
|
df130e6 |
%license LICENSE
|
|
|
df130e6 |
%doc *.md
|
|
|
c78c989 |
%{_mandir}/man1/kubeadm.1*
|
|
|
c78c989 |
%{_mandir}/man1/kubeadm-*
|
|
Timothy St. Clair |
dbc1b82 |
%{_bindir}/kubeadm
|
|
|
e1e0abc |
%dir %{_unitdir}/kubelet.service.d
|
|
|
df130e6 |
%{_unitdir}/kubelet.service.d/10-kubeadm.conf
|
|
Timothy St. Clair |
dbc1b82 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
ec11eb3 |
%files client
|
|
|
2aa44d2 |
%license LICENSE
|
|
|
2aa44d2 |
%doc *.md
|
|
|
ec11eb3 |
%{_mandir}/man1/kubectl.1*
|
|
|
ec11eb3 |
%{_mandir}/man1/kubectl-*
|
|
|
ec11eb3 |
%{_bindir}/kubectl
|
|
|
f0eebfb |
%{bash_completions_dir}/kubectl
|
|
|
f0eebfb |
%{fish_completions_dir}/kubectl.fish
|
|
|
f0eebfb |
%{zsh_completions_dir}/_kubectl
|
|
|
ec11eb3 |
|
|
Timothy St. Clair |
dbc1b82 |
##############################################
|
|
|
e1e0abc |
%files systemd
|
|
|
564fa16 |
%license LICENSE
|
|
|
564fa16 |
%doc *.md
|
|
|
564fa16 |
%{_mandir}/man1/kube-apiserver.1*
|
|
|
564fa16 |
%{_mandir}/man1/kube-controller-manager.1*
|
|
|
564fa16 |
%{_mandir}/man1/kube-scheduler.1*
|
|
|
564fa16 |
%{_mandir}/man1/kube-proxy.1*
|
|
|
564fa16 |
%attr(754, -, kube) %caps(cap_net_bind_service=ep) %{_bindir}/kube-apiserver
|
|
|
564fa16 |
%{_bindir}/kube-controller-manager
|
|
|
564fa16 |
%{_bindir}/kube-scheduler
|
|
|
564fa16 |
%{_bindir}/kube-proxy
|
|
|
564fa16 |
%{_unitdir}/kube-proxy.service
|
|
|
564fa16 |
%{_unitdir}/kube-apiserver.service
|
|
|
564fa16 |
%{_unitdir}/kube-controller-manager.service
|
|
|
564fa16 |
%{_unitdir}/kube-scheduler.service
|
|
|
e1e0abc |
%{_sysusersdir}/%{repo}.conf
|
|
|
e1e0abc |
%dir %{_sysconfdir}/%{repo}
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/apiserver
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/scheduler
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/config
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/controller-manager
|
|
|
e1e0abc |
%config(noreplace) %{_sysconfdir}/%{repo}/proxy
|
|
|
564fa16 |
%{_tmpfilesdir}/kubernetes.conf
|
|
|
e1e0abc |
%verify(not size mtime md5) %attr(755, kube,kube) %dir /run/%{repo}
|
|
|
564fa16 |
|
|
|
564fa16 |
##############################################
|
|
|
564fa16 |
|
|
|
e1e0abc |
%pre systemd
|
|
|
0e1c83b |
%sysusers_create_compat %{SOURCE116}
|
|
|
f709bab |
|
|
|
e1e0abc |
%post systemd
|
|
|
564fa16 |
%systemd_post kube-apiserver kube-scheduler kube-controller-manager kube-proxy
|
|
|
f709bab |
|
|
|
e1e0abc |
%preun systemd
|
|
|
564fa16 |
%systemd_preun kube-apiserver kube-scheduler kube-controller-manager kube-proxy
|
|
|
f709bab |
|
|
|
e1e0abc |
%postun systemd
|
|
|
564fa16 |
%systemd_postun kube-apiserver kube-scheduler kube-controller-manager kube-proxy
|
|
|
f709bab |
|
|
|
f709bab |
|
|
|
564fa16 |
%pre
|
|
|
0e1c83b |
%sysusers_create_compat %{SOURCE116}
|
|
|
e3e6032 |
|
|
|
564fa16 |
%post
|
|
|
564fa16 |
%systemd_post kubelet
|
|
|
43a251e |
# If accounting is not currently enabled systemd reexec
|
|
|
ea22bc2 |
if [[ `systemctl show kubelet | grep -q -e CPUAccounting=no -e MemoryAccounting=no; echo $?` -eq 0 ]]; then
|
|
|
43a251e |
systemctl daemon-reexec
|
|
|
43a251e |
fi
|
|
|
beef130 |
|
|
|
564fa16 |
%preun
|
|
|
564fa16 |
%systemd_preun kubelet
|
|
|
beef130 |
|
|
|
564fa16 |
%postun
|
|
|
564fa16 |
%systemd_postun kubelet
|
|
|
beef130 |
|
|
Timothy St. Clair |
dbc1b82 |
############################################
|
|
|
beef130 |
%changelog
|
|
|
21a2296 |
%autochangelog
|