Skip to content

Commit

Permalink
fix(kustomize): download kustomize from github releases
Browse files Browse the repository at this point in the history
This is a workaround until the issue will be fixed
kubernetes-sigs/kustomize#4008.
  • Loading branch information
Steve Mattar committed Jul 11, 2021
1 parent b58d13a commit f92b538
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ ifneq (,$(DAPPER_HOST_ARCH))
OPERATOR_SDK_VERSION := 1.0.1
OPERATOR_SDK := $(CURDIR)/bin/operator-sdk

KUSTOMIZE_VERSION := 3.10.0
KUSTOMIZE := $(CURDIR)/bin/kustomize

# Running in Dapper

ifeq (,$(is-semantic-version))
Expand Down Expand Up @@ -189,12 +192,13 @@ is-semantic-version:
[[ $(VERSION) =~ $(PATTERN) ]] || \
(printf '\nerror: VERSION does not match the format required by operator-sdk.\n\n' && exit 1)

# Generate kustomization.yaml for bundle
KUSTOMIZE := $(CURDIR)/bin/kustomize
$(KUSTOMIZE): vendor/modules.txt
# TODO: a workaround until this issue will be fixed https://github.com/kubernetes-sigs/kustomize/issues/4008
$(KUSTOMIZE):
mkdir -p $(@D)
go build -o $@ sigs.k8s.io/kustomize/kustomize/v3
#GOBIN=$(CURDIR)/bin GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s $(KUSTOMIZE_VERSION) $(CURDIR)/bin

# Generate kustomization.yaml for bundle
kustomization: $(OPERATOR_SDK) $(KUSTOMIZE) is-semantic-version manifests
$(OPERATOR_SDK) generate kustomize manifests -q && \
(cd config/manifests && $(KUSTOMIZE) edit set image controller=$(IMG) && \
Expand Down

0 comments on commit f92b538

Please sign in to comment.