Skip to content

Commit

Permalink
Merge branch 'Typositoire:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 authored Sep 2, 2024
2 parents d32318d + 6650fc1 commit 9ab9834
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ Deploy an helm chart
- `kubeconfig`: _Optional._ String containing a kubeconfig. Overrides `kubeconfig_path` and source configuration for cluster, token, and admin config.
- `kubeconfig_path`: _Optional._ File containing a kubeconfig. Overrides source configuration for cluster, token, and admin config.
- `show_diff`: _Optional._ Show the diff that is applied if upgrading an existing successful release. (Default: false)
- `skip_missing_values:` _Optional._ Missing values files are skipped if they are specified in the values but do not exist. (Default false)
- `diff_opts`: _Optional._ Additional options to be appended to `helm diff` command. (Default: "")
- `skip_missing_values:` _Optional._ Missing values files are skipped if they are specified in the values but do not exist.(Default false)

## Example

Expand Down Expand Up @@ -306,3 +307,24 @@ jobs:
chart: oci://01234567890.dkr.ecr.us-west-2.amazonaws.com/myapp-helm-repo
# ...
```

If `helm` chart contains `lookup` function
```yaml
resources:
- name: myapp-helm
type: helm
source:
env_vars:
HELM_DIFF_USE_INSECURE_SERVER_SIDE_DRY_RUN: true
#...
jobs:
# ...
plan:
- put: myapp-helm
params:
chart: ...
show_diff: true
diff_opts: "--dry-run=server"
# ...
# ...
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.37.0
1.37.1
3 changes: 2 additions & 1 deletion assets/out
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ test_logs=$(jq -r '.params.test_logs // "false"' < $payload)
devel=$(jq -r '.params.devel // "false"' < $payload)
force=$(jq -r '.params.force // "false"' < $payload)
show_diff=$(jq -r '.params.show_diff // "false"' < $payload)
diff_opts=$(jq -r '.params.diff_opts // ""' < $payload)
post_renderer=$(jq -r '.params.post_renderer // ""' < $payload)
reuse_values=$(jq -r '.params.reuse_values // "false"' < $payload)
reset_values=$(jq -r '.params.reset_values // "false"' < $payload)
Expand Down Expand Up @@ -300,7 +301,7 @@ helm_upgrade() {

if [ "$show_diff" = true ] ; then
echo "Release diff:"
$helm_bin diff --no-color=false "${helm_diff_args[@]}" | tee "$logfile"
$helm_bin diff --no-color=false "${helm_diff_args[@]}" ${diff_opts}| tee "$logfile"
fi

echo "Running command helm ${helm_echo_args[@]} | tee $logfile"
Expand Down

0 comments on commit 9ab9834

Please sign in to comment.