Skip to content

Commit

Permalink
Update kustomize to v4
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
AlanGreene authored and tekton-robot committed May 9, 2022
1 parent 354047c commit ee5a38e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 1 addition & 3 deletions docs/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion scripts/installer
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 4 additions & 2 deletions tekton/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ spec:
set -ex
go version
ko version
kustomize version
# Setup docker-auth
DOCKER_CONFIG=~/.docker
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/e2e-common.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee5a38e

Please sign in to comment.