Skip to content

Commit ee5a38e

Browse files
AlanGreenetekton-robot
authored andcommitted
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)
1 parent 354047c commit ee5a38e

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

docs/dev/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ You will also need the following tools in order to build the Dashboard locally a
3131
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_
3232
1. [`ko`](https://github.com/google/ko): For development. `ko` version v0.7.2 or higher is required for `dashboard` to work correctly
3333
1. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/): For interacting with your kube cluster
34-
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
35-
36-
See [here](https://kubectl.docs.kubernetes.io/installation/kustomize/source/) - `GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v3` works correctly
34+
1. [`kustomize`](https://kubectl.docs.kubernetes.io/installation/kustomize/): For building the Dashboard manifests. v4.5.4 is known to work
3735

3836
## Checkout your fork
3937

scripts/installer

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ compile() {
8888
fi
8989

9090
debug "Building overlay $overlay ..."
91-
kustomize build --load_restrictor none "$overlay" | ko resolve $KO_RESOLVE_OPTIONS -f - > "$TMP_FILE"
91+
kustomize build --load-restrictor LoadRestrictionsNone "$overlay" | ko resolve $KO_RESOLVE_OPTIONS -f - > "$TMP_FILE"
9292
}
9393

9494
download() {

tekton/publish.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ spec:
8787
set -ex
8888
8989
go version
90+
ko version
91+
kustomize version
9092
9193
# Setup docker-auth
9294
DOCKER_CONFIG=~/.docker
@@ -106,8 +108,8 @@ spec:
106108
cp ${PROJECT_ROOT}/scripts/installer $OUTPUT_RELEASE_DIR/installer
107109
108110
# build manifests for installer
109-
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
110-
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
111+
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
112+
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
111113
112114
# build pre configured manifests
113115
./scripts/installer release --debug --platform $(params.platforms) --tag $(params.versionTag) --output $OUTPUT_RELEASE_DIR/tekton-dashboard-release.yaml

test/e2e-common.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
# Copyright 2018-2021 The Tekton Authors
3+
# Copyright 2018-2022 The Tekton Authors
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -31,8 +31,8 @@ function print_diagnostic_info() {
3131
function install_kustomize() {
3232
if ! type "kustomize" > /dev/null; then
3333
echo ">> Installing kustomize"
34-
tar=kustomize_v3.6.1_linux_amd64.tar.gz
35-
curl -s -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.6.1/$tar
34+
tar=kustomize_v4.5.4_linux_amd64.tar.gz
35+
curl -s -O -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v4.5.4/$tar
3636
tar xzf ./$tar
3737

3838
cp ./kustomize /usr/local/bin

test/presubmit-tests.sh

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
# Markdown linting failures don't show up properly in Gubernator resulting
2525
# in a net-negative contributor experience.
2626
export DISABLE_MD_LINTING=1
27+
# GitHub is currently rejecting requests from the link checker with 403 due
28+
# to missing header. Disable until the tooling is updated to account for this.
29+
export DISABLE_MD_LINK_CHECK=1
2730

2831
# FIXME(vdemeester) we need to come with something better (like baking common scripts in our image, when we got one)
2932
go mod vendor || exit 1

0 commit comments

Comments
 (0)