-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
69 lines (53 loc) · 1.13 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
HELM_FLAGS ?=
KAPP_FLAGS ?=
%-jaeger:
cd jaeger && make $*-jaeger
%-vault:
cd vault && make $*-vault
creds-%:
cd ./$* && \
lpass show --notes hush-house-values-$* > ./.values.yaml
save-creds-%:
cd ./$* && \
cat ./.values.yaml | \
lpass edit \
--sync=now \
--non-interactive \
hush-house-values-$*
diff-%: | ensure-creds-file-exists-% deps-%
cd ./$* && \
helm diff upgrade \
--namespace=$* \
--detailed-exitcode \
--values=./.values.yaml \
$(HELM_FLAGS) \
$* \
.
template-%: | ensure-creds-file-exists-% deps-%
cd ./$* && \
helm template \
$* \
--values=./.values.yaml \
$(HELM_FLAGS) \
. > .template.yaml
deploy-%: | template-%
cd ./$* && \
kapp deploy \
--namespace $* \
--app $* \
--file .template.yaml \
--file ../kapp-config.yaml \
--diff-changes \
--wait-timeout 2h \
$(KAPP_FLAGS)
deps-%:
cd ./$* && \
grep 'file://' Chart.yaml || \
helm dependency update .
ensure-creds-file-exists-%:
@test -f ./$*/.values.yaml || \
{ \
echo "ERROR: $* misses credentials"; \
echo "Make sure 'deployments/$*/.values.yaml' exists"; \
exit 1; \
}