-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
50 lines (49 loc) · 1.85 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
SYSTEM_NAMESPACE = kube-system
TILLER_DEPLOYMENT_YAML = ./dist/tiller-deploy.yaml
MANIFEST_OUTPUT_YAML = ./dist/cluster.yaml
DEFAULT_CERT_ISSUER = letsencrypt-prod
HELM_RELEASES = cert-manager nginx-ingress
cluster : $(HELM_RELEASES) nginx-ingress-ip
@echo "Cluster is ready!"
tiller-deploy.yaml :
@hack/generate-tiller-deployment.sh $(TILLER_DEPLOYMENT_YAML)
tiller : tiller-deploy.yaml
kubectl apply -f $(TILLER_DEPLOYMENT_YAML)
for i in {1..60}; do helm version --tiller-connection-timeout 2 && break; done
cert-manager : tiller
helm upgrade --install cert-manager \
stable/cert-manager \
--namespace $(SYSTEM_NAMESPACE) \
--version 0.3.4 \
--set ingressShim.defaultIssuerName=$(DEFAULT_CERT_ISSUER) \
--set ingressShim.defaultIssuerKind=ClusterIssuer
kustomize build ./deploy/cert-manager | kubectl apply -f -
nginx-ingress : tiller
helm upgrade --install nginx-ingress \
stable/nginx-ingress \
--namespace $(SYSTEM_NAMESPACE) \
--version 0.22.1 \
--set rbac.create=true
nginx-ingress-ip :
@hack/print-nginx-ingress-ip.sh $(SYSTEM_NAMESPACE)
ingress-example : nginx-ingress-ip
kubectl apply -f ./examples/nginx-ingress
istio : tiller
helm upgrade --install istio \
./deploy/istio/install/kubernetes/helm/istio \
--namespace istio-system
jenkins : tiller nginx-ingress-ip
helm dependency build ./deploy/jenkins/skookum-jenkins
helm upgrade --install jenkins \
./deploy/jenkins/skookum-jenkins \
--namespace jenkins \
--values ./deploy/jenkins/overrides-github-auth.yaml \
--set jenkins.Master.GithubAuth.ClientID=$$GITHUB_AUTH_CLIENT_ID \
--set jenkins.Master.GithubAuth.ClientSecret=$$GITHUB_AUTH_CLIENT_SECRET
manifests :
kustomize build ./deploy > $(MANIFEST_OUTPUT_YAML)
kubectl apply -f $(MANIFEST_OUTPUT_YAML)
clean :
helm del --purge $(HELM_RELEASES)
kubectl delete -f $(TILLER_DEPLOYMENT_YAML)
kubectl delete -f ./examples --recursive