Skip to content

Commit

Permalink
Fix create-namespace to only apply to install (#61)
Browse files Browse the repository at this point in the history
The create-namespace option was being used with
uninstall and was not a valid option for 'helm uninstall'
  • Loading branch information
agayle-isp authored Oct 30, 2024
1 parent 99dab66 commit f27e251
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ inputs:
description: 'Name of the helm deploy.'
required: true
action:
description: 'Specify whether you want to install or uninstall the target helm chart'
description: 'Specify whether you want to list, install or uninstall the target helm chart'
required: false
default: 'install'
dry-run:
Expand Down
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ if [ -n "$DEPLOY_NAMESPACE" ]; then
fi

# Create namespace if it doesn't exist. Requires cluster API permissions.
# Will conflict with `list`, so don't set if in list mode
if [ "${CREATE_NAMESPACE}" == "true" ] && [ "${HELM_ACTION}" != "list" ]; then
# Only applies to `install` option. `helm upgrade` is not used.
if [ "${CREATE_NAMESPACE}" == "true" ] && [ "${HELM_ACTION}" == "install" ]; then
HELM_COMMAND="${HELM_COMMAND} --create-namespace"
fi

Expand Down

0 comments on commit f27e251

Please sign in to comment.