1
0
Fork 0
mirror of https://github.com/arangodb/kube-arangodb.git synced 2024-12-14 11:57:37 +00:00

[Improvement] Generate manifests with helm v3 (#1154)

This commit is contained in:
Tomasz Mielech 2022-10-26 23:26:17 +02:00 committed by GitHub
parent 2da7108d33
commit b8e2e9b08c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,17 +56,25 @@ ifeq ($(HELM),)
$(error Before templating you need to install helm in PATH or export helm binary using "export HELM=<path to helm>")
endif
HELM_PACKAGE_CMD = $(HELM) package "$(ROOTDIR)/chart/$(CHART_NAME)" \
-d "$(ROOTDIR)/bin/charts" \
--save=false --version "$(VERSION_MAJOR_MINOR_PATCH)"
HELM_OPTIONS = --set "operator.image=$(OPERATORIMAGE)" \
--set "operator.imagePullPolicy=Always" \
--set "operator.resources=null" \
--set "operator.debug=$(DEBUG)"
HELM_CMD = $(HELM) template "$(ROOTDIR)/chart/$(CHART_NAME)" \
--name "$(NAME)" \
--set "operator.image=$(OPERATORIMAGE)" \
--set "operator.imagePullPolicy=Always" \
--set "operator.resources=null" \
--set "operator.debug=$(DEBUG)" \
--namespace "$(DEPLOYMENTNAMESPACE)"
ifeq ($(shell $(HELM) version --client --template '{{.Version}}' | cut -f 1 -d '.'),v3)
# Using helm v3
HELM_PACKAGE_CMD = $(HELM) package "$(ROOTDIR)/chart/$(CHART_NAME)" -d "$(ROOTDIR)/bin/charts" \
--version "$(VERSION_MAJOR_MINOR_PATCH)"
HELM_CMD = $(HELM) template $(NAME) "$(ROOTDIR)/chart/$(CHART_NAME)" $(HELM_OPTIONS) --namespace "$(DEPLOYMENTNAMESPACE)"
else
# Using helm v2
HELM_PACKAGE_CMD = $(HELM) package "$(ROOTDIR)/chart/$(CHART_NAME)" -d "$(ROOTDIR)/bin/charts" \
--save=false --version "$(VERSION_MAJOR_MINOR_PATCH)"
HELM_CMD = $(HELM) template "$(ROOTDIR)/chart/$(CHART_NAME)" --name "$(NAME)" $(HELM_OPTIONS) \
--namespace "$(DEPLOYMENTNAMESPACE)"
endif
ifndef LOCALONLY
PUSHIMAGES := 1
@ -558,4 +566,4 @@ generate-proto:
PATH=$(PATH):$(GOBUILDDIR)/bin $(GOBUILDDIR)/bin/protoc -I.:$(GOBUILDDIR)/include/ \
--go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
$(PROTOSOURCES)
$(PROTOSOURCES)