Skip to content
Snippets Groups Projects
Verified Commit 54afa11c authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

ci(Makefile): Update K8s version and exclude helm charts from validation

parent 989636cc
No related branches found
Tags wordpress-0.2.5
No related merge requests found
......@@ -30,20 +30,20 @@
set -o errexit
KUBERNETES_VERSION=1.21.8
KUBERNETES_VERSION=1.22.12
echo "INFO - Downloading Flux OpenAPI schemas"
mkdir -p /tmp/flux-crd-schemas/master-standalone-strict
curl -sL https://github.com/fluxcd/flux2/releases/latest/download/crd-schemas.tar.gz | tar zxf - -C /tmp/flux-crd-schemas/master-standalone-strict
find . -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file;
find . -type f -name '*.yaml' ! -path "./charts/*" -print0 | while IFS= read -r -d $'\0' file;
do
echo "INFO - Validating $file"
yq e 'true' "$file" > /dev/null
done
echo "INFO - Validating clusters"
find ./clusters -maxdepth 2 -type f -name '*.yaml' -print0 | while IFS= read -r -d $'\0' file;
find ./clusters -maxdepth 2 -type f -name '*.yaml' ! -path "./charts/*" -print0 | while IFS= read -r -d $'\0' file;
do
kubeval ${file} --strict --ignore-missing-schemas --kubernetes-version ${KUBERNETES_VERSION} --additional-schema-locations=file:///tmp/flux-crd-schemas
if [[ ${PIPESTATUS[0]} != 0 ]]; then
......@@ -56,7 +56,7 @@ kustomize_flags="--load-restrictor=LoadRestrictionsNone --reorder=legacy"
kustomize_config="kustomization.yaml"
echo "INFO - Validating kustomize overlays"
find . -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
find . -type f -name $kustomize_config ! -path "./charts/*" -print0 | while IFS= read -r -d $'\0' file;
do
echo "INFO - Validating kustomization ${file/%$kustomize_config}"
kustomize build "${file/%$kustomize_config}" $kustomize_flags | \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment