blob: 7ae8875422f69f27e85980f67da8cbe1bb58bd3e (
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 := "opodsync"
status:
@echo "=== Pods ==="
@kubectl get pods -n {{NAMESPACE}} | grep opodsync
@echo ""
@echo "=== Service ==="
@kubectl get svc -n {{NAMESPACE}} opodsync-service
@echo ""
@echo "=== Ingress ==="
@kubectl get ingress -n {{NAMESPACE}} opodsync-ingress
@echo ""
@echo "=== PVCs ==="
@kubectl get pvc -n {{NAMESPACE}} | grep opodsync
@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=opodsync -c opodsync --tail={{lines}} -f
port-forward port="8080":
@echo "Forwarding opodsync to localhost:{{port}}"
kubectl port-forward -n {{NAMESPACE}} svc/opodsync-service {{port}}:8080
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 opodsync..."
kubectl rollout restart -n {{NAMESPACE}} deployment/opodsync
|