Skip to content

Commit 045de6c

Browse files
committed
Update CI configuration for Python versions, enhance Docker workflow for Helm chart updates, and implement Horizontal Pod Autoscaler in Helm templates
1 parent b40ee27 commit 045de6c

File tree

2 files changed

+93
-10
lines changed

2 files changed

+93
-10
lines changed

.github/workflows/endpoints.yml

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ on:
2828
required: false
2929
default: ''
3030
type: string
31+
3132
jobs:
3233
print-endpoints:
3334
name: Print Service Endpoints
@@ -39,26 +40,65 @@ jobs:
3940
with:
4041
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/GitHubActionsInfraRole
4142
aws-region: us-east-1
42-
43+
4344
- name: Update kubeconfig
4445
run: |
4546
aws eks update-kubeconfig --name ${{ inputs.cluster_name }} --region us-east-1
47+
4648
- name: Print Service Endpoints
4749
run: |
4850
echo "================= SERVICE ENDPOINTS ================="
51+
52+
# Get ArgoCD endpoint (still using LoadBalancer)
4953
ARGOCD_HOST=$(kubectl get svc argocd-server -n ${{ inputs.argocd_namespace }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
50-
MONITORING_HOST=$(kubectl get ingress monitoring-ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
54+
55+
# Get monitoring ingress endpoint (single endpoint for all monitoring services)
56+
MONITORING_HOST=$(kubectl get ingress monitoring-ingress -n ${{ inputs.monitoring_namespace }} -o jsonpath='{.spec.rules[0].host}' 2>/dev/null || echo 'Not found')
57+
58+
# Alternative: get ingress from kube-prometheus-stack if using helm ingress
59+
if [ "$MONITORING_HOST" = "Not found" ]; then
60+
MONITORING_HOST=$(kubectl get ingress -n ${{ inputs.monitoring_namespace }} -l app.kubernetes.io/name=kube-prometheus-stack -o jsonpath='{.items[0].spec.rules[0].host}' 2>/dev/null || echo 'Not found')
61+
fi
62+
63+
# Get app endpoint
5164
APP_HOST=$(kubectl get svc ${{ inputs.app_name }}-svc -n ${{ inputs.app_namespace }} -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' 2>/dev/null || echo 'Not found')
65+
66+
# Print endpoints
5267
echo "ArgoCD: http://$ARGOCD_HOST"
53-
echo "Monitoring (All-in-One): http://$MONITORING_HOST"
54-
echo " ├── Grafana: http://$MONITORING_HOST/grafana"
55-
echo " ├── Prometheus: http://$MONITORING_HOST/prometheus"
56-
echo " └── AlertManager: http://$MONITORING_HOST/alertmanager"
68+
69+
if [ "$MONITORING_HOST" != "Not found" ]; then
70+
echo "Prometheus: http://$MONITORING_HOST/prometheus"
71+
echo "Grafana: http://$MONITORING_HOST/grafana"
72+
echo "Alertmanager: http://$MONITORING_HOST/alertmanager"
73+
else
74+
echo "Monitoring services: Not found (check ingress configuration)"
75+
fi
76+
5777
echo "App: http://$APP_HOST"
78+
79+
echo ""
80+
echo "================= INGRESS STATUS ================="
81+
82+
# Show ingress details for debugging
83+
echo "Monitoring Ingress Status:"
84+
kubectl get ingress -n ${{ inputs.monitoring_namespace }} -o wide 2>/dev/null || echo "No ingress found in monitoring namespace"
85+
86+
echo ""
87+
echo "Load Balancer Services:"
88+
kubectl get svc -A --field-selector spec.type=LoadBalancer -o wide
89+
90+
echo ""
5891
echo "================= DEFAULT CREDENTIALS ================="
92+
5993
ARGOCD_PASS=$(kubectl -n ${{ inputs.argocd_namespace }} get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' 2>/dev/null | base64 -d || echo 'Not found')
6094
echo "ArgoCD -> Username: admin"
6195
echo "ArgoCD -> Password: $ARGOCD_PASS"
6296
echo "Grafana -> Username: admin"
6397
echo "Grafana -> Password: ${{ secrets.GRAFANA_PASSWORD }}"
6498
echo "Prometheus -> No login needed (anonymous access by default)"
99+
100+
echo ""
101+
echo "================= CONFIGURATION NOTES ================="
102+
echo "• Monitoring services are accessed through a single ingress endpoint"
103+
echo "• Make sure your DNS points to the ingress controller's LoadBalancer"
104+
echo "• If monitoring host shows 'Not found', check ingress controller deployment"

argocd/monitoring.yml

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,62 @@ spec:
1313
skipCrds: false
1414
values: |
1515
crds:
16-
enabled: true # Enable CRD installation
16+
enabled: true # Enable CRD installation
17+
18+
# Change all services to ClusterIP instead of LoadBalancer
1719
prometheus:
1820
service:
19-
type: LoadBalancer
21+
type: ClusterIP
22+
2023
grafana:
2124
service:
22-
type: LoadBalancer
25+
type: ClusterIP
2326
admin:
2427
existingSecret: grafana-admin-secret
2528
passwordKey: admin-password
29+
2630
alertmanager:
2731
service:
28-
type: LoadBalancer
32+
type: ClusterIP
33+
34+
# Enable ingress for all services
35+
ingress:
36+
enabled: true
37+
ingressClassName: nginx # or your ingress class
38+
annotations:
39+
nginx.ingress.kubernetes.io/rewrite-target: /
40+
# Add SSL redirect if you have cert-manager
41+
# cert-manager.io/cluster-issuer: "letsencrypt-prod"
42+
hosts:
43+
- host: monitoring.yourdomain.com # Replace with your domain
44+
paths:
45+
- path: /prometheus
46+
pathType: Prefix
47+
backend:
48+
service:
49+
name: kube-prometheus-stack-prometheus
50+
port:
51+
number: 9090
52+
- path: /grafana
53+
pathType: Prefix
54+
backend:
55+
service:
56+
name: kube-prometheus-stack-grafana
57+
port:
58+
number: 80
59+
- path: /alertmanager
60+
pathType: Prefix
61+
backend:
62+
service:
63+
name: kube-prometheus-stack-alertmanager
64+
port:
65+
number: 9093
66+
# Uncomment if using TLS
67+
# tls:
68+
# - secretName: monitoring-tls
69+
# hosts:
70+
# - monitoring.yourdomain.com
71+
2972
destination:
3073
server: https://kubernetes.default.svc
3174
namespace: ${MONITORING_NAMESPACE}

0 commit comments

Comments
 (0)