Bump minor RPM version to trigger new build
[ta/caas-kubernetes.git] / caas-kubernetes.spec
index beee7b5..074e6be 100644 (file)
 
 %define COMPONENT kubernetes
 %define RPM_NAME caas-%{COMPONENT}
-%define RPM_MAJOR_VERSION 1.14.0
-%define RPM_MINOR_VERSION 1
+%define RPM_MAJOR_VERSION 1.16.2
+%define RPM_MINOR_VERSION 7
 %define IMAGE_TAG %{RPM_MAJOR_VERSION}-%{RPM_MINOR_VERSION}
 %define KUBERNETESPAUSE_VERSION 3.1
 
-%define go_version 1.12.1
+%define go_version 1.12.10
 %define ceph_version 12.2.5
 %define binary_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/binary-save
 %define docker_build_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-build
 %define docker_save_dir %{_builddir}/%{RPM_NAME}-%{RPM_MAJOR_VERSION}/docker-save
 %define built_binaries_dir /binary-save
+%define centos_build 191001
 
 Name:           %{RPM_NAME}
 Version:        %{RPM_MAJOR_VERSION}
 Release:        %{RPM_MINOR_VERSION}%{?dist}
 Summary:        Containers as a Service %{COMPONENT} component
 License:        %{_platform_licence} and Apache License and GNU General Public License v2.0 only and GNU Lesser General Public License v2.1 only and MIT license and BSD and MIT license and ISC License and Creative Commons Attribution ShareAlike 4.0 International and Mozilla Public License and COMMON DEVELOPMENT AND DISTRIBUTION LICENSE and Lesser General Public License and Creative Commons - Public Domain and Creative Commons Public License and BSD 3-Clause License
-BuildArch:      x86_64
+BuildArch:      %{_arch}
 Vendor:         %{_platform_vendor} and kubernetes/kubernetes unmodified
 Source0:        %{name}-%{version}.tar.gz
 
-Requires: docker-ce >= 18.09.2
-BuildRequires: docker-ce-cli >= 18.09.2
+Requires: docker-ce >= 18.09.2, rsync
+BuildRequires: docker-ce-cli >= 18.09.2, xz, wget
 
 # more info at: https://fedoraproject.org/wiki/Packaging:Debuginfo No build ID note in Flannel
 %global debug_package %{nil}
@@ -50,6 +51,7 @@ This container contains the %{COMPONENT} service.
 
 # Build Kubernetes binaries
 %build
+wget --progress=dot:giga http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-%{centos_build}/%{_arch}/centos-7-%{_arch}-docker.tar.xz -O %{docker_build_dir}/kubernetes-builder/centos-7-docker.tar.xz
 set -x
 docker build \
   --network=host \
@@ -81,6 +83,7 @@ docker rm -f ${builder_container}
 docker rmi kubernetes-builder:%{IMAGE_TAG}
 
 # Build hyperkube container image
+wget --progress=dot:giga http://artifacts.ci.centos.org/sig-cloudinstance/centos-7-%{centos_build}/%{_arch}/centos-7-%{_arch}-docker.tar.xz -O %{docker_build_dir}/hyperkube/centos-7-docker.tar.xz
 rsync -av %{binary_build_dir}/kube-apiserver %{docker_build_dir}/hyperkube/
 rsync -av %{binary_build_dir}/kube-controller-manager %{docker_build_dir}/hyperkube/
 rsync -av %{binary_build_dir}/kube-proxy %{docker_build_dir}/hyperkube/
@@ -99,7 +102,7 @@ docker build \
   --tag hyperkube:%{IMAGE_TAG} \
   %{docker_build_dir}/hyperkube
 mkdir -p %{docker_save_dir}
-docker save hyperkube:%{IMAGE_TAG} | gzip -c > "%{docker_save_dir}/hyperkube:%{IMAGE_TAG}.tar"
+docker save hyperkube:%{IMAGE_TAG} | xz -z -T2 > "%{docker_save_dir}/hyperkube:%{IMAGE_TAG}.tar"
 docker rmi hyperkube:%{IMAGE_TAG}
 
 # Build kubernetes pause container image
@@ -114,11 +117,11 @@ docker build \
   --build-arg https_proxy="${https_proxy}" \
   --build-arg no_proxy="${no_proxy}" \
   --build-arg KUBERNETESPAUSE_VERSION="%{KUBERNETESPAUSE_VERSION}" \
-  --tag kubernetespause:%{IMAGE_TAG} \
+  --tag kubernetespause:%{KUBERNETESPAUSE_VERSION} \
   %{docker_build_dir}/kubernetespause
 mkdir -p %{docker_save_dir}
-docker save kubernetespause:%{IMAGE_TAG} | gzip -c > "%{docker_save_dir}/kubernetespause:%{IMAGE_TAG}.tar"
-docker rmi kubernetespause:%{IMAGE_TAG}
+docker save kubernetespause:%{KUBERNETESPAUSE_VERSION} | xz -z -T2 > "%{docker_save_dir}/kubernetespause:%{KUBERNETESPAUSE_VERSION}.tar"
+docker rmi kubernetespause:%{KUBERNETESPAUSE_VERSION}
 
 %install
 mkdir -p %{buildroot}/%{_caas_container_tar_path}
@@ -155,11 +158,11 @@ ln -s %{_playbooks_path}/kube_secret_key_creation.yaml      %{_postconfig_path}/
 ln -s %{_playbooks_path}/kube_secret_key_distribution.yaml  %{_postconfig_path}/
 ln -s %{_playbooks_path}/kube_token_creation.yaml           %{_postconfig_path}/
 ln -s %{_playbooks_path}/kube_token_distribution.yaml       %{_postconfig_path}/
-ln -s %{_playbooks_path}/kubernetes_ceph.yaml               %{_postconfig_path}/
 ln -s %{_playbooks_path}/master_kube_proxy.yaml             %{_postconfig_path}/
 ln -s %{_playbooks_path}/master_kubelet.yaml                %{_postconfig_path}/
 ln -s %{_playbooks_path}/service_account_creation.yaml      %{_postconfig_path}/
 ln -s %{_playbooks_path}/service_account_distribution.yaml  %{_postconfig_path}/
+ln -s %{_playbooks_path}/set_nodes_label.yaml               %{_postconfig_path}/
 
 %postun
 if [ $1 -eq 0 ]; then
@@ -170,11 +173,11 @@ if [ $1 -eq 0 ]; then
   rm -f %{_postconfig_path}/kube_secret_key_distribution.yaml
   rm -f %{_postconfig_path}/kube_token_creation.yaml
   rm -f %{_postconfig_path}/kube_token_distribution.yaml
-  rm -f %{_postconfig_path}/kubernetes_ceph.yaml
   rm -f %{_postconfig_path}/master_kube_proxy.yaml
   rm -f %{_postconfig_path}/master_kubelet.yaml
   rm -f %{_postconfig_path}/service_account_creation.yaml
   rm -f %{_postconfig_path}/service_account_distribution.yaml
+  rm -f %{_postconfig_path}/set_nodes_label.yaml
 fi
 
 %clean