blob: a2ebcf477d1ca6cf7b96845309148fce2be7874e (
plain)
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
|
NAMESPACE := "services"
APP_NAME := "syncthing"
status:
@echo "=== Pods ==="
@kubectl get pods -n {{NAMESPACE}} | grep syncthing
@echo ""
@echo "=== Service ==="
@kubectl get svc -n {{NAMESPACE}} syncthing-service
@echo ""
@echo "=== Ingress ==="
@kubectl get ingress -n {{NAMESPACE}} syncthing-ingress
@echo ""
@echo "=== PVCs ==="
@kubectl get pvc -n {{NAMESPACE}} | grep syncthing
@echo ""
@echo "=== ArgoCD Status ==="
@kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' 2>/dev/null && echo ""
logs lines="100":
kubectl logs -n {{NAMESPACE}} -l app=syncthing --tail={{lines}} -f
port-forward port="8384":
@echo "Forwarding syncthing to localhost:{{port}}"
kubectl port-forward -n {{NAMESPACE}} svc/syncthing-service {{port}}:8384
sync:
@echo "Triggering ArgoCD sync..."
@kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite
@sleep 2
@kubectl get application {{APP_NAME}} -n cicd -o jsonpath='Sync: {.status.sync.status}, Health: {.status.health.status}' && echo ""
argocd-status:
argocd app get {{APP_NAME}} --core
restart:
@echo "Restarting syncthing..."
kubectl rollout restart -n {{NAMESPACE}} deployment/syncthing
|