Skip to content

Commit 6173e06

Browse files
authored
allow namespace to be specified when upgrading to make sure the chart is installed in the correct namespace (#4)
* allow namespace to be specified when upgrading to make sure the chart is installed in the correct namespace * add missing line continuation character
1 parent 495d191 commit 6173e06

2 files changed

Lines changed: 18 additions & 13 deletions

File tree

helm-deploy/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ inputs:
2323
release-name:
2424
description: "The name of the Helm release"
2525
required: true
26+
namespace:
27+
description: "The namespace in which to deploy the Helm chart and application"
28+
required: true
2629
values-file:
2730
description: "Path to the Helm values file"
2831
required: true
@@ -71,6 +74,7 @@ runs:
7174
working-directory: ${{ inputs.working-directory }}
7275
run: |
7376
helm upgrade --wait --install ${{ inputs.release-name }} ./${{ inputs.helm-package }} \
77+
--namespace ${{ inputs.namespace }} \
7478
--values ${{ inputs.values-file }} \
7579
--atomic --timeout ${{ inputs.timeout }} \
7680
--set image.tag=${{ inputs.image-tag }}

readme.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,20 @@ Deploy an application to a Kubernetes cluster using its Helm chart. Requires Kub
7777

7878
The following inputs can be used as `step.with` keys:
7979

80-
| Name | Required/Default | Description |
81-
|----------------------|------------------|--------------------------------------------------------------|
82-
| `helm-chart-version` | required | The version of the Helm chart to pull |
83-
| `helm-registry-url` | required | The URL of the Helm OCI registry |
84-
| `helm-package` | required | The name of the Helm package to pull |
85-
| `helm-username` | required | The username for authenticating with the Helm registry |
86-
| `helm-password` | required | The password for authenticating with the Helm registry |
87-
| `helm-protocol` | `oci://` | The protocol for pulling Helm charts (e.g., `oci://`) |
88-
| `release-name` | required | The name of the Helm release |
89-
| `values-file` | required | Path to the Helm values file for customization |
90-
| `image-tag` | `latest` | The tag of the container image to set |
91-
| `timeout` | `5m` | The timeout for the Helm command |
92-
| `working-directory` | `.` | The working directory where the action commands will operate |
80+
| Name | Required/Default | Description |
81+
|----------------------|------------------|------------------------------------------------------------------|
82+
| `helm-chart-version` | required | The version of the Helm chart to pull |
83+
| `helm-registry-url` | required | The URL of the Helm OCI registry |
84+
| `helm-package` | required | The name of the Helm package to pull |
85+
| `helm-username` | required | The username for authenticating with the Helm registry |
86+
| `helm-password` | required | The password for authenticating with the Helm registry |
87+
| `helm-protocol` | `oci://` | The protocol for pulling Helm charts (e.g., `oci://`) |
88+
| `release-name` | required | The name of the Helm release |
89+
| `namespace` | required | The namespace in which to deploy the Helm chart and application. |
90+
| `values-file` | required | Path to the Helm values file for customization |
91+
| `image-tag` | `latest` | The tag of the container image to set |
92+
| `timeout` | `5m` | The timeout for the Helm command |
93+
| `working-directory` | `.` | The working directory where the action commands will operate |
9394

9495
## Versioning
9596

0 commit comments

Comments
 (0)