-
Notifications
You must be signed in to change notification settings - Fork 0
/
entrypoint.sh
executable file
·27 lines (24 loc) · 971 Bytes
/
entrypoint.sh
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
#!/bin/bash
function main {
# Pull image from docker
docker pull $DOCKER_USERNAME/$DOCKER_REPONAME
# delete running kubernetes clusters
kubectl delete deployments --all
kubectl delete services --all
kubectl delete secrets --all
kubectl delete ingress --all
kubectl delete statefulset --all
kubectl delete daemonset --all
# Apply configurations to k8s
kubectl apply -f kubernetes/secrets/docker.yml
kubectl apply -f kubernetes/deployments/celery.yml
kubectl apply -f kubernetes/deployments/channels.yml
kubectl apply -f kubernetes/deployments/django.yml
kubectl apply -f kubernetes/statefulsets/postgres.yml
kubectl apply -f kubernetes/statefulsets/redis.yml
kubectl apply -f kubernetes/statefulsets/prometheus.yml
kubectl apply -f kubernetes/statefulsets/exporters/node-exporter.yml
kubectl apply -f kubernetes/statefulsets/grafana.yml
kubectl apply -f kubernetes/ingress/nginx.yml
}
main