Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/charts/version-checker/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
21 changes: 21 additions & 0 deletions deploy/charts/version-checker/tests/secret_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Loading