Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable haproxy metrics through helm Chart (#15458) #15459

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion manifests/ha/base/redis-ha/chart/upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,13 @@ data:
server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise 1
use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge 2 }
server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1
frontend stats
mode http
bind :9101
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
stats refresh 10s
haproxy_init.sh: |
HAPROXY_CONF=/data/haproxy.cfg
cp /readonly/haproxy.cfg "$HAPROXY_CONF"
Expand Down Expand Up @@ -1015,6 +1022,10 @@ spec:
port: 6379
protocol: TCP
targetPort: redis
- name: http-exporter-port
port: 9101
protocol: TCP
targetPort: metrics-port
selector:
release: argocd
app: redis-ha-haproxy
Expand Down Expand Up @@ -1047,7 +1058,10 @@ spec:
release: argocd
revision: "1"
annotations:
checksum/config: 718bbb277da8610063a7c0fd810984577c2e8ab215815a71211dfa6e20f67321
prometheus.io/port: "9101"
prometheus.io/scrape: "true"
prometheus.io/path: "/metrics"
checksum/config: 492a6adabb741e0cee39be9aa5155c41a4456629f862d0006a2d892dbecfbcae
spec:
# Needed when using unmodified rbac-setup.yml

Expand Down Expand Up @@ -1108,6 +1122,8 @@ spec:
ports:
- name: redis
containerPort: 6379
- name: metrics-port
containerPort: 9101
resources:
{}
volumeMounts:
Expand Down
2 changes: 2 additions & 0 deletions manifests/ha/base/redis-ha/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ redis-ha:
server: 6m
client: 6m
checkInterval: 3s
metrics:
enabled: true
image:
tag: 7.0.11-alpine
containerSecurityContext: null
Expand Down
15 changes: 13 additions & 2 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19292,7 +19292,9 @@ data:
check inter 3s fall 1 rise 1\n use-server R1 if { srv_is_up(R1) } { nbsrv(check_if_redis_is_master_1)
ge 2 }\n server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise
1\n use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge
2 }\n server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1\n"
2 }\n server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1\nfrontend
stats\n mode http\n bind :9101 \n http-request use-service prometheus-exporter
if { path /metrics }\n stats enable\n stats uri /stats\n stats refresh 10s\n"
haproxy_init.sh: |
HAPROXY_CONF=/data/haproxy.cfg
cp /readonly/haproxy.cfg "$HAPROXY_CONF"
Expand Down Expand Up @@ -19940,6 +19942,10 @@ spec:
port: 6379
protocol: TCP
targetPort: redis
- name: http-exporter-port
port: 9101
protocol: TCP
targetPort: metrics-port
selector:
app.kubernetes.io/name: argocd-redis-ha-haproxy
type: ClusterIP
Expand Down Expand Up @@ -20387,7 +20393,10 @@ spec:
template:
metadata:
annotations:
checksum/config: 718bbb277da8610063a7c0fd810984577c2e8ab215815a71211dfa6e20f67321
checksum/config: 492a6adabb741e0cee39be9aa5155c41a4456629f862d0006a2d892dbecfbcae
prometheus.io/path: /metrics
prometheus.io/port: "9101"
prometheus.io/scrape: "true"
labels:
app.kubernetes.io/name: argocd-redis-ha-haproxy
name: argocd-redis-ha-haproxy
Expand All @@ -20413,6 +20422,8 @@ spec:
ports:
- containerPort: 6379
name: redis
- containerPort: 9101
name: metrics-port
readinessProbe:
httpGet:
path: /healthz
Expand Down
15 changes: 13 additions & 2 deletions manifests/ha/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,9 @@ data:
check inter 3s fall 1 rise 1\n use-server R1 if { srv_is_up(R1) } { nbsrv(check_if_redis_is_master_1)
ge 2 }\n server R1 argocd-redis-ha-announce-1:6379 check inter 3s fall 1 rise
1\n use-server R2 if { srv_is_up(R2) } { nbsrv(check_if_redis_is_master_2) ge
2 }\n server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1\n"
2 }\n server R2 argocd-redis-ha-announce-2:6379 check inter 3s fall 1 rise 1\nfrontend
stats\n mode http\n bind :9101 \n http-request use-service prometheus-exporter
if { path /metrics }\n stats enable\n stats uri /stats\n stats refresh 10s\n"
haproxy_init.sh: |
HAPROXY_CONF=/data/haproxy.cfg
cp /readonly/haproxy.cfg "$HAPROXY_CONF"
Expand Down Expand Up @@ -1440,6 +1442,10 @@ spec:
port: 6379
protocol: TCP
targetPort: redis
- name: http-exporter-port
port: 9101
protocol: TCP
targetPort: metrics-port
selector:
app.kubernetes.io/name: argocd-redis-ha-haproxy
type: ClusterIP
Expand Down Expand Up @@ -1887,7 +1893,10 @@ spec:
template:
metadata:
annotations:
checksum/config: 718bbb277da8610063a7c0fd810984577c2e8ab215815a71211dfa6e20f67321
checksum/config: 492a6adabb741e0cee39be9aa5155c41a4456629f862d0006a2d892dbecfbcae
prometheus.io/path: /metrics
prometheus.io/port: "9101"
prometheus.io/scrape: "true"
labels:
app.kubernetes.io/name: argocd-redis-ha-haproxy
name: argocd-redis-ha-haproxy
Expand All @@ -1913,6 +1922,8 @@ spec:
ports:
- containerPort: 6379
name: redis
- containerPort: 9101
name: metrics-port
readinessProbe:
httpGet:
path: /healthz
Expand Down