From ee5a38e823ab3b71c151c83bcbbfc1df1d20cea2 Mon Sep 17 00:00:00 2001 From: Alan Greene Date: Mon, 9 May 2022 15:41:40 +0100 Subject: [PATCH] Update kustomize to v4 Images in the plumbing repo have been updated to use kustomize v4. Update the installer script and release pipeline for compatibility with this version, specifically: `--load_restrictor none` is replaced by `--load-restrictor LoadRestrictionsNone` (note the underscore changes to a hyphen too) --- docs/dev/README.md | 4 +--- scripts/installer | 2 +- tekton/publish.yaml | 6 ++++-- test/e2e-common.sh | 6 +++--- test/presubmit-tests.sh | 3 +++ 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/dev/README.md b/docs/dev/README.md index 166f0f575..ba4a37167 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md @@ -31,9 +31,7 @@ You will also need the following tools in order to build the Dashboard locally a 1. [Node.js & npm](https://nodejs.org/): For building and running the frontend locally. See `engines` in [package.json](../../package.json) for versions used. _Node.js 16.x is recommended_ 1. [`ko`](https://github.com/google/ko): For development. `ko` version v0.7.2 or higher is required for `dashboard` to work correctly 1. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/): For interacting with your kube cluster -1. [`kustomize`](https://kubernetes-sigs.github.io/kustomize/installation/): For building the Dashboard manifests. v3.5.4 is recommended, the installer script is not currently compatible with v4 - - See [here](https://kubectl.docs.kubernetes.io/installation/kustomize/source/) - `GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v3` works correctly +1. [`kustomize`](https://kubectl.docs.kubernetes.io/installation/kustomize/): For building the Dashboard manifests. v4.5.4 is known to work ## Checkout your fork diff --git a/scripts/installer b/scripts/installer index d7613bb32..d0f1caac8 100755 --- a/scripts/installer +++ b/scripts/installer @@ -88,7 +88,7 @@ compile() { fi debug "Building overlay $overlay ..." - kustomize build --load_restrictor none "$overlay" | ko resolve $KO_RESOLVE_OPTIONS -f - > "$TMP_FILE" + kustomize build --load-restrictor LoadRestrictionsNone "$overlay" | ko resolve $KO_RESOLVE_OPTIONS -f - > "$TMP_FILE" } download() { diff --git a/tekton/publish.yaml b/tekton/publish.yaml index 8d3156931..e42609415 100644 --- a/tekton/publish.yaml +++ b/tekton/publish.yaml @@ -87,6 +87,8 @@ spec: set -ex go version + ko version + kustomize version # Setup docker-auth DOCKER_CONFIG=~/.docker @@ -106,8 +108,8 @@ spec: cp ${PROJECT_ROOT}/scripts/installer $OUTPUT_RELEASE_DIR/installer # build manifests for installer - kustomize build overlays/installer/read-write --load_restrictor none | ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -f - > $OUTPUT_RELEASE_DIR/installer-tekton-dashboard-release.yaml - kustomize build overlays/installer/read-only --load_restrictor none | ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -f - > $OUTPUT_RELEASE_DIR/installer-tekton-dashboard-release-readonly.yaml + kustomize build overlays/installer/read-write --load-restrictor LoadRestrictionsNone | ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -f - > $OUTPUT_RELEASE_DIR/installer-tekton-dashboard-release.yaml + kustomize build overlays/installer/read-only --load-restrictor LoadRestrictionsNone | ko resolve --platform=$(params.platforms) --preserve-import-paths -t $(params.versionTag) -f - > $OUTPUT_RELEASE_DIR/installer-tekton-dashboard-release-readonly.yaml # build pre configured manifests ./scripts/installer release --debug --platform $(params.platforms) --tag $(params.versionTag) --output $OUTPUT_RELEASE_DIR/tekton-dashboard-release.yaml diff --git a/test/e2e-common.sh b/test/e2e-common.sh index 02a4569be..f6179bc4f 100644 --- a/test/e2e-common.sh +++ b/test/e2e-common.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright 2018-2021 The Tekton Authors +# Copyright 2018-2022 The Tekton Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,8 +31,8 @@ function print_diagnostic_info() { function install_kustomize() { if ! type "kustomize" > /dev/null; then echo ">> Installing kustomize" - tar=kustomize_v3.6.1_linux_amd64.tar.gz - curl -s -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.6.1/$tar + tar=kustomize_v4.5.4_linux_amd64.tar.gz + curl -s -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.4/$tar tar xzf ./$tar cp ./kustomize /usr/local/bin diff --git a/test/presubmit-tests.sh b/test/presubmit-tests.sh index 666428ca5..d6af81159 100755 --- a/test/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -24,6 +24,9 @@ # Markdown linting failures don't show up properly in Gubernator resulting # in a net-negative contributor experience. export DISABLE_MD_LINTING=1 +# GitHub is currently rejecting requests from the link checker with 403 due +# to missing header. Disable until the tooling is updated to account for this. +export DISABLE_MD_LINK_CHECK=1 # FIXME(vdemeester) we need to come with something better (like baking common scripts in our image, when we got one) go mod vendor || exit 1