diff --git a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua index 9ad39cb708..18eba69b4f 100644 --- a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua +++ b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health.lua @@ -4,6 +4,13 @@ if obj.spec.suspend ~= nil and obj.spec.suspend == true then hs.status = "Suspended" return hs end +-- Helm repositories of type "oci" do not contain any information in the status +-- https://fluxcd.io/flux/components/source/helmrepositories/#helmrepository-status +if obj.spec.type ~= nil and obj.spec.type == "oci" then + hs.message = "Helm repositories of type 'oci' do not contain any information in the status." + hs.status = "Healthy" + return hs +end if obj.status ~= nil then if obj.status.conditions ~= nil then local numProgressing = 0 diff --git a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health_test.yaml b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health_test.yaml index 2093ed4de0..bcef617ab2 100644 --- a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health_test.yaml +++ b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/health_test.yaml @@ -11,3 +11,7 @@ tests: status: Healthy message: Succeeded inputPath: testdata/healthy.yaml + - healthStatus: + status: Healthy + message: "Helm repositories of type 'oci' do not contain any information in the status." + inputPath: testdata/oci.yaml diff --git a/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/testdata/oci.yaml b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/testdata/oci.yaml new file mode 100644 index 0000000000..be8ac92751 --- /dev/null +++ b/resource_customizations/source.toolkit.fluxcd.io/HelmRepository/testdata/oci.yaml @@ -0,0 +1,10 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: podinfo + namespace: default +spec: + type: "oci" + interval: 5m0s + url: oci://ghcr.io/stefanprodan/charts +status: {}