De-couple kubernetes rpms from one another

The spec file from Centos was written to tightly couple
the kubernetes rpms to the same version and therefore prevent
any of them from being changed without installing the entire set.

This blocks the kubernetes upgrade procedure, which expects
components such as kubeadm or kubelet to up-version independently
from the other kubernetes components.

Refer to Upgrading Control Planes section of:
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/

In addition, hyperkube (unused) was packaged in multiple
rpms which is an rpm patching semantic violation.

Story: 2005860
Task: 36956
Change-Id: I26b7bc4b232635ac5f58aa9db79fcfe505c85fdc
Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
Al Bailey 2019-10-03 12:04:56 -05:00
parent 33f01e91b3
commit f0870b2e48
2 changed files with 6 additions and 16 deletions

View File

@ -6,4 +6,4 @@ CONTRIB="$TAR_NAME-contrib-v$CON_VERSION.tar.gz"
COPY_LIST="${CGCS_BASE}/downloads/$TAR ${CGCS_BASE}/downloads/$CONTRIB $FILES_BASE/*"
TIS_PATCH_VER=1
TIS_PATCH_VER=2

View File

@ -60,8 +60,8 @@ Obsoletes: cadvisor
# kubernetes is decomposed into master and node subpackages
# require both of them for updates
Requires: kubernetes-master = %{version}-%{release}
Requires: kubernetes-node = %{version}-%{release}
Requires: kubernetes-master
Requires: kubernetes-node
%description
%{summary}
@ -781,11 +781,7 @@ BuildRequires: go-md2man
BuildRequires: go-bindata
Requires(pre): shadow-utils
Requires: kubernetes-client = %{version}-%{release}
# if node is installed with node, version and release must be the same
Conflicts: kubernetes-node < %{version}-%{release}
Conflicts: kubernetes-node > %{version}-%{release}
Requires: kubernetes-client
%description master
Kubernetes services for master host
@ -810,11 +806,7 @@ BuildRequires: go-bindata
Requires(pre): shadow-utils
Requires: socat
Requires: kubernetes-client = %{version}-%{release}
# if master is installed with node, version and release must be the same
Conflicts: kubernetes-master < %{version}-%{release}
Conflicts: kubernetes-master > %{version}-%{release}
Requires: kubernetes-client
%description node
Kubernetes services for node host
@ -822,7 +814,7 @@ Kubernetes services for node host
##############################################
%package kubeadm
Summary: Kubernetes tool for standing up clusters
Requires: kubernetes-node = %{version}-%{release}
Requires: kubernetes-client
Requires: containernetworking-cni
%description kubeadm
@ -1023,7 +1015,6 @@ fi
%attr(754, -, kube) %caps(cap_net_bind_service=ep) %{_bindir}/kube-apiserver
%{_bindir}/kube-controller-manager
%{_bindir}/kube-scheduler
%{_bindir}/hyperkube
%{_unitdir}/kube-apiserver.service
%{_unitdir}/kube-controller-manager.service
%{_unitdir}/kube-scheduler.service
@ -1044,7 +1035,6 @@ fi
%{_bindir}/kubelet
%{_bindir}/kubelet-cgroup-setup.sh
%{_bindir}/kube-proxy
%{_bindir}/hyperkube
%{_unitdir}/kube-proxy.service
%{_unitdir}/kubelet.service
%dir %{_sharedstatedir}/kubelet