Skip to content

Commit ab29100

Browse files
committed
chore(grafana): remove vmauth
1 parent 022786d commit ab29100

3 files changed

Lines changed: 9 additions & 23 deletions

File tree

charts/grafana/templates/_helpers.tmpl

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,13 @@ env:
2121
- name: DRYCC_VALKEY_URL
2222
value: "redis://:$(DRYCC_VALKEY_PASSWORD)@drycc-valkey.{{.Release.Namespace}}.svc.{{.Values.global.clusterDomain}}:16379/0"
2323
{{- end }}
24-
{{- if .Values.victoriametricsUrl }}
25-
- name: "DRYCC_VICTORIAMETRICS_URL"
26-
value: "{{ .Values.victoriametricsUrl }}"
27-
{{- else if .Values.victoriametrics.enabled }}
28-
- name: "DRYCC_VICTORIAMETRICS_USERNAME"
29-
valueFrom:
30-
secretKeyRef:
31-
name: victoriametrics-vmauth-creds
32-
key: username
33-
- name: "DRYCC_VICTORIAMETRICS_PASSWORD"
24+
- name: DRYCC_SERVICE_KEY
3425
valueFrom:
3526
secretKeyRef:
36-
name: victoriametrics-vmauth-creds
37-
key: password
27+
name: controller-creds
28+
key: service-key
3829
- name: "DRYCC_VICTORIAMETRICS_URL"
39-
value: "http://$(DRYCC_VICTORIAMETRICS_USERNAME):$(DRYCC_VICTORIAMETRICS_PASSWORD)@drycc-victoriametrics-vmauth.{{$.Release.Namespace}}.svc.{{$.Values.global.clusterDomain}}:8427/select/0/prometheus"
40-
{{- end }}
30+
value: "http://$(DRYCC_CONTROLLER_API_SERVICE_HOST):$(DRYCC_CONTROLLER_API_SERVICE_PORT)/v2/prometheus/drycc"
4131
{{- if .Values.passport.enabled}}
4232
- name: "DRYCC_PASSPORT_URL"
4333
{{- if .Values.global.certManagerEnabled }}

charts/grafana/templates/grafana-deployment.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ spec:
5757
DRYCC_VALKEY_JSON=$(echo "$DRYCC_VALKEY_URL" | jq -R 'capture("^(?<scheme>redis[s]?)://(?<username>[^:]+)?(?::(?<password>[^@]+))?@(?<address>[^/]+)/?(?<db>[0-9]*)$")')
5858
GF_LIVE_HA_ENGINE_ADDRESS=$(echo "${DRYCC_VALKEY_JSON}" |jq -r '.address')
5959
GF_LIVE_HA_ENGINE_PASSWORD=$(echo "${DRYCC_VALKEY_JSON}" |jq -r '.password')
60-
DRYCC_VICTORIAMETRICS_JSON=$(echo "$DRYCC_VICTORIAMETRICS_URL" | jq -R 'capture("^(?<scheme>https?://)(?<username>[^:@]+):(?<password>[^@]+)@(?<address>.+)$") | {url: "\(.scheme)\(.address)", username: .username, password: .password}')
61-
DRYCC_VICTORIAMETRICS_URL=$(echo "${DRYCC_VICTORIAMETRICS_JSON}" |jq -r '.url')
62-
DRYCC_VICTORIAMETRICS_USERNAME=$(echo "${DRYCC_VICTORIAMETRICS_JSON}" |jq -r '.username')
63-
DRYCC_VICTORIAMETRICS_PASSWORD=$(echo "${DRYCC_VICTORIAMETRICS_JSON}" |jq -r '.password')
64-
export GF_LIVE_HA_ENGINE_ADDRESS GF_LIVE_HA_ENGINE_PASSWORD DRYCC_VICTORIAMETRICS_URL DRYCC_VICTORIAMETRICS_USERNAME DRYCC_VICTORIAMETRICS_PASSWORD
60+
export GF_LIVE_HA_ENGINE_ADDRESS GF_LIVE_HA_ENGINE_PASSWORD
6561
exec grafana server --config /usr/share/grafana/grafana.ini --homepath /opt/drycc/grafana
6662
{{- end }}
6763
{{- with index .Values "resources" }}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ datasources:
55
access: proxy
66
orgId: 1
77
url: $DRYCC_VICTORIAMETRICS_URL
8-
basicAuth: true
9-
basicAuthUser: $DRYCC_VICTORIAMETRICS_USERNAME
108
isDefault: true
9+
jsonData:
10+
httpHeaderName1: X-Drycc-Service-Key
1111
secureJsonData:
12-
basicAuthPassword: $DRYCC_VICTORIAMETRICS_PASSWORD
12+
httpHeaderValue1: $DRYCC_SERVICE_KEY
1313
version: 1
14-
editable: false
14+
editable: false

0 commit comments

Comments
 (0)