forked from camunda/camunda-platform-helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
78 lines (63 loc) · 2.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# Makefile for managing the helm charts
chartPath=charts/ccsm-helm
releaseName=ccsm-helm-test
# test: runs the tests without updating the golden files (runs checks against golden files)
.PHONY: test
test: deps
go test ./...
# it: runs the integration tests agains the current kube context
.PHONY: it
it: deps
go test -timeout 1h -tags integration ./.../integration
# golden: runs the tests with updating the golden files
.PHONY: golden
golden: deps
go test ./... -args -update-golden
# fmt: runs the gofmt in order to format all go files
.PHONY: fmt
fmt:
go fmt ./...
# addlicense: add license headers to go files
.PHONY: addlicense
addlicense:
addlicense -c 'Camunda Services GmbH' -l apache charts/ccsm-helm/test/**/*.go
# checkLicense: checks that the go files contain license header
.PHONY: checkLicense
checkLicense:
addlicense -check -l apache charts/ccsm-helm/test/**/*.go
# installLicense: installs the addlicense tool
.PHONY: installLicense
installLicense:
go install github.com/google/addlicense@v1.0.0
#########################################################
######### HELM
#########################################################
# deps: updates and downloads the dependencies for the ccsm helm chart
.PHONY: deps
deps:
helm dependency update $(chartPath)
helm dependency update $(chartPath)/charts/identity
# install: install the local ccsm-chart into the current kubernetes cluster/namespace
.PHONY: install
install: deps
helm install $(releaseName) $(chartPath)
# uninstall: uninstalls the ccsm-chart and removes all related pvc's
.PHONY: uninstall
uninstall:
-helm uninstall $(releaseName)
-kubectl delete pvc -l app.kubernetes.io/instance=$(releaseName)
-kubectl delete pvc -l app=elasticsearch-master
# dry-run: runs an install dry-run with the local ccsm-chart
.PHONY: dry-run
dry-run: deps
helm install $(releaseName) $(chartPath) --dry-run
# template: show all rendered templates for the local ccsm-chart
.PHONY: template
template: deps
helm template $(releaseName) $(chartPath)
#########################################################
######### Testing
#########################################################
.PHONY: topology
topology:
kubectl exec svc/$(releaseName)-zeebe-gateway -- zbctl --insecure status