Skip to content

Commit 5dafcb0

Browse files
committed
chore(grafana): add check oauth2 ok
1 parent 3866753 commit 5dafcb0

5 files changed

Lines changed: 26 additions & 4 deletions

File tree

charts/grafana/templates/_helpers.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ env:
2626
secretKeyRef:
2727
name: controller-creds
2828
key: service-key
29+
- name: "DRYCC_QUICKWIT_URL"
30+
value: "http://$(DRYCC_CONTROLLER_API_SERVICE_HOST):$(DRYCC_CONTROLLER_API_SERVICE_PORT)/v2/quickwit/drycc"
2931
- name: "DRYCC_VICTORIAMETRICS_URL"
3032
value: "http://$(DRYCC_CONTROLLER_API_SERVICE_HOST):$(DRYCC_CONTROLLER_API_SERVICE_PORT)/v2/prometheus/drycc"
3133
{{- if .Values.passport.enabled}}

charts/grafana/templates/grafana-deployment.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ spec:
144144
livenessProbe:
145145
tcpSocket:
146146
port: oauth2
147-
initialDelaySeconds: 120
147+
initialDelaySeconds: 240
148148
periodSeconds: 10
149149
timeoutSeconds: 5
150150
failureThreshold: 6
@@ -181,6 +181,12 @@ spec:
181181
- -ec
182182
- |
183183
set -m
184+
echo "Waiting for Grafana oauth2 proxy to come up..."
185+
until curl -q --fail --output /dev/null --silent "http://localhost:4000/oauth2/healthz"; do
186+
printf "."
187+
sleep 2
188+
done
189+
echo "Grafana oauth2 proxy is up and running."
184190
caddy run --config /usr/share/grafana/Caddyfile
185191
{{- end }}
186192
{{- with index .Values "resources" }}
@@ -195,7 +201,7 @@ spec:
195201
livenessProbe:
196202
tcpSocket:
197203
port: proxy
198-
initialDelaySeconds: 120
204+
initialDelaySeconds: 300
199205
periodSeconds: 10
200206
timeoutSeconds: 5
201207
failureThreshold: 6

rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM registry.drycc.cc/drycc/base:${CODENAME}
44
ENV DRYCC_UID=1001 \
55
DRYCC_GID=1001 \
66
DRYCC_HOME_DIR=/usr/share/grafana \
7-
GRAFANA_VERSION="12.0.1" \
7+
GRAFANA_VERSION="12.0.2" \
88
JQ_VERSION="1.7.1" \
99
CADDY_VERSION="2.9.1" \
1010
PYTHON_VERSION="3.13"

rootfs/usr/share/grafana/dashboards/drycc_quickwit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
]
6060
},
6161
"description": "Dashboard to monitor Quickwit indexers.",
62-
"editable": true,
62+
"editable": false,
6363
"fiscalYearStartMonth": 0,
6464
"graphTooltip": 0,
6565
"id": null,

rootfs/usr/share/grafana/provisioning/datasources/drycc.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
apiVersion: 1
22
datasources:
3+
- name: Application Logs
4+
type: quickwit-quickwit-datasource
5+
access: proxy
6+
orgId: 1
7+
url: $DRYCC_QUICKWIT_URL
8+
jsonData:
9+
httpHeaderName1: X-Drycc-Service-Key
10+
index: logs-*
11+
logMessageField: log
12+
secureJsonData:
13+
httpHeaderValue1: $DRYCC_SERVICE_KEY
14+
version: 1
15+
editable: false
16+
317
- name: Prometheus on Drycc
418
type: prometheus
519
access: proxy

0 commit comments

Comments
 (0)