From 4a10f77a6d02e3322e97755efd0f53d8f964490f Mon Sep 17 00:00:00 2001 From: Chanwit Kaewkasi Date: Sat, 10 Feb 2024 20:10:38 +0700 Subject: [PATCH] [v2.9] fix flux 2.2 oci helmrepository health check Signed-off-by: Chanwit Kaewkasi --- .../22-fix-flux-2.2-oci.patch | 29 +++++++++++++++++++ patches-argo-cd-v2.9/series | 1 + patches-gitops-engine-v2.0.0/series | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 patches-argo-cd-v2.9/22-fix-flux-2.2-oci.patch diff --git a/patches-argo-cd-v2.9/22-fix-flux-2.2-oci.patch b/patches-argo-cd-v2.9/22-fix-flux-2.2-oci.patch new file mode 100644 index 0000000..9691551 --- /dev/null +++ b/patches-argo-cd-v2.9/22-fix-flux-2.2-oci.patch @@ -0,0 +1,29 @@ +fix flux 2.2 oci helmrepository health check + +From: Chanwit Kaewkasi + +Signed-off-by: Chanwit Kaewkasi +--- + .../HelmRepository/health.lua | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua +index f5bd9b0bc..18f0cc1bf 100644 +--- a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua ++++ b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua +@@ -1,4 +1,15 @@ + hs = {} ++ ++if obj.spec.type = "oci" then ++-- https://fluxcd.io/flux/components/source/helmrepositories/#helm-oci-repository ++-- Because the OCI Helm repository is a data container, ++-- there’s nothing to report for READY and STATUS columns above. ++-- The existence of the object can be considered to be ready for use. ++ hs.status = "Healthy" ++ hs.message = "OCI HelmRepository is ready to use." ++ return hs ++end ++ + if obj.status ~= nil then + if obj.status.conditions ~= nil then + ready_status = "" diff --git a/patches-argo-cd-v2.9/series b/patches-argo-cd-v2.9/series index af80e4b..ec8b365 100644 --- a/patches-argo-cd-v2.9/series +++ b/patches-argo-cd-v2.9/series @@ -20,3 +20,4 @@ 19-fix-special-supported-schemes.patch 20-add-health-message-for-helm.patch 21-fix-health-message-in.patch +22-fix-flux-2.2-oci.patch diff --git a/patches-gitops-engine-v2.0.0/series b/patches-gitops-engine-v2.0.0/series index 56954f9..464358d 100644 --- a/patches-gitops-engine-v2.0.0/series +++ b/patches-gitops-engine-v2.0.0/series @@ -1,2 +1,2 @@ -# This series applies on Git commit 425d65e07695a741d90b248f2f365f6a4329c23d +# This series applies on Git commit b0fffe419a0f0a40f9f2c0b6346b752ed6537385 01-fsa-add-flux-ks-and-hr.patch