-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.sh
executable file
·23 lines (18 loc) · 686 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -e
dep_update="${1?Update dependencies true/false}"
BASEDIR=$(dirname "$0")
KVERSION_LIST=${KVERSION_LIST:-"1.19.16 1.26.14 1.29.2"}
if [[ "$dep_update" == "true" ]]; then
find "$BASEDIR/stable" -type f -name "*.tgz" -print -delete
find "$BASEDIR/stable" -maxdepth 1 -mindepth 1 -type d -print -exec helm dep update {} \;
fi
for f in $BASEDIR/examples/*.yaml
do
for kv in $KVERSION_LIST
do
echo "Validating $f against $kv"
helm template myrelease --kube-version "$kv" "$BASEDIR/stable/vulcan" --namespace ns -f "$f" --debug \
| docker run -i ghcr.io/yannh/kubeconform:master -kubernetes-version "$kv" -strict -summary -output json
done
done