forked from rolanddb/kube-airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
111 lines (82 loc) · 2.44 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
.PHONY: test
MINIKUBE_PROFILE=airflow
NAMESPACE ?= airflow-dev
CHART_LOCATION ?= airflow/
HELM_RELEASE_NAME ?= airflow
HELM_VALUES_FILE ?= ""
## Set HELM_RECREATE_PODS to 'yes' to force pod recreation
HELM_RECREATE_PODS ?= no
ifeq ($(HELM_VALUES_FILE), "")
HELM_VALUES_ARG=
else
HELM_VALUES_ARG=-f $(HELM_VALUES_FILE)
endif
ifeq ($(HELM_RECREATE_PODS), "yes")
HELM_RECREATE_PODS_ARG=
else
HELM_RECREATE_PODS_ARG=--recreate-pods
endif
reset-minikube:
# Force redownload of latest minikube ISO
minikube -p $(MINIKUBE_PROFILE) delete
minikube -p $(MINIKUBE_PROFILE) start
minikube-start:
minikube -p $(MINIKUBE_PROFILE) start \
--memory 8192
minikube-stop:
minikube -p $(MINIKUBE_PROFILE) stop
minikube-restart: minikube-start helm-init
minikube-dashboard:
minikube -p $(MINIKUBE_PROFILE) dashboard
minikube-service-list:
minikube -p $(MINIKUBE_PROFILE) service list
minikube-browse-web:
minikube -p $(MINIKUBE_PROFILE) service $(HELM_RELEASE_NAME)-web -n $(NAMESPACE)
minikube-url-web:
minikube -p $(MINIKUBE_PROFILE) service $(HELM_RELEASE_NAME)-web -n $(NAMESPACE) --url
minikube-browse-flower:
minikube -p $(MINIKUBE_PROFILE) service $(HELM_RELEASE_NAME)-flower -n $(NAMESPACE)
minikube-url-flower:
minikube -p $(MINIKUBE_PROFILE) service $(HELM_RELEASE_NAME)-flower -n $(NAMESPACE) --url
helm-init:
helm init --upgrade --wait --debug
helm-install-traefik:
minikube -p $(MINIKUBE_PROFILE) addons enable ingress
kubectl apply -f https://raw.githubusercontent.com/containous/traefik/master/examples/k8s/traefik-deployment.yaml
helm-status:
helm status $(HELM_RELEASE_NAME)
helm-upgrade: helm-upgrade-dep helm-upgrade-install
helm-upgrade-dep:
helm dep build $(CHART_LOCATION)
helm-upgrade-install:
helm upgrade --install \
--wait\
--debug \
$(HELM_RECREATE_PODS_ARG) \
--namespace=$(NAMESPACE) \
--timeout 300 \
$(HELM_VALUES_ARG) \
$(HELM_RELEASE_NAME) \
$(CHART_LOCATION)
update-etc-host:
./minikube-update-hosts.sh
test:
make helm-upgrade HELM_VALUES_FILE=./test/minikube-values.yaml
test-and-update-etc-host: test update-etc-host
helm-lint:
helm lint \
$(CHART_LOCATION) \
--namespace=$(NAMESPACE) \
--debug \
$(HELM_VALUES_ARG)
lint: helm-lint
helm-delete:
helm delete --purge \
$(HELM_RELEASE_NAME)
wait:
sleep 60
minikube-full-test: minikube-restart wait helm-init helm-delete test
kubectl-get-services:
kubectl get services --namespace $(NAMESPACE)
kubectl-list-pods:
kubectl get po -a --namespace $(NAMESPACE)