Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandowner committed Nov 18, 2023
1 parent 79eb3ad commit 02e9900
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# helm-chartsnap 📸 
[![Go Reference](https://pkg.go.dev/badge/github.com/jlandowner/helm-chartsnap.svg)](https://pkg.go.dev/github.com/jlandowner/helm-chartsnap)
[![Go Report Card](https://goreportcard.com/badge/github.com/jlandowner/helm-chartsnap)](https://goreportcard.com/report/github.com/jlandowner/helm-chartsnap)
![Workflow Status](https://github.com/jlandowner/helm-chartsnap/actions/workflows/release.yaml/badge.svg)
[![Workflow Status](https://github.com/jlandowner/helm-chartsnap/actions/workflows/release.yaml/badge.svg)](https://github.com/jlandowner/helm-chartsnap/actions/workflows/release.yaml)
[![CI](https://github.com/jlandowner/helm-chartsnap-action/actions/workflows/test.yaml/badge.svg)](https://github.com/jlandowner/helm-chartsnap-action/actions/workflows/test.yaml)

Snapshot testing tool for Helm charts.

Expand Down Expand Up @@ -194,4 +195,4 @@ testSpec:

## LISENCE

MIT
[MIT](LICENSE)
30 changes: 30 additions & 0 deletions example/app1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Example of snapshot testing for local Helm chart

This chart repository is default helm repository created by `helm create app1` command.

And add [`test`](test) directory to place test patterns of the chart.

There is the example test values:

- [`test_hpa_enabled.yaml`](test/test_hpa_enabled.yaml)
- [`test_ingress_enabled.yaml`](test/test_ingress_enabled.yaml)

Do snapshot with the specific test values 📸

```sh
helm chartsnap -c . -f test/test_ingress_enabled.yaml
```

Or do snapshot for all test values 📸

```sh
helm chartsnap -c . -f test/ # specify directory for -f
```

Probably you will see the failure that does not match the snapshot with the above commands.

Then, update the snapshot with `-u` options.

```sh
helm chartsnap -c . -f test/ -u
```
57 changes: 54 additions & 3 deletions example/remote/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,60 @@
# Example of snapshotting remote Helm repositories
# Example of snapshot testing for remote Helm repositories

## ingress-nginx

Docs: https://artifacthub.io/packages/helm/ingress-nginx/ingress-nginx

For example, install ingress-nginx which Service is bound to Network Load Balancer in Amazon EKS.

```yaml
# https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L518
controller:
service:
internal:
enabled: true
annotations:
# Create internal NLB
service.beta.kubernetes.io/aws-load-balancer-scheme: "internal"

```

Do snapshot 📸

```sh
make ingress-nginx
helm chartsnap -c ingress-nginx -f ingress-nginx.values.yaml -- --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx
```

## cilium

Docs: https://docs.cilium.io/en/stable/installation/k8s-install-helm/

For example, install cilium as AWS ENI mode and enable Hubble UI.

```yaml
# https://docs.cilium.io/en/stable/installation/k8s-install-helm/
# EKS

eni:
enabled: true

ipam:
mode: eni

egressMasqueradeInterfaces: eth0

routingMode: native

# https://docs.cilium.io/en/stable/gettingstarted/hubble/#hubble-ui
# Enable Hubble UI
hubble:
relay:
enabled: true
ui:
enabled: true
```
Do snapshot 📸
```sh
make cilium
helm chartsnap -c cilium -f cilium.values.yaml -- --repo https://helm.cilium.io --namespace kube-system
```
1 change: 1 addition & 0 deletions example/remote/ingress-nginx.values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L518
controller:
service:
internal:
Expand Down

0 comments on commit 02e9900

Please sign in to comment.