Skip to content

Commit

Permalink
Refactor to use ensure-kustomize in openshift as ocm does. (#789)
Browse files Browse the repository at this point in the history
Signed-off-by: xuezhaojun <[email protected]>
  • Loading branch information
xuezhaojun authored Nov 14, 2024
1 parent 9a2cea5 commit 2035d57
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \
targets/openshift/imagebuilder.mk \
targets/openshift/images.mk \
targets/openshift/bindata.mk \
targets/openshift/kustomize.mk \
lib/tmp.mk \
)

# Tools for deploy
KUBECONFIG ?= ./.kubeconfig
KUBECTL?=kubectl
KUSTOMIZE?=$(PERMANENT_TMP_GOPATH)/bin/kustomize
KUSTOMIZE_VERSION?=v3.5.4
KUSTOMIZE_ARCHIVE_NAME?=kustomize_$(KUSTOMIZE_VERSION)_$(GOHOSTOS)_$(GOHOSTARCH).tar.gz
kustomize_dir:=$(dir $(KUSTOMIZE))

HELM?=$(PERMANENT_TMP_GOPATH)/bin/helm
HELM_VERSION?=v3.14.0
Expand Down Expand Up @@ -149,18 +146,6 @@ else
$(info Using existing kube-apiserver from "$(KUBEBUILDER_ASSETS)")
endif

# Ensure kustomize
ensure-kustomize:
ifeq "" "$(wildcard $(KUSTOMIZE))"
$(info Installing kustomize into '$(KUSTOMIZE)')
mkdir -p '$(kustomize_dir)'
curl -s -f -L https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F$(KUSTOMIZE_VERSION)/$(KUSTOMIZE_ARCHIVE_NAME) -o '$(kustomize_dir)$(KUSTOMIZE_ARCHIVE_NAME)'
tar -C '$(kustomize_dir)' -zvxf '$(kustomize_dir)$(KUSTOMIZE_ARCHIVE_NAME)'
chmod +x '$(KUSTOMIZE)';
else
$(info Using existing kustomize from "$(KUSTOMIZE)")
endif

ensure-helm:
ifeq "" "$(wildcard $(HELM))"
$(info Installing helm into '$(HELM)')
Expand Down

0 comments on commit 2035d57

Please sign in to comment.