-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace kubeval with kubeconform (#184)
- Loading branch information
Showing
3 changed files
with
27 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
set -uxo pipefail | ||
|
||
# forked | ||
git remote add mongo https://github.com/mongodb/helm-charts.git | ||
git fetch mongo | ||
|
||
CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" mongo/add-role -- charts | grep -i chart.yaml | xargs -r dirname)" | ||
KUBECONFORM_VERSION="v0.5.0" | ||
SCHEMA_LOCATION="https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/" | ||
|
||
# install kubeconform | ||
curl --silent --show-error --fail --location --output /tmp/kubeconform.tar.gz "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz" | ||
tar -xf /tmp/kubeconform.tar.gz kubeconform | ||
|
||
# validate charts | ||
helm repo add mongodb https://mongodb.github.io/helm-charts | ||
for CHART_DIR in ${CHART_DIRS}; do | ||
if [[ ! -d "$CHART_DIR" ]]; then | ||
continue | ||
fi | ||
helm dependency update "${CHART_DIR}" | ||
helm template "${CHART_DIR}" | ./kubeconform --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}" | ||
done |
This file was deleted.
Oops, something went wrong.
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