From d2acaea1ef1eaf6be7a019cc85dbb525a00e385a Mon Sep 17 00:00:00 2001 From: Jerry Sun Date: Fri, 13 May 2022 19:04:14 -0400 Subject: [PATCH] Add Kubectl Cert Manager This commit adds the kubernetes plugin kubectl cert manager to the iso. This is used to convert old v1alpha2 and v1alpha3 cert manager resources to v1 during a system upgrade. The plugin is not required for debian because there are no old cert manager resources to convert. Test Cases: PASS: Convert our default DC certificates and issuers using kubectl cert manager Change-Id: I59f1b0e4d5d6ece1ccef43fee1acacd7b7e44efd Story: 2009837 Task: 45372 Signed-off-by: Jerry Sun --- centos_iso_image.inc | 3 +++ centos_pkg_dirs | 1 + centos_tarball-dl.lst | 1 + .../centos/build_srpm.data | 4 +++ .../centos/kubectl-cert-manager.spec | 26 +++++++++++++++++++ 5 files changed, 35 insertions(+) create mode 100644 kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data create mode 100644 kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec diff --git a/centos_iso_image.inc b/centos_iso_image.inc index edc40b9a6..d0d65ae78 100644 --- a/centos_iso_image.inc +++ b/centos_iso_image.inc @@ -177,6 +177,9 @@ resource-agents # isolcpus device plugin for K8s isolcpus-device-plugin +# kubectl-cert-manager +kubectl-cert-manager + # haproxy haproxy diff --git a/centos_pkg_dirs b/centos_pkg_dirs index b9745d235..b22e46b39 100644 --- a/centos_pkg_dirs +++ b/centos_pkg_dirs @@ -68,6 +68,7 @@ kubernetes/armada kubernetes/k8s-pod-recovery kubernetes/k8s-cni-cache-cleanup kubernetes/plugins/isolcpus-device-plugin +kubernetes/plugins/kubectl-cert-manager python/python-kubernetes grub/grubby base/dpkg diff --git a/centos_tarball-dl.lst b/centos_tarball-dl.lst index 0a009e4d4..9a7fc23e2 100644 --- a/centos_tarball-dl.lst +++ b/centos_tarball-dl.lst @@ -39,6 +39,7 @@ jerasure-96c76b89d661c163f65a014b8042c9354ccf7f31.tar.gz#jerasure#https://api.gi kexec-tools-2.0.21.tar.xz#kexec-tools-2.0.21#https://www.kernel.org/pub/linux/utils/kernel/kexec/kexec-tools-2.0.21.tar.xz#https## !kdump-anaconda-addon-003-29-g4c517c5.tar.gz#kexec-tools#https://vault.centos.org/7.6.1810/os/Source/SPackages/kexec-tools-2.0.15-21.el7.src.rpm#https## keycodemapdb-16e5b07.tar.gz#keycodemapdb#https://github.com/CendioOssman/keycodemapdb/tarball/16e5b0787687d8904dad2c026107409eb9bfcb95#http## +kubectl-cert_manager-linux-amd64.tar.gz#LICENSES#https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/kubectl-cert_manager-linux-amd64.tar.gz#https## kubernetes-contrib-v1.18.1.tar.gz#kubernetes-contrib-1.18.1#https://github.com/kubernetes-retired/contrib/tarball/89f6948e24578fed2a90a87871b2263729f90ac3#http## kubernetes-v1.21.8.tar.gz#kubernetes-1.21.8#https://github.com/kubernetes/kubernetes/archive/refs/tags/v1.21.8.tar.gz#http## kubernetes-v1.22.5.tar.gz#kubernetes-1.22.5#https://github.com/kubernetes/kubernetes/archive/refs/tags/v1.22.5.tar.gz#http## diff --git a/kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data b/kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data new file mode 100644 index 000000000..3bcf1bea3 --- /dev/null +++ b/kubernetes/plugins/kubectl-cert-manager/centos/build_srpm.data @@ -0,0 +1,4 @@ +TAR="kubectl-cert_manager-linux-amd64.tar.gz" + +COPY_LIST="${CGCS_BASE}/downloads/${TAR}" +TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec b/kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec new file mode 100644 index 000000000..4cb3c2d2e --- /dev/null +++ b/kubernetes/plugins/kubectl-cert-manager/centos/kubectl-cert-manager.spec @@ -0,0 +1,26 @@ +Summary: Cert-Manager Kubernetes plugin + +Name: kubectl-cert-manager +Version: 1.7.1 +Release: %{tis_patch_ver}%{?_tis_dist} +License: Apache-2.0 +Group: base +Packager: Wind River +URL: https://github.com/cert-manager/cert-manager/releases/download/v1.7.1/kubectl-cert_manager-linux-amd64.tar.gz + +Source0: kubectl-cert_manager-linux-amd64.tar.gz + +%description +Cert-Manager Kubernetes plugin + +%prep +cp %{SOURCE0} . +tar -xvf kubectl-cert_manager-linux-amd64.tar.gz + +%install +install -d -m 755 %{buildroot}/usr/local/sbin +install -p -D -m 755 %{_builddir}/kubectl-cert_manager %{buildroot}/usr/local/sbin + +%files +%defattr(-,root,root,-) +/usr/local/sbin/kubectl-cert_manager