Skip to content

Commit

Permalink
Merge pull request #100 from harness/arya23499/fix-hypen-secrets
Browse files Browse the repository at this point in the history
Fix secret ref if the secret contains hyphens
  • Loading branch information
rushabh-harness committed May 22, 2024
2 parents f52839c + 9d031c3 commit 0bc1fbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: library
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.36
version: 1.3.37

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
4 changes: 2 additions & 2 deletions src/common/templates/_eso-secrets-helper.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ spec:
data:
{{- range $remoteKeyName, $remoteKey := $esoSecret.remoteKeys }}
{{- if not (empty $remoteKey.name) }}
{{ $remoteKeyName }}: "{{ printf "{{ .%s }}" (lower $remoteKeyName) }}"
{{ $remoteKeyName }}: "{{ printf "{{ .%s }}" (lower $remoteKeyName | replace "-" "_") }}"
{{- end }}
{{- end }}
data:
{{- range $remoteKeyName, $remoteKey := $esoSecret.remoteKeys }}
{{- if not (empty $remoteKey.name) }}
- secretKey: {{ lower $remoteKeyName }}
- secretKey: {{ lower $remoteKeyName | replace "-" "_" }}
remoteRef:
key: {{ $remoteKey.name }}
{{- if not (empty $remoteKey.property) }}
Expand Down

0 comments on commit 0bc1fbb

Please sign in to comment.