-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79eb3ad
commit 02e9900
Showing
4 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters