summaryrefslogtreecommitdiffstats
path: root/kubernetes/clamp/Makefile
diff options
context:
space:
mode:
authorJakub Latusek <j.latusek@samsung.com>2020-09-21 23:41:02 +0200
committerJakub Latusek <j.latusek@samsung.com>2020-09-24 15:21:50 +0000
commit75b38e2fc9243e0291b32034ce84588d258726ae (patch)
tree16b939c001c2b738ebc3111f460feac55984a36a /kubernetes/clamp/Makefile
parent6220a464935468a8a5c87bcc714f4543bcefcac1 (diff)
[CLAMP] Use helm-push plugin in clamp
this is done in order to make OOM compatible with helm3 Signed-off-by: Jakub Latusek <j.latusek@samsung.com> Issue-ID: OOM-2562 Change-Id: Ideb4e113bd9fb977e2d64621a68ea0ac8e656d76
Diffstat (limited to 'kubernetes/clamp/Makefile')
-rw-r--r--kubernetes/clamp/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/kubernetes/clamp/Makefile b/kubernetes/clamp/Makefile
index 8af301d7ae..248fb056ab 100644
--- a/kubernetes/clamp/Makefile
+++ b/kubernetes/clamp/Makefile
@@ -19,6 +19,7 @@ SECRET_DIR := $(OUTPUT_DIR)/secrets
EXCLUDES := dist resources templates charts docker
HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.))))
+HELM_VER := $(shell helm version --template "{{.Version}}")
.PHONY: $(EXCLUDES) $(HELM_CHARTS)
@@ -39,7 +40,11 @@ lint-%: dep-%
package-%: lint-%
@mkdir -p $(PACKAGE_DIR)
+ifeq "$(findstring v3,$(HELM_VER))" "v3"
+ @if [ -f $*/Chart.yaml ]; then PACKAGE_NAME=$$(helm package -d $(PACKAGE_DIR) $* | cut -d":" -f2) && helm push -f $$PACKAGE_NAME local; fi
+else
@if [ -f $*/Chart.yaml ]; then helm package -d $(PACKAGE_DIR) $*; fi
+endif
@helm repo index $(PACKAGE_DIR)
clean: