Skip to content

Commit

Permalink
Merge pull request #391 from jkroepke/vals
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke authored Aug 14, 2023
2 parents 91fceed + 3841e52 commit 78376a3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: CI

env:
WSLENV: "HELM_SECRETS_BACKEND:BATS_REPORT_FILENAME:BATS_TEST_NAME_PREFIX"
VERSION_HELM: v3.11.1
VERSION_HELM: v3.12.3
VERSION_SOPS: v3.7.3
VERSION_VALS: v0.24.0
VERSION_VALS: v0.26.2

on:
pull_request:
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [4.5.0] - 2023-08-14

### Added
- Added `--decrypt-secrets-in-tmp-dir` to solve concurrency issues or if work disk is read-only

### Changes
- BREAKING: helm-secrets requires vals 0.22 or higher
- BREAKING: helm-secrets requires vals 0.26.2 or higher

### Fixed
- Avoid quoting issues with literals and `vals` backend
Expand Down
6 changes: 3 additions & 3 deletions scripts/commands/post-renderer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -euf

post_renderer() {
if [ "${EVALUATE_TEMPLATES_DECODE_SECRETS}" = "true" ]; then
_vals ksdecode -f - | _vals_backend_decrypt_file "yaml" "-"
else
_vals_backend_decrypt_file "yaml" "-"
SECRET_BACKEND_ARGS="${SECRET_BACKEND_ARGS:-} -decode-kubernetes-secrets"
fi

_vals_backend_decrypt_file "yaml" "-"
}
2 changes: 1 addition & 1 deletion scripts/lib/backends/vals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _VALS="${HELM_SECRETS_VALS_PATH:-vals}"

_vals() {
# shellcheck disable=SC2086
set -- ${SECRET_BACKEND_ARGS} "$@"
set -- "$@" ${SECRET_BACKEND_ARGS}

# In case of an error, give us stderr
# https://github.com/variantdev/vals/issues/60
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/template.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1869,8 +1869,8 @@ load '../bats/extensions/bats-file/load'

assert_output --partial 'config: "42"'
assert_output --partial 'config.env: "44"'
assert_output --partial 'secret: "42"'
assert_output --partial 'secret.env: "44"'
assert_output --partial 'secret: NDI='
assert_output --partial 'secret.env: NDQ='
assert_success
}

Expand All @@ -1887,8 +1887,8 @@ load '../bats/extensions/bats-file/load'

assert_output --partial 'config: "42"'
assert_output --partial 'config.env: "44"'
assert_output --partial 'secret: "42"'
assert_output --partial 'secret.env: "44"'
assert_output --partial 'secret: NDI='
assert_output --partial 'secret.env: NDQ='
assert_success
}

Expand All @@ -1905,8 +1905,8 @@ load '../bats/extensions/bats-file/load'

assert_output --partial 'config: "42"'
assert_output --partial 'config.env: "44"'
assert_output --partial 'secret: "42"'
assert_output --partial 'secret.env: "44"'
assert_output --partial 'secret: NDI='
assert_output --partial 'secret.env: NDQ='
assert_success
}

Expand Down

0 comments on commit 78376a3

Please sign in to comment.