Skip to content

Commit

Permalink
[v2.9] fix flux 2.2 oci helmrepository health check
Browse files Browse the repository at this point in the history
Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
  • Loading branch information
chanwit committed Feb 10, 2024
1 parent f762c2a commit 4a10f77
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions patches-argo-cd-v2.9/22-fix-flux-2.2-oci.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
fix flux 2.2 oci helmrepository health check

From: Chanwit Kaewkasi <chanwit@gmail.com>

Signed-off-by: Chanwit Kaewkasi <chanwit@gmail.com>
---
.../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 = ""
1 change: 1 addition & 0 deletions patches-argo-cd-v2.9/series
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion patches-gitops-engine-v2.0.0/series
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4a10f77

Please sign in to comment.