Skip to content

Commit 1127005

Browse files
authored
Add support for S3 repo (#43)
* Add support for S3 in script * Adding S3 example to README * Bumping README versions example and alpine/k8s version
1 parent 690916f commit 1127005

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine/k8s:1.26.1
1+
FROM alpine/k8s:1.26.9
22

33
COPY deploy.sh /usr/local/bin/deploy
44

README.md

+25-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Following inputs can be used as `step.with` keys
5555

5656
```yaml
5757
- name: Deploy Helm
58-
uses: bitovi/[email protected].5
58+
uses: bitovi/[email protected].7
5959
with:
6060
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
6161
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -71,7 +71,7 @@ Following inputs can be used as `step.with` keys
7171
## Example 2 - Custom Chart Repo
7272
```yaml
7373
- name: Deploy Helm
74-
uses: bitovi/[email protected].5
74+
uses: bitovi/[email protected].7
7575
with:
7676
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
7777
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -90,7 +90,7 @@ Following inputs can be used as `step.with` keys
9090
## Example 3 - OCI Chart Repo
9191
```yaml
9292
- name: Deploy Helm
93-
uses: bitovi/[email protected].5
93+
uses: bitovi/[email protected].7
9494
with:
9595
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
9696
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -113,7 +113,7 @@ Following inputs can be used as `step.with` keys
113113
aws-region: ${{ env.aws-region }}
114114

115115
- name: Install Helm Chart
116-
uses: bitovi/[email protected].5
116+
uses: bitovi/[email protected].7
117117
with:
118118
aws-region: ${{ env.aws-region }}
119119
cluster-name: eks-cluster-${{ env.environment }}
@@ -123,7 +123,7 @@ Following inputs can be used as `step.with` keys
123123
## Example 5 - Use secrets with vals backend
124124
```yaml
125125
- name: Deploy Helm
126-
uses: bitovi/[email protected].5
126+
uses: bitovi/[email protected].7
127127
with:
128128
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
129129
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -138,11 +138,29 @@ Following inputs can be used as `step.with` keys
138138
plugins: https://github.com/jkroepke/helm-secrets
139139
```
140140
141+
## Example 6 - Use with S3 as repo
142+
```yaml
143+
- name: Deploy S3 Helm chart
144+
uses: bitovi/[email protected]
145+
with:
146+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
147+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
148+
aws-region: us-west-2
149+
chart-repository: s3://my-s3-bucket/
150+
chart-path: my-service/my-service
151+
version: 0.1.0
152+
cluster-name: mycluster
153+
namespace: dev
154+
name: my_service_name
155+
plugins: https://github.com/hypnoglow/helm-s3.git
156+
```
157+
* See the [official AWS Guide](https://docs.aws.amazon.com/prescriptive-guidance/latest/patterns/set-up-a-helm-v3-chart-repository-in-amazon-s3.html) on how to set this up.
158+
141159
## Example Uninstall
142160
143161
```yaml
144162
- name: Deploy Helm
145-
uses: bitovi/[email protected].5
163+
uses: bitovi/[email protected].7
146164
with:
147165
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
148166
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -157,7 +175,7 @@ Following inputs can be used as `step.with` keys
157175
158176
```yaml
159177
- name: Deploy Helm
160-
uses: bitovi/[email protected].5
178+
uses: bitovi/[email protected].7
161179
with:
162180
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
163181
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

deploy.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ OCI_REGISTRY=false
1010
# Check repository type
1111

1212
if [ -n "${HELM_REPOSITORY}" ]; then
13-
if [[ ${HELM_REPOSITORY} =~ ^http.* ]]; then
13+
if [[ ${HELM_REPOSITORY} =~ ^http.* ]] || [[ ${HELM_REPOSITORY} =~ ^s3.* ]]; then
1414
OCI_REGISTRY=false
1515
else
1616
if [[ ${HELM_REPOSITORY} =~ ^oci.* ]]; then
1717
OCI_REGISTRY=true
1818
else
19-
echo "::error::Protocol handler expected here. Need http or oci."
19+
echo "::error::Protocol handler expected here. Need http, s3 or oci."
2020
exit 1
2121
fi
2222
fi

0 commit comments

Comments
 (0)