Initial commit
This commit is contained in:
commit
7724a7614e
24 changed files with 1653 additions and 0 deletions
49
infra/Makefile
Normal file
49
infra/Makefile
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
LONGHORN_VERSION = v1.1.1
|
||||
|
||||
helm-repos:
|
||||
helm repo add sentry https://sentry-kubernetes.github.io/charts
|
||||
helm repo update
|
||||
|
||||
install-ingress:
|
||||
kubectl apply -f https://raw.githubusercontent.com/sikalabs/sikalabs-kubernetes-toolkit/master/k8s/ingress/ingress-traefik.yml
|
||||
|
||||
uninstall-ingress:
|
||||
kubectl delete -f https://raw.githubusercontent.com/sikalabs/sikalabs-kubernetes-toolkit/master/k8s/ingress/ingress-traefik.yml
|
||||
|
||||
install-sentry:
|
||||
kubectl create namespace sentry || true
|
||||
helm upgrade --install \
|
||||
sentry \
|
||||
sentry/sentry \
|
||||
-n sentry \
|
||||
--set ingress.regexPathStyle=traefik \
|
||||
--set ingress.enabled=true \
|
||||
--set ingress.hostname=sentry.example.com
|
||||
|
||||
uninstall-sentry:
|
||||
helm uninstall sentry
|
||||
kubectl delete namespace sentry
|
||||
|
||||
install-longhorn:
|
||||
kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/$(LONGHORN_VERSION)/deploy/longhorn.yaml
|
||||
|
||||
uninstall-longhorn:
|
||||
kubectl delete -f https://raw.githubusercontent.com/longhorn/longhorn/$(LONGHORN_VERSION)/deploy/longhorn.yaml
|
||||
|
||||
do-make-longhorn-default-storageclass:
|
||||
kubectl patch storageclass do-block-storage -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
|
||||
kubectl patch storageclass longhorn -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
|
||||
|
||||
install-longhorn-ingress:
|
||||
kubectl apply -f k8s/longhorn/ingress.yml
|
||||
|
||||
uninstall-longhorn-ingress:
|
||||
kubectl delete -f k8s/longhorn/ingress.yml
|
||||
|
||||
install:
|
||||
make helm-repos
|
||||
make install-ingress
|
||||
make install-longhorn && make install-longhorn-ingress
|
||||
sleep 30
|
||||
make do-make-longhorn-default-storageclass
|
||||
make install-sentry
|
||||
Reference in a new issue