From f0870b2e4837087e29324689ad7fd73f2605695c Mon Sep 17 00:00:00 2001 From: Al Bailey Date: Thu, 3 Oct 2019 12:04:56 -0500 Subject: [PATCH] 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 --- kubernetes/kubernetes/centos/build_srpm.data | 2 +- kubernetes/kubernetes/centos/kubernetes.spec | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/kubernetes/kubernetes/centos/build_srpm.data b/kubernetes/kubernetes/centos/build_srpm.data index 3fe280bff..2f9a408ec 100644 --- a/kubernetes/kubernetes/centos/build_srpm.data +++ b/kubernetes/kubernetes/centos/build_srpm.data @@ -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 diff --git a/kubernetes/kubernetes/centos/kubernetes.spec b/kubernetes/kubernetes/centos/kubernetes.spec index 15d568466..e8b93a105 100644 --- a/kubernetes/kubernetes/centos/kubernetes.spec +++ b/kubernetes/kubernetes/centos/kubernetes.spec @@ -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