From fd5884c4287e77a12d1767cf1b4c4f46dd678a7b Mon Sep 17 00:00:00 2001 From: Yue Tao Date: Thu, 9 Dec 2021 12:24:55 +0800 Subject: [PATCH] armada: remove dl_hook "dl_path" to replace tar xfz ${ARMADA_PKG} cp -pr ${PKG}/charts ${PKG_BUILD_ROOT} debrepack extracts the ${ARMADA_PKG} as ${PKG_BUILD_ROOT}, so no need cp -pr ${PKG}/charts ${PKG_BUILD_ROOT}. And move the patches into deb_folder Test Plan: Pass: successfully build test Story: 2009221 Task: 43917 Signed-off-by: Yue Tao Change-Id: I041bbed3dff41ed7e63c99ddfef14c206628436e --- ...1-Add-Helm-v2-client-initialization.patch} | 10 ++++---- ...ller-wait-for-postgres-database-ping.patch | 0 ...ess-probe-to-verify-postgres-connect.patch | 0 ...liveness-check-to-support-IPv6-addre.patch | 0 .../0005-Add-toleration-to-armada-api.patch | 13 ++++++----- .../debian/{ => deb_folder}/patches/series | 2 +- kubernetes/armada/debian/dl_hook | 23 ------------------- kubernetes/armada/debian/meta_data.yaml | 5 +++- 8 files changed, 16 insertions(+), 37 deletions(-) rename kubernetes/armada/debian/{patches/0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch => deb_folder/patches/0001-Add-Helm-v2-client-initialization.patch} (95%) rename kubernetes/armada/debian/{ => deb_folder}/patches/0002-Tiller-wait-for-postgres-database-ping.patch (100%) rename kubernetes/armada/debian/{ => deb_folder}/patches/0003-Update-the-liveness-probe-to-verify-postgres-connect.patch (100%) rename kubernetes/armada/debian/{ => deb_folder}/patches/0004-Update-postgres-liveness-check-to-support-IPv6-addre.patch (100%) rename kubernetes/armada/debian/{ => deb_folder}/patches/0005-Add-toleration-to-armada-api.patch (88%) rename kubernetes/armada/debian/{ => deb_folder}/patches/series (77%) delete mode 100755 kubernetes/armada/debian/dl_hook diff --git a/kubernetes/armada/debian/patches/0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch b/kubernetes/armada/debian/deb_folder/patches/0001-Add-Helm-v2-client-initialization.patch similarity index 95% rename from kubernetes/armada/debian/patches/0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch rename to kubernetes/armada/debian/deb_folder/patches/0001-Add-Helm-v2-client-initialization.patch index a6955e460..88b35bb85 100644 --- a/kubernetes/armada/debian/patches/0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch +++ b/kubernetes/armada/debian/deb_folder/patches/0001-Add-Helm-v2-client-initialization.patch @@ -1,8 +1,7 @@ -From 8c6cc4c0ad5569d7de3615463f7d8c4dd7429e63 Mon Sep 17 00:00:00 2001 +From 0dad89825be15c596d5678d8daafa671f859f4f6 Mon Sep 17 00:00:00 2001 From: Thiago Brito Date: Thu, 22 Apr 2021 20:00:51 -0300 -Subject: [PATCH] Add Helm v2 client initialization using tiller - postStart exec +Subject: [PATCH] Add Helm v2 client initialization This adds helm v2 client initialization using the tiller container postStart exec to access helm v2 binary. @@ -36,7 +35,7 @@ Signed-off-by: Thiago Brito 2 files changed, 43 insertions(+) diff --git a/charts/armada/templates/deployment-api.yaml b/charts/armada/templates/deployment-api.yaml -index 562e3d0..483ec0b 100644 +index 562e3d0..69036c0 100644 --- a/charts/armada/templates/deployment-api.yaml +++ b/charts/armada/templates/deployment-api.yaml @@ -186,6 +186,39 @@ spec: @@ -109,6 +108,5 @@ index 3a4427e..da45810 100644 # Should be the `$HOME/.kube` of the `runAsUser` above # as this is where tiller's kubernetes client roots its cache dir. -- -2.17.1 - +2.25.1 diff --git a/kubernetes/armada/debian/patches/0002-Tiller-wait-for-postgres-database-ping.patch b/kubernetes/armada/debian/deb_folder/patches/0002-Tiller-wait-for-postgres-database-ping.patch similarity index 100% rename from kubernetes/armada/debian/patches/0002-Tiller-wait-for-postgres-database-ping.patch rename to kubernetes/armada/debian/deb_folder/patches/0002-Tiller-wait-for-postgres-database-ping.patch diff --git a/kubernetes/armada/debian/patches/0003-Update-the-liveness-probe-to-verify-postgres-connect.patch b/kubernetes/armada/debian/deb_folder/patches/0003-Update-the-liveness-probe-to-verify-postgres-connect.patch similarity index 100% rename from kubernetes/armada/debian/patches/0003-Update-the-liveness-probe-to-verify-postgres-connect.patch rename to kubernetes/armada/debian/deb_folder/patches/0003-Update-the-liveness-probe-to-verify-postgres-connect.patch diff --git a/kubernetes/armada/debian/patches/0004-Update-postgres-liveness-check-to-support-IPv6-addre.patch b/kubernetes/armada/debian/deb_folder/patches/0004-Update-postgres-liveness-check-to-support-IPv6-addre.patch similarity index 100% rename from kubernetes/armada/debian/patches/0004-Update-postgres-liveness-check-to-support-IPv6-addre.patch rename to kubernetes/armada/debian/deb_folder/patches/0004-Update-postgres-liveness-check-to-support-IPv6-addre.patch diff --git a/kubernetes/armada/debian/patches/0005-Add-toleration-to-armada-api.patch b/kubernetes/armada/debian/deb_folder/patches/0005-Add-toleration-to-armada-api.patch similarity index 88% rename from kubernetes/armada/debian/patches/0005-Add-toleration-to-armada-api.patch rename to kubernetes/armada/debian/deb_folder/patches/0005-Add-toleration-to-armada-api.patch index 31cb98c06..77b8aa6d6 100644 --- a/kubernetes/armada/debian/patches/0005-Add-toleration-to-armada-api.patch +++ b/kubernetes/armada/debian/deb_folder/patches/0005-Add-toleration-to-armada-api.patch @@ -1,8 +1,9 @@ -From 8f38dcdc7ba6448487283d14a745b8c299c47a13 Mon Sep 17 00:00:00 2001 +From a2e44bc741366c39ebae7add1564a8ac67f13895 Mon Sep 17 00:00:00 2001 From: Enzo Candotti Date: Wed, 6 Oct 2021 18:25:10 -0300 Subject: [PATCH] Add toleration to armada-api +Signed-off-by: Yue Tao --- charts/armada/templates/deployment-api.yaml | 4 ++++ charts/armada/templates/tests/test-armada-api.yaml | 4 ++++ @@ -10,10 +11,10 @@ Subject: [PATCH] Add toleration to armada-api 3 files changed, 10 insertions(+) diff --git a/charts/armada/templates/deployment-api.yaml b/charts/armada/templates/deployment-api.yaml -index d4eff7a..1859d99 100644 +index 5c4825c..3ee086a 100644 --- a/charts/armada/templates/deployment-api.yaml +++ b/charts/armada/templates/deployment-api.yaml -@@ -108,6 +108,10 @@ spec: +@@ -125,6 +125,10 @@ spec: initContainers: {{ tuple $envAll "api" $mounts_armada_api_init | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{ dict "envAll" $envAll "application" "armada" "container" "armada_api_init" | include "helm-toolkit.snippets.kubernetes_container_security_context" | indent 10 }} @@ -25,7 +26,7 @@ index d4eff7a..1859d99 100644 - name: armada-api {{ tuple $envAll "api" | include "helm-toolkit.snippets.image" | indent 10 }} diff --git a/charts/armada/templates/tests/test-armada-api.yaml b/charts/armada/templates/tests/test-armada-api.yaml -index a467fc9..2733cfe 100644 +index 895353a..aa9e37a 100644 --- a/charts/armada/templates/tests/test-armada-api.yaml +++ b/charts/armada/templates/tests/test-armada-api.yaml @@ -32,6 +32,10 @@ metadata: @@ -40,10 +41,10 @@ index a467fc9..2733cfe 100644 {{ .Values.labels.test.node_selector_key }}: {{ .Values.labels.test.node_selector_value }} containers: diff --git a/charts/armada/values.yaml b/charts/armada/values.yaml -index e583947..247b15e 100644 +index da45810..3644706 100644 --- a/charts/armada/values.yaml +++ b/charts/armada/values.yaml -@@ -206,6 +206,8 @@ monitoring: +@@ -233,6 +233,8 @@ monitoring: port: 8000 pod: diff --git a/kubernetes/armada/debian/patches/series b/kubernetes/armada/debian/deb_folder/patches/series similarity index 77% rename from kubernetes/armada/debian/patches/series rename to kubernetes/armada/debian/deb_folder/patches/series index 7c4ffe39e..ba4a00151 100644 --- a/kubernetes/armada/debian/patches/series +++ b/kubernetes/armada/debian/deb_folder/patches/series @@ -1,4 +1,4 @@ -0001-Add-Helm-v2-client-initialization-using-tiller-postS.patch +0001-Add-Helm-v2-client-initialization.patch 0002-Tiller-wait-for-postgres-database-ping.patch 0003-Update-the-liveness-probe-to-verify-postgres-connect.patch 0004-Update-postgres-liveness-check-to-support-IPv6-addre.patch diff --git a/kubernetes/armada/debian/dl_hook b/kubernetes/armada/debian/dl_hook deleted file mode 100755 index 1a77d4694..000000000 --- a/kubernetes/armada/debian/dl_hook +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -set -x - -PKG_BUILD_NAME=$1 -PKG="armada" -PKG_BUILD_ROOT=$(realpath `pwd`/${PKG_BUILD_NAME}) -mkdir -p ${PKG_BUILD_ROOT} -pushd ${PKG_BUILD_ROOT} - -# Local mirror workaround until CGCS_BASE mirror is supported. -STX_MIRROR=$(realpath "/import/mirrors/starlingx") - -# Download armada helm source package. -ARMADA_PKG="armada-7ef4b8643b5ec5216a8f6726841e156c0aa54a1a.tar.gz" -ARMADA_SRC_PATH=$(realpath ${STX_MIRROR}/downloads/${ARMADA_PKG}) -cp ${ARMADA_SRC_PATH} ${PKG_BUILD_ROOT} - -# Extract the armada tar file. -tar xfz ${ARMADA_PKG} -cp -pr ${PKG}/charts ${PKG_BUILD_ROOT} - -rm -rf ${ARMADA_PKG} -rm -rf ${PKG} \ No newline at end of file diff --git a/kubernetes/armada/debian/meta_data.yaml b/kubernetes/armada/debian/meta_data.yaml index 0c7619aab..39bdc3a72 100644 --- a/kubernetes/armada/debian/meta_data.yaml +++ b/kubernetes/armada/debian/meta_data.yaml @@ -1,7 +1,10 @@ --- debname: armada debver: 0.2.0-0 -dl_hook: dl_hook +dl_path: + name: armada-7ef4b8643b5ec5216a8f6726841e156c0aa54a1a.tar.gz + url: https://github.com/airshipit/armada/tarball/7ef4b8643b5ec5216a8f6726841e156c0aa54a1a + md5sum: 58e2ee93d7e177e96e2cf0de1873ccce revision: dist: $STX_DIST PKG_GITREVCOUNT: true