Skip to content

Commit a8dbc0b

Browse files
committed
Enhance monitoring and endpoint workflows with ingress configurations and shell adjustments
1 parent b42233b commit a8dbc0b

File tree

3 files changed

+36
-45
lines changed

3 files changed

+36
-45
lines changed

.github/workflows/endpoints.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
aws eks update-kubeconfig --name ${{ inputs.cluster_name }} --region us-east-1
4747
4848
- name: Print Service Endpoints
49+
shell: bash
4950
run: |
5051
echo "================= SERVICE ENDPOINTS ================="
5152
@@ -132,6 +133,5 @@ jobs:
132133
if [ "$LB_COUNT" -gt 2 ]; then
133134
EXCESS=$((LB_COUNT - 2))
134135
COST=$((EXCESS * 16))
135-
echo " • Potential monthly savings: ~\$COST (reducing $EXCESS extra LoadBalancers)"
136-
fi
137-
shell: /usr/bin/bash
136+
echo " • Potential monthly savings: ~\$$COST (reducing $EXCESS extra LoadBalancers)"
137+
fi

.github/workflows/monitoring.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,5 +91,5 @@ jobs:
9191
export MONITORING_NAMESPACE=${{ inputs.monitoring_namespace }}
9292
export ARGOCD_NAMESPACE=${{ inputs.argocd_namespace }}
9393
envsubst < ./argocd/monitoring.yml | \
94-
sed "s/monitoring\.yourdomain\.com/${{ steps.nginx-lb.outputs.nginx_hostname }}/g" | \
95-
kubectl apply -f -
94+
sed "s/monitoring\.yourdomain\.com/${{ steps.nginx-lb.outputs.nginx_hostname }}/g" | \
95+
kubectl apply -f -

argocd/monitoring.yml

Lines changed: 31 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,61 +13,52 @@ spec:
1313
skipCrds: false
1414
values: |
1515
crds:
16-
enabled: true # Enable CRD installation
16+
enabled: true
1717
18-
# Change all services to ClusterIP instead of LoadBalancer
1918
prometheus:
2019
service:
2120
type: ClusterIP
21+
ingress:
22+
enabled: true
23+
ingressClassName: nginx
24+
annotations:
25+
nginx.ingress.kubernetes.io/rewrite-target: /
26+
hosts:
27+
- host: monitoring.yourdomain.com
28+
paths:
29+
- path: /prometheus
30+
pathType: Prefix
2231
2332
grafana:
2433
service:
2534
type: ClusterIP
2635
admin:
2736
existingSecret: grafana-admin-secret
2837
passwordKey: admin-password
38+
ingress:
39+
enabled: true
40+
ingressClassName: nginx
41+
annotations:
42+
nginx.ingress.kubernetes.io/rewrite-target: /
43+
hosts:
44+
- host: monitoring.yourdomain.com
45+
paths:
46+
- path: /grafana
47+
pathType: Prefix
2948
3049
alertmanager:
3150
service:
3251
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
52+
ingress:
53+
enabled: true
54+
ingressClassName: nginx
55+
annotations:
56+
nginx.ingress.kubernetes.io/rewrite-target: /
57+
hosts:
58+
- host: monitoring.yourdomain.com
59+
paths:
60+
- path: /alertmanager
61+
pathType: Prefix
7162
7263
destination:
7364
server: https://kubernetes.default.svc

0 commit comments

Comments
 (0)