fix: resolve argocd ui error for externalSecrets, fixes #23886 (#24232)

Signed-off-by: ralf.weber <ralf.weber@cistec.com>
Co-authored-by: ralf.weber <ralf.weber@cistec.com>
This commit is contained in:
raweber 2025-08-22 18:41:55 +02:00 committed by GitHub
parent d3bdc9d5f3
commit 6c38186f7f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 24 additions and 10 deletions

View file

@ -2,3 +2,8 @@ actionTests:
- action: refresh
inputPath: testdata/external-secret.yaml
expectedOutputPath: testdata/external-secret-updated.yaml
discoveryTests:
- inputPath: testdata/external-secret.yaml
result:
- name: "refresh"

View file

@ -3,11 +3,13 @@ local actions = {}
local disable_refresh = false
local time_units = {"ns", "us", "µs", "ms", "s", "m", "h"}
local digits = obj.spec.refreshInterval
for _, time_unit in ipairs(time_units) do
digits, _ = digits:gsub(time_unit, "")
if tonumber(digits) == 0 then
disable_refresh = true
break
if digits ~= nil then
digits = tostring(digits)
for _, time_unit in ipairs(time_units) do
if digits == "0" or digits == "0" .. time_unit then
disable_refresh = true
break
end
end
end

View file

@ -2,3 +2,8 @@ actionTests:
- action: push
inputPath: testdata/push-secret.yaml
expectedOutputPath: testdata/push-secret-updated.yaml
discoveryTests:
- inputPath: testdata/push-secret.yaml
result:
- name: "push"

View file

@ -3,11 +3,13 @@ local actions = {}
local disable_push = false
local time_units = {"ns", "us", "µs", "ms", "s", "m", "h"}
local digits = obj.spec.refreshInterval
for _, time_unit in ipairs(time_units) do
digits, _ = digits:gsub(time_unit, "")
if tonumber(digits) == 0 then
disable_push = true
break
if digits ~= nil then
digits = tostring(digits)
for _, time_unit in ipairs(time_units) do
if digits == "0" or digits == "0" .. time_unit then
disable_push = true
break
end
end
end