Skip to content

Commit

Permalink
Clear the GH token when downloading kustomize
Browse files Browse the repository at this point in the history
The kustomize installation script passes the value of ${GITHUB_TOKEN}
to the API, which results in failures if the token isn't valid for
Kustomize itself. Since updating the Submariner bundle shouldn't ever
involve a token valid for Kustomize, clear the token when invoking the
installation script.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt authored and tpantelis committed Feb 21, 2023
1 parent 8a10b49 commit 62b81e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,13 @@ is-semantic-version:
$(error 'ERROR: VERSION "$(BUNDLE_VERSION)" does not match the format required by operator-sdk.')
endif

## Download kustomize locally if not already downloaded.
# Download kustomize locally if not already downloaded.
# We clear GITHUB_TOKEN to ensure that the installation script won't try to use it (and fail)
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
KUSTOMIZE_VERSION := $(shell $(GO) list -m -f {{.Version}} sigs.k8s.io/kustomize/kustomize/v3)
$(KUSTOMIZE):
mkdir -p $(@D)
{ curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(@D); }
{ curl -s $(KUSTOMIZE_INSTALL_SCRIPT) | GITHUB_TOKEN= bash -s -- $(subst v,,$(KUSTOMIZE_VERSION)) $(@D); }

kustomize: $(KUSTOMIZE)

Expand Down

0 comments on commit 62b81e7

Please sign in to comment.