From e0bba0a962161705c924ff39f156bef23389f36c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 May 2026 14:22:32 +0000 Subject: [PATCH 1/2] Initial plan From 03b857fbae2962cc1e78f6392acb7b8e595db013 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 9 May 2026 14:27:36 +0000 Subject: [PATCH 2/2] Fix selfhosted secret key mapping for ca_path and insecure Agent-Logs-Url: https://github.com/jetstack/version-checker/sessions/b4159bd0-5f27-41a8-9cbe-f384acd99ab6 Co-authored-by: davidcollom <1504448+davidcollom@users.noreply.github.com> --- .../version-checker/templates/secret.yaml | 4 ++-- .../version-checker/tests/secret_test.yaml | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/deploy/charts/version-checker/templates/secret.yaml b/deploy/charts/version-checker/templates/secret.yaml index 513858a4..f918c7aa 100644 --- a/deploy/charts/version-checker/templates/secret.yaml +++ b/deploy/charts/version-checker/templates/secret.yaml @@ -68,10 +68,10 @@ data: selfhosted.{{ $element.name }}.token: {{ $element.token | b64enc }} {{- end }} {{- if and (hasKey $element "insecure") $element.insecure }} - selfhosted.{{ $element.name }}.token: {{ $element.insecure | b64enc }} + selfhosted.{{ $element.name }}.insecure: {{ $element.insecure | b64enc }} {{- end }} {{- if and (hasKey $element "ca_path") $element.ca_path }} - selfhosted.{{ $element.name }}.token: {{ $element.ca_path | b64enc }} + selfhosted.{{ $element.name }}.ca_path: {{ $element.ca_path | b64enc }} {{- end }} {{- end }} diff --git a/deploy/charts/version-checker/tests/secret_test.yaml b/deploy/charts/version-checker/tests/secret_test.yaml index c006d8a1..f4d3cad8 100644 --- a/deploy/charts/version-checker/tests/secret_test.yaml +++ b/deploy/charts/version-checker/tests/secret_test.yaml @@ -126,3 +126,24 @@ tests: value: dXNlcjI= - notExists: path: data["selfhosted.selfhosted2.password"] + + - it: SelfHosted with token, insecure and ca_path + set: + selfhosted: + - name: gitlab + host: gitlab.example.com + token: glpat-test + insecure: "true" + ca_path: /mnt/ca.pem + asserts: + - hasDocuments: + count: 1 + - equal: + path: data["selfhosted.gitlab.token"] + value: Z2xwYXQtdGVzdA== + - equal: + path: data["selfhosted.gitlab.insecure"] + value: dHJ1ZQ== + - equal: + path: data["selfhosted.gitlab.ca_path"] + value: L21udC9jYS5wZW0=