Skip to content

Commit

Permalink
plugin: scaffolded makefile should use helm-operator binary to run lo…
Browse files Browse the repository at this point in the history
…cally
  • Loading branch information
joelanford committed Jun 26, 2020
1 parent 34c2aa1 commit 5fbdf87
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions pkg/plugin/v1/scaffolds/internal/templates/makefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ endif
all: manager
# TODO(joelanford): make this work for helm-operator
# Run against the configured Kubernetes cluster in ~/.kube/config
run:
go run ./main.go
run: helm-operator
$(HELM_OPERATOR) run
# Install CRDs into a cluster
install: kustomize
Expand Down Expand Up @@ -94,8 +93,10 @@ docker-build:
docker-push:
docker push ${IMG}
# TODO(joelanford): need to download kustomize binary for user
# Can't rely on Go to download and build
kustomize:
ifeq (, $(shell which kustomize))
ifeq (, $(shell which kustomize 2>/dev/null))
@{ \
set -e ;\
KUSTOMIZE_GEN_TMP_DIR=$$(mktemp -d) ;\
Expand All @@ -108,4 +109,16 @@ KUSTOMIZE=$(GOBIN)/kustomize
else
KUSTOMIZE=$(shell which kustomize)
endif
# TODO(joelanford): need to download helm-operator binary for user
# Can't rely on Go to download and build
helm-operator:
ifeq (, $(shell which helm-operator 2>/dev/null))
@{ \
echo "ERROR: You must download helm-operator binary and add it to your path!" ;\
exit 1 ;\
}
else
HELM_OPERATOR=$(shell which helm-operator)
endif
`

0 comments on commit 5fbdf87

Please sign in to comment.