-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (59 loc) · 2.21 KB
/
Makefile
File metadata and controls
73 lines (59 loc) · 2.21 KB
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
TRICKSTER_ORG ?= trickstercache
IMAGE_REPO ?= ghcr.io/$(TRICKSTER_ORG)/trickster
IMAGE_TAG ?= main
SHELL := /bin/bash
.PHONY: lint
lint:
helm lint charts/*
ct lint
.PHONY: uninstall
uninstall:
helm uninstall trickster || true
.PHONY: install
install: uninstall
helm upgrade trickster charts/trickster --install --set image.repository=$(IMAGE_REPO) --set image.tag=$(IMAGE_TAG) --set service.serviceNodePort=31209 --set service.type=NodePort
.PHONY: install-with-pvc
install-with-pvc: uninstall
helm upgrade trickster charts/trickster --install --set image.repository=$(IMAGE_REPO) --set image.tag=$(IMAGE_TAG) --set service.serviceNodePort=31209 --set service.type=NodePort --set persistentVolume.enabled=true --set persistentVolume.storageClass=openebs-hostpath
.PHONY: install-with-ingress
install-with-ingress: uninstall
helm upgrade trickster charts/trickster --install --set image.repository=$(IMAGE_REPO) --set image.tag=$(IMAGE_TAG) --set ingress.enabled=true
.PHONY: query
query:
open http://localhost:31209/query
# NOTE: must set trickster.local in /etc/host to 127.0.0.1
.PHONY: query-ingress
query-ingress:
open http://trickster.local/query
.PHONY: logs
logs:
kubectl logs -f deploy/trickster-trickster
.PHONY: install-prom
install-prom:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
helm install prometheus prometheus-community/prometheus
.PHONY: install-nginx
install-nginx:
kubectl apply -f https://kind.sigs.k8s.io/examples/ingress/deploy-ingress-nginx.yaml
.PHONY: install-openebs
install-openebs:
helm repo add openebs https://openebs.github.io/charts
helm repo update
helm install openebs --namespace openebs openebs/openebs --create-namespace
.PHONY: setup-kind
setup-kind:
kind delete cluster --name trickster || true
kind create cluster --config kind-config.yaml
$(MAKE) install-nginx install-prom install-openebs
.PHONY: package
package:
helm package charts/trickster --destination charts
GITHUB_REPOSITORY_OWNER ?= $(TRICKSTER_ORG)
GHCR_REPO ?= ghcr.io/$(GITHUB_REPOSITORY_OWNER)/charts
.PHONY: publish
publish: package
@for pkg in charts/*.tgz; do \
echo "Publishing $${pkg} to $(GHCR_REPO)"; \
helm push "$${pkg}" "oci://$(GHCR_REPO)"; \
done